html5 视频播放列表 - 没有 JavaScript?
尝试做一个非常基本的播放器来测试,因为我们在 html5 视频和视频方面遇到了一些问题。 JavaScript。
我总是假设类似的事情;
<video controls>
<source src="/media/uploads/2010/09/1527/7_bbc-radio-1-hq.mov"></source>
<source src="/media/uploads/2010/10/1557/7_costa-monkeys.mov"></source>
</video>
会被理解为一个播放列表,但不起作用,也找不到任何建议这个或其他任何东西的东西。
是否可以仅使用 html5 标记创建播放列表?
最好的,丹。
trying to do a really basic player for testing as we're having some issues with html5 video & javascript.
I always presumed something like;
<video controls>
<source src="/media/uploads/2010/09/1527/7_bbc-radio-1-hq.mov"></source>
<source src="/media/uploads/2010/10/1557/7_costa-monkeys.mov"></source>
</video>
would be understood as a playlist but doesn't work and can't find anything to suggest this or anything else would.
IS it possible to create a playlist just using html5 markup?
best, Dan.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
浏览器将选择它能够播放的第一个源。拥有多个源的目的是让您可以以不同的编码和比特率提供相同的视频。
目前无法仅使用标记创建播放列表。我能想到的唯一可以模拟它的方法是在 CSS 中使用
:target
伪类:这种方法的缺点是用户必须手动停止和启动视频,以及单击链接可在它们之间导航。
The browser will select the first source it is capable of playing. The point of having multiple sources is so that you can provide the same video at different encodings and bitrates.
Currently it is not possible to create a playlist just using markup. The only way I can think of which might simulate it would be to use the
:target
pseudo class in CSS:Where this falls down is that users will have to stop and start the videos manually, as well as click the links to navigate between them.