首页 > 解决方案 > 使用 iExplorer 的视频问题

问题描述

我希望我的视频缩略图显示为我视频的第一帧。我的解决方案是在第 1 帧而不是第 0 帧开始播放视频(代码如下)。这在 Firefox 和 Chrome 中效果很好,但 IE 想要初始化空帧 0 上的视频。是否有解决方法让所有三个浏览器都显示第一帧缩略图。我确实尝试过海报,但也不能在所有浏览器中正常工作。任何帮助,将不胜感激。我使用 #t=1 来访问第一帧。

    <video style="margin-left: auto; margin-right: auto; display: block; padding-bottom: 2em;" width="640" height="360" controls >
        <source src="_videos/My_Video.mp4#t=1" type="video/mp4" >
    </video>

谢谢你的帮助。

标签: internet-explorerhtml5-video

解决方案


I can understand that you want to show the 1st frame as a thumbnail for the video. but its looks like it is not supported in Internet Explorer.

You had mentioned that you already use the poster attribute to display the thumbnail of the video but it didn't work correctly. Can you inform us what problem you are facing with poster? I try to make a test with poster on my side and it looks like it is working with IE.

Sample code:

<video controls
    src="https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4"
    poster="https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217"
    width="620">

Sorry, your browser doesn't support embedded videos, 
but don't worry, you can <a href="https://archive.org/details/BigBuckBunny_124">download it</a> 
and watch it with your favorite video player!

</video>

Output:

enter image description here

Reference:

: The Video Embed element


推荐阅读