forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(hls): Fixed buffering issue with live HLS (shaka-project#4002)
HLS now appends segments in sequence mode. In order to handle seeks, we set the timestampOffset property on SourceBuffer to the startTime of the segment. This is done after every seek, or on startup. For non-sequence-mode content (DASH), we normally set timestampOffset based on the Period structure. This should be suppressed in sequence mode, though, where only the reference startTime matters. The buffering issue was caused by two things in combination: 1. The HLS parser set meaningless timestampOffset values that would change when a playlist was updated 2. We would use those timestampOffset values in setStreamProperties, even though this should be skipped in sequence mode These two things in combination would lead MediaSourceEngine to start inserting segments near the start of the presentation, rather than at the live edge. This changes MediaSourceEngine so that in sequence mode, timestampOffset is ignored in setStreamProperties. This also cleans up the HLS parser to set each reference's timestampOffset to 0, since they should be ignored anyway.
- Loading branch information
Showing
7 changed files
with
50 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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