internet-explorer - 使用 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>
谢谢你的帮助。
解决方案
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:
Reference:
推荐阅读
- javascript - 打字稿索引错误:循环通过键入对象的键
- scala - 如何解决 scala 特征中的冲突成员 (org.slf4j.Logger/com.typesafe.scalalogging.Logger)
- c++ - 如何使用 boost C++ 连接到 websocket 服务器
- github - Github 操作未上传数据
- excel - 在 Excel 中,如何根据满足条件的单元格的总和来更新单元格的值?
- jsp - 如何创建一个执行功能并在按下后直接重定向的按钮?
- mysql - SQL SUM 返回不正确的结果
- javascript - 数据表重新排序回到原来的位置
- android - Android呼叫应用程序未重置音频流
- spring-boot - 如何在 Azure Spring Boot 部署的应用程序中使用 access.properties 变量?