gpt4 book ai didi

具有开始时间的 HTML5 视频播放器在 Internet Explorer 上不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 14:35:40 26 4
gpt4 key购买 nike

我有下面的代码,视频从第 483 秒开始。它适用于大多数浏览器,除了 IE10,它从 0:00 开始。

<video controls preload="metadata">
<source src="http://example.com/myvideo.mp4#t=483" type="video/mp4">
</video>

最佳答案

根据这个问题

Setting HTML5 audio position

In order to support seeking and playing back regions of the media that aren't yet downloaded, Gecko uses HTTP 1.1 byte-range requests to retrieve the media from the seek target position. In addition, if you don't serve X-Content-Duration headers, Gecko uses byte-range requests to seek to the end of the media (assuming you serve the Content-Length header) in order to determine the duration of the media.

你可以使用 jQuery

$('video').bind('canplay', function() {
this.currentTime = 483;
});

关于具有开始时间的 HTML5 视频播放器在 Internet Explorer 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26691583/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com