为什么在 Chrome 上使用 HTML5 视频时只显示控件?
我使用以下 HTML5 来显示视频,但 Chrome 中仅显示控件。在 Safari 和 Firefox 中运行良好:
<video width="720" height="480" controls="controls" preload="preload">
<source src="<?php bloginfo('url'); ?>/wp-content/uploads/Reel.ogv" type="video/ogg; codecs=theora,vorbis" >
<source src="<?php bloginfo('url'); ?>/wp-content/uploads/Reel.mp4" type="video/mp4">
Your browser doesn't support video.
</video>
有什么想法吗?
I'm using the following HTML5 to display video, but only the controls show up in Chrome. Works fine in Safari and Firefox:
<video width="720" height="480" controls="controls" preload="preload">
<source src="<?php bloginfo('url'); ?>/wp-content/uploads/Reel.ogv" type="video/ogg; codecs=theora,vorbis" >
<source src="<?php bloginfo('url'); ?>/wp-content/uploads/Reel.mp4" type="video/mp4">
Your browser doesn't support video.
</video>
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,第一个
标签的 type 属性格式错误:
如果我的话,应该是
type="video/ogg; codecs='theora, vorbis'"
记住正确。也可以尝试 type="video/ogg"。Looks to me like the first
<source>
tag has a malformed type attribute:should be
type="video/ogg; codecs='theora, vorbis'"
if I remember correctly. Also just try type="video/ogg".