试图让firefox播放这个.mov文件。 我尝试过一些东西,包括在堆栈上查看。无法在Firefox中使用它, 所以,我想在FireFox中播放电影而不是灰色的视频文件图像时显示自定义错误。
建议?
这里的代码在firefox中不起作用
function videoPlayer($videoPath, $height, $width){
$videoPath = "../videos/redhand.mov";
$height = 320;
$width = 400;
echo "<video height='".$height."' width='".$width."' controls autoplay>
<source src='" . $videoPath . "' type='video/mp4'>
<object CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' height='".$height."' width='".$width."' CODEBASE=' http://www.apple.com/qtactivex/qtplugin.cab'>
<param name='src' value='" . $videoPath . "'>
<param name='qtsrc' value='" . $videoPath . "'>
<param name='autoplay' value='true'>
<param name='loop' value='false'>
<param name='controller' value='true'>
<embed src='" . $videoPath . "' qtsrc='" . $videoPath . "' width='320' height='256' autoplay='true' loop='false' controller='true' pluginspage='http://www.apple.com/quicktime/'></embed>
</video>";
}
videoPlayer("../videos/redhand.mov", 500, 500);
?>
答案 0 :(得分:0)
您可以尝试这样的事情:
$browser = get_browser(null, true);
if($browser['browser']) == "Firefox") {
enter code here
} else {
enter code here
}