From: vincent@cubedesigners.com Date: Mon, 12 Mar 2012 18:34:36 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d6a4d54a1e003410c7877ff0f4f85c142a00c1b2;p=cubeextranet.git --- diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index cc08ce1cd..08a9edc8b 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -24,7 +24,7 @@ class commonTools { public static function urlDecoder($args) { global $js; - $js[] = JS_PATH.'/urldecoder.js'; + $js[] = JS_PATH . '/urldecoder.js'; global $core; $res = commonPage::barre(); @@ -70,20 +70,22 @@ class commonTools { $loop = isset($_GET['loop']) ? $_GET['loop'] : 0; $autoplay = isset($_GET['autoplay']) ? $_GET['autoplay'] : 0; $controls = isset($_GET['controls']) ? $_GET['controls'] : 1; + $displayPoster = isset($_GET['poster']) ? $_GET['poster'] : 1; + $background = isset($_GET['background']) ? $_GET['background'] : '#000000'; $fv = array('video' => $url, 'autoPlay' => $autoplay == 1, 'controls' => $controls == 1, 'loop' => $loop == 1); - if (file_exists($dir . 'video.jpg')) { + if ($displayPoster && file_exists($dir . 'video.jpg')) { $poster = $web . 'video.jpg'; $fv['poster'] = 'http://' . $_SERVER['HTTP_HOST'] . $poster; } $res = ''; @@ -93,19 +95,25 @@ class commonTools { $alt.=' controls="controls"'; } if ($loop) { - $alt.=' loop="loop"'; + $alt.=' onended="this.play();"'; + //$alt.=' loop="loop"'; } if ($autoplay) { $alt.=' autoplay="autoplay"'; } - if (isset($poster)) { + if ($displayPoster && isset($poster)) { $alt.=' poster="' . $web . 'video.jpg"'; } $alt .= '>'; $alt .= ''; - $res .= cubeMedia::flash2('/swf/video.swf', '100%', '100%', $fv, 'video', '', 10, '#000000', $alt, true); + if (isset($_GET['html5']) && $_GET['html5']) { + $res.='
' . $alt . '
'; + } else { + $res .= cubeMedia::flash2('/swf/video.swf', '100%', '100%', $fv, 'video', '', 10, '#000000', $alt, true); + } + //ob_end_clean(); echo $res;