Skip to content
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

Skip over playback gaps that occur in the beginning of streams #1085

Merged
merged 4 commits into from
Mar 3, 2021

Conversation

evanfarina
Copy link
Contributor

Description

Fixes #1084 . There is an edge case that is exposed when a gap exists at the beginning of the stream and no content is buffered by the time the first waiting event has emitted. This leaves the player in a state where it's no longer checking for playback stalls (or gaps).

Specific Changes proposed

As mentioned in the linked issue, we have decided to proceed by checking for stalls when the first play event is emitted.

Requirements Checklist

  • [ x] Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@evanfarina evanfarina marked this pull request as ready for review March 2, 2021 17:34
Copy link
Contributor

@gesinger gesinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! A few minor comments.

test/playback-watcher.test.js Outdated Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
src/playback-watcher.js Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
test/playback-watcher.test.js Outdated Show resolved Hide resolved
@gesinger
Copy link
Contributor

gesinger commented Mar 3, 2021

All the changes look good, thank you @evanfarina , but one thing I noticed during testing is that if you're using the test page with autoplay on and load the source again (the test source you provided in the issue) instead of refreshing the page, it won't skip the gap the second time. I don't think this should block us from pushing this PR through, but if you wanted to take a look at how source setting behavior might impact things, and if this will still be an issue for your use-case, we can either do it here, have another PR, or create a separate issue and handle it later.

@gkatsev gkatsev merged commit ccd9352 into videojs:main Mar 3, 2021
@welcome
Copy link

welcome bot commented Mar 3, 2021

Congrats on merging your first pull request! 🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-played demuxed stream fails to play and infinitely stalls
3 participants