cladera / videojs-offset

VideoJS plugin for play a segment of a video.
MIT License
64 stars 43 forks source link

Is there a way to "reset" a previously set offset? #72

Closed getify closed 3 years ago

getify commented 3 years ago

If you apply an "offset" to a longer video, is there some way to then reset back to the full video? It'd be nice to even have a button on the player (similar to the play/pause button) to do the reset, is that possible?

getify commented 3 years ago

FWIW, passing no argument to offset(..) sort of resets it, but I had to fiddle with it a bit to get it work reliably. What I ended up with is: pause(), followed by a 100ms delay, followed by the offset() call, then another 100ms delay, then currentTime(0), and finally the play() call. So far, that setup seems to be working. Kinda kludgy feeling, and I'm adding a "reset" button to the player via my own plugin, but... it "works".