]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 14 Aug 2011 01:51:07 +0000 (01:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 14 Aug 2011 01:51:07 +0000 (01:51 +0000)
inc/ws/Util/packager/html5/class.ws.packager.html5.links.php

index 489cc3f1c487a8b968e75af7ad6b4089ef190cac..e65d619a9cea908b2984d0af98e60897ee3d6024 100644 (file)
@@ -197,8 +197,10 @@ class videoLink extends wsPackagerHTML5Link {
                $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"';
                }
@@ -217,13 +219,19 @@ class videoLink extends wsPackagerHTML5Link {
 
 
                $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;
        }