html5 mp4视频播放器

发布于 2024-10-06 15:08:20 字数 412 浏览 0 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烟雨凡馨 2024-10-13 15:08:20

由于许可原因,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

甜心 2024-10-13 15:08:20

对于 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文