-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: play/pause and running promise modified #9
Conversation
Thanks, @JoaquinBCh! As mentioned on Discord, as much fun as it is to data mosh big buck bunny by pausing and playing and applying P frames to old state, I think we probably want something to ensure we restart playback on a keyframe. bbb_datamosh.mp4#3 added some code along these lines: moq-js/lib/playback/worker/video.ts Lines 122 to 141 in f6c7424
But, I think because of how this shuffles around the tasks to actually run the tracks, that code isn't working in the same way anymore here. Once we can sort out how to ensure a cleaner restart of playback here, I'm happy to merge this in. |
Nice! Just in case, we have to test with |
I set to true this.#waitingForKeyframe when pause bbb_pause_play.webm.mp4 |
b711969
to
f7907db
Compare
Tested again, and this appears to be properly ensuring we always wait and reinitialize with keyframes now. Thanks! |
This PR adds the ability to pause and resume playback in the player.
this.#running
and the#runTrack
tasks to allow resubscription after pausing.