Fully buffer video in Chrome

后端 未结 5 1999
我在风中等你
我在风中等你 2021-02-07 16:01

Is it possible to fully buffer HTML5 video in Chrome (and Opera)?

I host the movie in .mp4 and .webm on amazon S3. In HTML I use standard tag.

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-07 16:39

    I have not tried it, but the HTML5 video object contains a buffered property

    var video = document.createElement('video');
    video.buffered.start(0);
    video.buffered.end(0);
    

    Could you try monitoring the buffered (Such as with this thread chrome html5 video buffered.end event)

    Then continually change the current time to right before the buffered time using

    video.currentTime = video.buffered.end(0) - 1;
    

提交回复
热议问题