This repository has been archived by the owner on Jan 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 793
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…shorter than playlist segment duration
The more video is buffered, the more accurate our calculation of currentTime becomes. Make sure we don't artificially anchor our currentTime calculation and then get out of sync once more video has been downloaded.
Break segmentsDuration up into more manageable parts.
Instead of calculating the duration by accumulating spans with and without PTS info from left to right, find the largest continuous span that has PTS information and then add up EXT-INF based durations before and after those spans. To make this proces simpler, split the interval we are calculating into segment sequences with continuous timestamps. Add segment indices for discontinuities to the m3u8 parser to support splitting intervals.
Playlist.duration() does a more comprehensive job of managing calculations with PTS values and discontinuities so remove reference on segmentParser.
Also, closes #314 |
@@ -375,7 +375,8 @@ | |||
|
|||
// the manifest is empty until the parse stream begins delivering data | |||
this.manifest = { | |||
allowCache: true | |||
allowCache: true, | |||
discontinuityStarts: [] |
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.
so discontinuityStarts
end up being a list of indexes pointing at segments that begin a discontinuity?
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.
Yes. It makes splitting intervals into continuous spans a lot simpler.
This function was obsoleted by Playlist.duration() and unused.
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pulled in #279 so that seeking "between segments" does not cause an error. Updated duration calculation so that PTS-based results are used for the largest span of segments possible. Previously, PTS values were only used to calculate duration when they formed a continuous interval. This is a lot more conservative than necessary because PTS values are directly comparable unless there is a discontinuity between their containing segments. This method should result in more accurate calculations and get rid of some unnecessary segment iteration.