videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
38.07k stars 7.45k forks source link

currentTime(641) is succeeded,but the video is seeked to 0 #8699

Closed husongge-tal closed 4 months ago

husongge-tal commented 6 months ago

Description

When I used currentTime(641), the seek was successful(Because we detected the player's seek event ), but the browser reported an error and the video started playing from 0 seconds(We have once again detected the player's seek event,and In fact, the video started playing from 0 seconds), I have only used currentTime once. Why? my code:

if(this.player) { this.player.currentTime(newVal); } …… this.player.on('seeked', function () { console.log('The video has seeked!', this.player.currentTime()); });

event listeners : events

Reduced test case

http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

Steps to reproduce

  1. this.player = videojs(videoDomId, this.options, async () => {this.player.play()});
  2. add events listener 3.this.player.currentTime(641)

Errors

the error picture: error

What version of Video.js are you using?

8.10.0

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Chrome/78

What OS(es) and version(s) does this occur with?

MacBook Pro (16-inch, 2019)

welcome[bot] commented 6 months ago

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

mister-ben commented 5 months ago

The test stream is not playable as it lacks CORS headers and is http. Running on localhost and modifying headers, no such behaviour is observable.

player.on('seeked', function () {
  console.log('The video has seeked!', player.currentTime());
});
player.play();
player.currentTime(641)
VM54:2 The video has seeked! 641

Please read these guidelines on creating a reduced test case.

mister-ben commented 4 months ago

Closing as no actionable information.