For mp4, use video tag, with videojs instead of embed
parent
37dac7d3a6
commit
dbcf320808
|
@ -213,7 +213,25 @@ function getVideoStreamHTML($id, $src, $width, $height, $format, $title='') {
|
|||
</object>';
|
||||
} # end switch
|
||||
} # end if use object tags
|
||||
return '<embed'. ( isset($mimeType)?(' type="'.$mimeType.'"'):'' ). '
|
||||
|
||||
switch( $mimeType ) {
|
||||
case 'video/mp4' :
|
||||
global $rates;
|
||||
return '<video autoplay id="videoobj" class="video-js vjs-default-skin"'
|
||||
.($width ? ' width="'.$width.'"' : '').($height ? ' height="'.$height.'"' : '').'
|
||||
style="transform: matrix(1, 0, 0, 1, 0, 0);"
|
||||
data-setup=\'{ "controls": true, "autoplay": true, "preload": "auto", "playbackRates": [ '. implode(',',
|
||||
array_map(function($r){return $r/100;},
|
||||
array_filter(
|
||||
array_keys($rates),
|
||||
function($r){return $r >= 0 ? true : false;}
|
||||
))).']}\'
|
||||
>
|
||||
<source src="'. $src.'" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>';
|
||||
default:
|
||||
return '<embed'. ( isset($mimeType)?(' type="'.$mimeType.'"'):'' ). '
|
||||
src="'.$src.'"
|
||||
name="'.$title.'"
|
||||
width="'.$width.'"
|
||||
|
@ -223,6 +241,7 @@ function getVideoStreamHTML($id, $src, $width, $height, $format, $title='') {
|
|||
showcontrols="0"
|
||||
controller="0">
|
||||
</embed>';
|
||||
}
|
||||
}
|
||||
|
||||
function outputImageStream( $id, $src, $width, $height, $title='' ) {
|
||||
|
|
Loading…
Reference in New Issue