从特定时间重现html5视频流

问题描述 投票:0回答:1

您好我必须在特定时间重现html5视频流,浏览器不会这样做。我尝试过这些选项,但没有一个是有用的。例如:

 <video width="1800" height="1000" id="video1" data-tooltip="pelea Ertzainza" controls="">
        <source src="......./5c949390643553f7c6c92dcd" type="video/mp4"> Your browser does not support the video tag.
     </video>

这是一种要传输的流媒体视频。我尝试了以下选项:

<script>
document.getElementById('video1').addEventListener('loadedmetadata', function() {
  this.currentTime = 50;

}, false);/script> 

我也试过这个选项:视频>

<video> 
   <source src="......./5c949390643553f7c6c92dcdt=10,20" type="video/mp4">
</video>

任何的想法 ??谢谢Gorka

html5 video-streaming
1个回答
0
投票

您可以在源URL中使用媒体片段,但您在代码中做错了:

<source src="......./5c949390643553f7c6c92dcdt=10,20" type="video/mp4">

您必须在URL的其余部分和指示时间的片段之间使用#

<source src="......./5c949390643553f7c6c92dcd#t=10,20" type="video/mp4">
© www.soinside.com 2019 - 2024. All rights reserved.