在我对某些视频php脚本的测试中,我在移动版本中出现错误 我正在搜索我知道需要编辑的文件的文件 错误是任何上传的flv视频将无法在移动设备中工作,它将显示错误消息,所以我添加(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'];
答案 0 :(得分:0)
大多数(任何?)移动设备不支持FLV视频。您需要将其转换为广泛支持的内容。