你怎么能在IE11中显示html5视频元素的控件? [英] How could you show controls for html5 video element in IE11?

查看:541
本文介绍了你怎么能在IE11中显示html5视频元素的控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE11(可能还有10个)在你将鼠标悬停在视频本身之前不会显示视频控件。

IE11 (possibly 10 as well) does not show video controls until you hover over the video itself.

我个人觉得完全没用,特别是当你使用海报元素也是如此,因为用户无法知道图像实际上是一个视频。

Personally I think is completely useless, especially when you use the poster element as well, because a user cannot know the image is actually a video.

有没有办法'强迫'IE显示控件,就像Chrome一样?

Is there a way to 'force' IE to show the controls, like Chrome does?

我使用的代码是:

<video width="100%" height="100%" poster="/content/files/images/Definition-of-Coaching.png" preload="metadata" controls>
        <source src="/Content/Files/Video/Definition-of-Coaching-SD.mp4" type="video/mp4">
        <source src="/content/files/video/Definition-of-Coaching-SD.webm" type="video/webm">
</video>


推荐答案

您需要在声明视频后添加控制标签标签。

You need to add the control tag after declaring the video tag.

如W3学校所示:

W3学校-HTML 5视频

如果删除controls属性,控件不会出现在视频中。

If you remove the controls attribute, the controls will not appear on the video.

这篇关于你怎么能在IE11中显示html5视频元素的控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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