liqvidjs / liqvid

Library for interactive videos in React
https://liqvidjs.org
MIT License
761 stars 39 forks source link

Video element issue #31

Closed anishg-cn closed 2 years ago

anishg-cn commented 2 years ago

When adding a Video element which has duration less than the total duration of the playback, then the playback is pausing when the video ends. @ysulyma Can you please check?

You can reproduce the issue by the following steps:

  1. Go to https://liqvidjs.org/docs/reference/Video.
  2. Change the line 7 in the code segement from ["train/", "0:20"] to ["train/", "0:30"]
  3. Then run the video, you will see that at 23s, when the video ends the player will pause automatically.
ysulyma commented 2 years ago

This is a known issue, I'll have a go at fixing it

anishg-cn commented 2 years ago

@ysulyma can you tell me what is the issue? and how long will it take to fix?

ysulyma commented 2 years ago

@anishg-cn We render <Audio> and <Video> elements without controls, so generally they're synced up with Liqvid playback, and can only be played/paused via the <Player> controls. There's one exception: the underlying <audio>/<video> elements can be affected by play/pause keyboard buttons. To support this case, we pause the Playback when the <video> gets paused. The bug is that we're treating the end of the video as a pause of the video. I can probably get this done in the next day or two!

anishg-cn commented 2 years ago

@ysulyma ok thanks

ysulyma commented 2 years ago

@anishg-cn try with Liqvid 2.1.8!

anishg-cn commented 2 years ago

@ysulyma yes this is working now, thanks.