react-video-looper icon indicating copy to clipboard operation
react-video-looper copied to clipboard

The video startTime and endTime don't update until the video is finished playing.

Open jackguoAtJogg opened this issue 5 years ago • 3 comments

I'm building a video trimmer using component and I have range selector to update startTime and endTime. Whenever I updated startTime and endTime the video has to finish playing instead of update startTime and endTime immediately.

jackguoAtJogg avatar Jul 29 '20 20:07 jackguoAtJogg

Hi @jackguoAtJogg

As a quick test I ran the demo editor (npm start or https://lewhunt.github.io/react-video-looper) and opened the top-right Editor window. I then increased/decreased the start/end times in the top-right editor form. Providing that the current playback position is between start/end values, the video loop does appear to update and use the new values without playing to the end. Does that work for you?

If you're using a range selector for trimming, perhaps you may want to fork this repo and slightly alter the behaviour: pausing as you drag and then ensure the props are updated and playback resumes when you finish dragging. The componentDidUpdate method may need to be customised to suit your needs which you could do, rebuilding the forked component and use the new build?

Let me know how you get on, Lewis

lewhunt avatar Jul 30 '20 16:07 lewhunt

It works in the demo page but dont know why it doesn't. I'll dig more into this and will keep you posted. Thank you :)

jackguoAtJogg avatar Jul 31 '20 20:07 jackguoAtJogg

Perhaps there can be a autoLoop prop that automatically determines the end time of the video src and can loop it after it is played all the way through ?

DoubleHelixX avatar Aug 04 '21 18:08 DoubleHelixX