如何在所有 PC 浏览器中播放 m3u8 播放列表?
默认情况下,m3u8 文件可以在 Mac Safari 浏览器中播放,但不能在任何其他桌面浏览器中播放。需要做什么才能在所有浏览器(支持 HTML5 和非 HTML5)中播放它们?
By default m3u8 files can be played in Mac Safari browser, but not in any other desktop browsers. What needs to be done to play them in all browsers, both supporting HTML5 and non-HTML5?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不幸的是,HTML5 对视频的支持非常分散,无论从任何意图和目的来看,目前它都是无用的(至少作为主要焦点)。 M3U8 播放列表是 Apple HTTP Live Streaming,正如您从名称中可以看出的,它们是(或至少开始时)Apple 标准,没有其他浏览器使用它们或 HTTP Live Streaming。
您可以安装一些程序来添加对 HLS 的支持。例如,一些公司已经生产了用 Flash 或 Silverlight 编写的 HLS 播放器。 Yospace 已经制作了一个用于 HLS 播放的 flash SDK,其中包括一个 JWPlayer 媒体提供程序,它允许您可以在非闪存设备(阅读:iPhone/iPad)上使用 JW 的自动 HTML5 回退,而所有其他设备都可以获得 JWPlayer 体验。
各个公司做出了许多“标准化浏览器视频支持”的承诺,但它们(到目前为止)都没有实现,所以无论您选择什么选项,都将是某种妥协。
Unfortunately HTML5 support for video is so fragmented that it is, to all intents and purposes, useless (at least as a primary focus) at this point in time. M3U8 playlists are Apple HTTP Live Streaming, and as you can tell from the name, they are (or at least started out as) an Apple standard, no other browser uses them, or HTTP Live Streaming.
There are some programs you can install to add support for HLS. Some companies have, for example, produced HLS players written in Flash, or Silverlight. Yospace has produced a flash SDK for HLS playback which includes a JWPlayer mediaprovider which allows you to use JW's automatic HTML5 fallback on non-flash devices (read: iPhone/iPad), while all others get the JWPlayer experience.
There have been many promises from various companies to "standardize browser video support" but they have all (so far) come to nothing, so whatever option you choose, it's going to be a compromise of sorts.
Microsoft Edge 可以播放 m3u8 文件,但您必须拥有 Windows 8 或 10...
只需打开 Microsoft Edge 并写入 m3u8 文件的 url,它就会开始播放。
Microsoft Edge plays m3u8 files but you must have windows 8 or 10...
Just open Microsoft Edge and write the url of the m3u8 file and it will start playing.
我用的是流播放器。它非常容易设置和使用,并且适用于所有浏览器并且是免费的,除非您想要自己的品牌......(与 JW 播放器不同)。
在此处获取 Flow Player Flow Player 下载
按照此演示,我成功地设置了 HLS 播放。
HLS 演示
需要注意的一点是演示中没有提到这一点。
这是我运行 HLS 的工作页面,例如:
I used flowplayer. It's very easy to setup and get going and it works on all browsers and is free, unless you want your own branding... (unlike JW player).
Get flow player here Flow Player download
I was successfully able to set up HLS playback by following this demo.
HLS Demo
One thing to note, which the demo does not mention is that.
Here is my working page that runs HLS, for example:
使用您的播放列表/视频链接尝试此操作。只需更改 src 链接即可。
Try this, with your playlist/video link. Just change the src link.
我不完全理解 .m3u8 播放列表的交易是什么...但我不是特别喜欢它们..也就是说,this 似乎认为它可以满足您的需求...github / etianen / html5media
你所要做的就是在你的 HTML 文档中嵌入一个 javascript,以及某种魔法,或者缺乏魔法......剩下的就完成了......
我能够播放 .m3u8 电影,从桌面浏览器中的 Wowza 服务器流式传输通过本机 html5 嵌入,就像...
但是,我还没有能够让它们通过本机 HTML 控件“全屏”...但我正在研究它..
I don't exactly understand what the deal is with .m3u8 playlists... but I don't particularly like them.. That said, this seems to think it does what you want... github / etianen / html5media
All you have to do is embed a javascript in the of your HTML doc, and some sort of magic, or lack thereof... does the rest..
I was able to play .m3u8 movies, streaming from a Wowza server in desktop browsers via a native html5 embed, like...
I have NOT, however, yet been able to get them to go "fullscreen" via native HTML controls... but I'm looking into it..