我根据各种网站声明如何编写我的html。我的视频适用于Safari和Firefox,但无法在Chrome中使用。但是我的Chrome浏览器确实播放了html视频,因为我已成功浏览其他网站上的视频。我不知道我哪里出错了。它可能与帧速率等有关。我的视频文件有问题,还是编码错误。
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf8">
<link rel = "stylesheet" href = "film.css">
<title>FILM BG TEST</title>
</head>
<body>
<div class = "main">
<video id = "filmbg" preload = "auto" autoplay = "true" poster = "dum.jpg" loop = "loop" muted = "true" volume = "0">
<source src = "gs.mp4" type = 'video/mp4; codecs = "avc1.42E01E, mp4a.40.2"'/>
<source src = "gs.webmhd.webm" type = 'video/webm; codecs = "vp8, vorbis"'/>
<source src = "gs.oggtheora.ogv" type = 'video/ogg ogv; codecs = "theora, vorbis"'/>
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="1920" height="1080">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashvars" value='config={"clip":{"url":"HTML5Sample_flv.flv","autoPlay":false,"autoBuffering":true}}' />
</object>
Video not supported: get a new browser
</video>
</div>
</body>
</html>