Browse Source
Fix time correction.. some more (#712)
Fix time correction.. some more (#712)
* Fudge segments that are reported as having a zero-second duration * The fetcher logic basically ignores segments with a duration of zero. Give them a tiny duration so that the fetcher will "see" these segments. * Added tests for and fixed getSegmentBufferedPercent_ calculations * Now returns the percent buffered of the entire segment duration instead of the "adjusted" duration * Handles segments reported as having a zero-duration * Reduced the number of segments that we will attempt to "timeCorrect" when the segment chosen by `checkBuffer_` is already more than 90% buffered to 1 * No longer trigger errors from `timeCorrection_` handling, returning to the previous behavior * Use the tech's setCurrentTime function in segment loaders * Moved getSegmentBufferedPercent to `Ranges` module * Moved correction for zero-duration segments from parse-stream to parser properpull/714/head

9 changed files with 264 additions and 100 deletions
-
9src/m3u8/parser.js
-
2src/master-playlist-controller.js
-
76src/ranges.js
-
94src/segment-loader.js
-
75test/ranges.test.js
-
49test/segment-loader.test.js
-
35test/test-helpers.js
-
16utils/manifest/zeroDuration.js
-
8utils/manifest/zeroDuration.m3u8
@ -0,0 +1,16 @@ |
|||
{ |
|||
"allowCache": true, |
|||
"mediaSequence": 0, |
|||
"playlistType": "VOD", |
|||
"segments": [ |
|||
{ |
|||
"duration": 0.01, |
|||
"timeline": 0, |
|||
"uri": "http://example.com/00001.ts" |
|||
} |
|||
], |
|||
"targetDuration": 10, |
|||
"endList": true, |
|||
"discontinuitySequence": 0, |
|||
"discontinuityStarts": [] |
|||
} |
@ -0,0 +1,8 @@ |
|||
#EXTM3U |
|||
#EXT-X-PLAYLIST-TYPE:VOD |
|||
#EXT-X-TARGETDURATION:10 |
|||
|
|||
#EXTINF:0, |
|||
http://example.com/00001.ts |
|||
#ZEN-TOTAL-DURATION:57.9911 |
|||
#EXT-X-ENDLIST |
Write
Preview
Loading…
Cancel
Save
Reference in new issue