public static function urlDecoder($args) {
global $js;
- $js[] = JS_PATH.'/urldecoder.js';
+ $js[] = JS_PATH . '/urldecoder.js';
global $core;
$res = commonPage::barre();
$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 = '<style type="text/css">';
$res.='html, body {margin: 0;padding: 0;height: 100%;color:#fff;overflow:hidden;}';
- $res.='body{background:#000;}';
+ $res.='body,video{background:' . $background . ';}';
$res.='video{width:100%;height:100%;}';
$res.='#header{display:none;}';
$res.='</style>';
$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 .= '</video>';
- $res .= cubeMedia::flash2('/swf/video.swf', '100%', '100%', $fv, 'video', '', 10, '#000000', $alt, true);
+ if (isset($_GET['html5']) && $_GET['html5']) {
+ $res.='<div id="video">' . $alt . '</div>';
+ } else {
+ $res .= cubeMedia::flash2('/swf/video.swf', '100%', '100%', $fv, 'video', '', 10, '#000000', $alt, true);
+ }
+
//ob_end_clean();
echo $res;