-
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
fix: support timeshift dash manifests without startNumber attribute #1092
base: main
Are you sure you want to change the base?
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. |
Can In general, it may be worth considering scenarios where a playlist goes from not having segments to having segments and vice versa and how to handle setting the Logically, the I've setup a temporary demo which now plays the Unified Streaming Live DASH stream here Note this fix may not completely solve issues with playing these types of assets. While I've now had the above stream playing continuously for almost a day without issue, I am seeing similar streams stop randomly. It seems to stop fetching the manifest entirely, and I'm not seeing anything that stands out in the debug log. When this happens, |
PRs are also built automatically via netlify, so, your changes are lives here https://deploy-preview-1092--videojs-http-streaming.netlify.app/ (see the netlify checks) |
I believe I've identified the next issue. For an HLS stream, when changing quality, the media manifest for the old quality is no longer refreshed. Unfortunately, this is also being applied for DASH streams. Note this isn't an issue with the Unified Streaming Live DASH stream since it only has one quality. |
Added a What ramifications does this have on switching from demuxed to muxed audio? As it was, I'm not sure those conditions would have evaluated true. |
12ff826
to
8692dc7
Compare
8692dc7
to
6967321
Compare
Codecov Report
@@ Coverage Diff @@
## main #1092 +/- ##
==========================================
- Coverage 86.31% 86.30% -0.01%
==========================================
Files 39 38 -1
Lines 9807 9079 -728
Branches 2279 2061 -218
==========================================
- Hits 8465 7836 -629
+ Misses 1342 1243 -99
Continue to review full report at Codecov.
|
should allow tests to pass now
52e1549
to
b0dcefd
Compare
11a0115
to
90019fd
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
This should bring support for live DASH assets that utilize timeShift (sliding window) and$Time$ as opposed to $Number$ (no startNumber attribute). Would fix #256
For such manifests, mpd-parser will always set
mediaSequence
to 1. Consequently, SegmentLoader will be unaware of any live window shifts.Specific Changes proposed
Instead, we need to derive an appropriate
mediaSequence
on each playlist update so the window can shift accordingly. We can take the first segment of the new playlist and find its index in the old playlist (we can search by the segment'suri
). This is the number of shifts, or change inmediaSequence
.In the event the segment isn't found (e.g. network issues preventing manifest update), we can instead advance the entire length of existing segments, which should then simulate falling behind the live window and trigger a reseek.
This derivation only needs to occur for this type of DASH asset, but it should not cause issues otherwise since it should end up deriving the same value. It should generally be sufficient to check that the new playlist has a
mediaSequence
of 1, but maybe there's a more definitive way? We could then also check that the new sequence <= the old one (to exclude a playlist naturally going from 0 to 1).Requirements Checklist