Fix time correction (#706)
* Fix how and when timeCorrection_ was being applied so that it works for Flash * Always apply timeCorrection_ when we haven't learned anything even if playlists have changed * Apply timeCorrection_ directly to the currentTime when calling getMediaIndexForTime so that we can work around bad segment.end metadata in the playlist * Emit an error if we have been stuck in a "timeCorrection" loop for more than 5 fetch attempts * Make sure to clear the timeout before setting another in monitorBuffer_ * Clearer naming of variables * Use timeCorrection_ when a chosen segment is more than 90% buffered * Break out timeCorrection_ functionality into a reusable piece * Added tests of the new timeCorrection_ functionality * Test that timeCorrection is applied even when the segment.end data is misleading * Verify that an error is emitted when we have failed to make progress after 5 time-corrections * Ensure that we only have 1 timer if monitorBuffer_ is called multiple times * Moved percent-buffered check out of checkBuffer_ to fillBuffer_
Showing
2 changed files
with
176 additions
and
61 deletions
-
Please register or sign in to post a comment