Chrome不再支持HTML5视频? [英] Chrome No Longer Supports HTML5 Video?

查看:544
本文介绍了Chrome不再支持HTML5视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我正在为uni项目工作的网站,我使用HTML5视频标签嵌入了一个视频。代码如下所示:

I have a website I was working on for a uni project, and I embedded a video using the HTML5 video tag. The code looks like this:

<video width="400" controls="">
<source src="images/Nexus.mp4" type="video/mp4">
Something broke :/
</video>

它在大学工作正常,但是当我回家时,它不再有效。我做了一些研究,Chrome不支持mp4。好的,所以我找到了一个允许我转换为其他支持类型的网站,所以现在我的代码看起来像这样:

And it was working fine at uni, but when I went home it no longer worked. I did a bit of research, and Chrome doesn't support mp4. Ok fine, so I found a site that allowed me to convert to the other supported types so now my code looks like this:

<video width="400" controls="">
<source src="images/Nexus.mp4" type="video/mp4">
<source src="images/Nexus.ogv" type="video/ogg">
<source src="images/Nexus.webm" type="video/webm">
Something broke :/
</video>

ogg和webm都正常工作(我使用评论单独测试了每一个)。但在家里它仍然无法正常工作。它提供了视频小部件,并显示正确的视频长度,但播放按钮被禁用,没有静止图像。但它仍然在大学工作。直到今天。现在我有同样的问题。让Chrome停止支持HTML5视频广告代码吗?

And both the ogg and webm were working (I tested each one individually using comments). But at home it still didn't work. It comes up with the video widget thing and displays the correct length of video but the play button is disabled and there is no still image. But it still worked at uni. Until today. Now I have the same problem. Have Chrome stopped supporting the HTML5 video tag?

注意 ogg和webm仍可在firefox上运行,但不适用于mp4

NOTE the ogg and webm still work on firefox, but not mp4

推荐答案

尝试重新排列它以便

<video width="400" controls>
<source src="images/Nexus.ogv" type="video/ogg">
<source src="images/Nexus.webm" type="video/webm">
<source src="images/Nexus.mp4" type="video/mp4">
Something broke :/
</video>

并删除属性控件的空值

这篇关于Chrome不再支持HTML5视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆