$e = explode('.', $file);
$ext = array_pop($e);
$basename = implode('.', $e);
+ $w = round($this->width);
+ $h = round($this->height);
- $res = '<video width="' . round($this->width) . '" height="' . round($this->height) . '"';
+ $res = '<video width="' . $w . '" height="' . $h . '"';
if ($this->video_auto_start) {
$res.=' autoplay="autoplay"';
}
$this->copyExternalFile($this->to, true);
- $types = array( 'webm' => 'video/webm; codecs="vp8, vorbis"', 'ogv' => 'video/ogg; codecs="theora, vorbis"','mp4' => '');
+ $types = array('webm' => 'video/webm; codecs="vp8, vorbis"', 'ogv' => 'video/ogg; codecs="theora, vorbis"', 'mp4' => '');
foreach ($types as $ext => $type) {
if ($type != '') {
$type = " type='" . $type . "'";
}
$res.='<source src="' . wsPackagerHTML5Link::getUniversalLocation($basename . '.' . $ext) . '"' . $type . ' />';
}
+ $flashvars = array('video' => wsPackagerHTML5Link::getUniversalLocation($basename . '.mp4'),
+ 'poster' => wsPackagerHTML5Link::getUniversalLocation($basename . '.jpg'),
+ 'controls' => $this->video_controls == '1',
+ 'autoPlay' => $this->video_auto_start == '1',
+ 'loop' => $this->video_loop);
+ $res.=cubeMedia::flashObject('data/swf/video.swf', $w, $h, $flashvars, 'swfplayer-' . $basename, '', 9, '#ffffff', '', 'true', 'noscale', 'normal');
$res.='</video>';
return $res;
}