How could you show controls for html5 video elemen

2019-07-04 04:23发布

问题:

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.

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

The code I use is:

<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>

回答1:

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

As shown in W3 schools:

W3 Schools -HTML 5 Video

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