html5 mp4视频播放器
我正在尝试使用 html5 视频标签播放 mp4 视频。但在 FF 3.6 中,它只显示一个带有十字符号的黑色窗口。它在 Chrome 中播放。
我可以在 Windows Media Player 中播放该视频(即安装了所需的编解码器)
我怎样才能在 FF 中播放该视频?
<video id="video1" width="200" height="200" controls="true">
<source src="video1.mp4" type='video/mp4; codecs="avc1.64001E, mp4a.40.2"' />
Your browser does not support mp4 videos
</video>
I am trying to play mp4 video using html5 video tag. But in FF 3.6 its just showing a black window with cross sign. Its playing in Chrome.
I can play that video in windows media player (i.e. the required codec are installed)
How can i play that video in FF too?
<video id="video1" width="200" height="200" controls="true">
<source src="video1.mp4" type='video/mp4; codecs="avc1.64001E, mp4a.40.2"' />
Your browser does not support mp4 videos
</video>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于许可原因,Firefox 本身不支持大多数 MPEG4。您可以将视频保存为几种不同的类型并使用 canPlayType(type) 方法。
更多这里:
http://wiki.whatwg.org/wiki/Video_type_parameters
http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-navigator-canplaytype
firefox does not support most MPEG4 natively due to licencing. you can save your video in a few different types and use canPlayType(type) method.
more here:
http://wiki.whatwg.org/wiki/Video_type_parameters
http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-navigator-canplaytype
对于 Firefox,您必须将视频编码为 Theora 并保存为 .ogv 文件。
http://diveintohtml5.info/video.html#what-works
For Firefox, you'll have to encode the video as Theora and save as an .ogv file.
http://diveintohtml5.info/video.html#what-works