在我对一些视频 php 脚本的测试中,当我搜索文件时,我在移动版本中遇到了错误,所以我在其他格式旁边添加(flv)现在会显示加载但视频在这里不起作用是代码
$ext = strtolower(array_pop(explode('.', $video['url_flv'])));
if($ext == 'mov' || $ext == 'm4a'|| $ext == 'm4v' || $ext == 'mp4' || $ext == 'm2a' || $ext == 'm2v' || $ext == '3g2' || $ext == '3gp' || $ext == 'mp3') {
if($ext == 'mp3' || $ext == 'm4a')
$type = 'audio';
else
$type = 'video';
$embed_code = 'Loading...</div>'; //Close this div as we will insert the player with javascript
$embed_code.= '<div><script language="javascript">
$(function(){
var screenw = window.outerWidth;
var screenh = screenw/16*9; //Common video format + 20px for controls
tag = \'<'.$type.' id="playingvid" style="width:\' + screenw + \'px;'.(($type=='video')?'height:\' + screenh + \'px;':'').'" controls allowfullscreen>\'+
\' <source src="';
if($video['source_id']==1 && substr($video['url_flv'],0,7) != 'http://'){
$embed_code.=_URL.'/uploads/videos/'.$video['url_flv'];
}else{
$embed_code.=$video['url_flv'];
}
$embed_code.= '"></video>\';
$("#video_player .videoWrapper").html(tag);
$(window).resize(function() {
var screenw = document.body.clientWidth;
var screenh = screenw/16*9; //Common video format + 20px for controls
$("#playingvid").width(screenw).height(screenh);
});
});
</script>
';
} else {
$embed_code = $lang['suggest_msg5'];