-
Notifications
You must be signed in to change notification settings - Fork 425
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
Pr for media sequence #1204
Pr for media sequence #1204
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request! I think 1000 is sufficiently large here. I just have a small comment on the log message. Do you think you might have some time to write a test?
Codecov Report
@@ Coverage Diff @@
## main #1204 +/- ##
=======================================
Coverage 86.33% 86.34%
=======================================
Files 39 39
Lines 9691 9695 +4
Branches 2243 2244 +1
=======================================
+ Hits 8367 8371 +4
Misses 1324 1324
Continue to review full report at Codecov.
|
Co-authored-by: Brandon Casey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last change brought up internally.
Co-authored-by: Brandon Casey <[email protected]>
Co-authored-by: Brandon Casey <[email protected]>
Congrats on merging your first pull request! 🎉🎉🎉 |
Description
The browser tab running video.js would show a "Page Unresponsive" dialog in Chrome when the EXT-X-MEDIA-SEQUENCE tag increased by a large number between subsequent m3u8 files. This happened because the saveExpiredSegmentInfo function was iterating over this large number.
This behaviour was raised in issue 1197
Proposed Solution
The proposed solution is to avoid the browser becoming unresponsive by only iterating over the media sequence difference if it is within a reasonable threshold.
To determine a reasonable threshold, I looked at Apple's "Live Playlist (Sliding Window) Construction" page which states:
Based on this, I have used a threshold of 1000.
Requirements Checklist