diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js index 0ccc552ae4..8289ce6ef0 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -881,7 +881,6 @@ shaka.media.StreamingEngine = class { // The playhead might be seeking on startup, if a start time is set, so // start "seeked" as true. seeked: true, - needsResync: false, recovering: false, hasError: false, operation: null, @@ -1248,11 +1247,6 @@ shaka.media.StreamingEngine = class { shaka.log.v1( logPrefix, 'looking up segment from new stream endTime:', time); - // Using a new iterator means we need to resync the stream in sequence - // mode. The buffered range might not align perfectly with the last - // segment end time, so we may end up repeating a segment. Resyncing - // makes this safe to do. - mediaState.needsResync = true; mediaState.segmentIterator = mediaState.stream.segmentIndex.getIteratorForTime(time); const ref = mediaState.segmentIterator && @@ -1879,9 +1873,7 @@ shaka.media.StreamingEngine = class { // Across discontinuity bounds, we should resync timestamps for // sequence mode playbacks. The next segment appended should // land at its theoretical timestamp from the segment index. - if (reference.discontinuitySequence != lastDiscontinuitySequence || - mediaState.needsResync) { - mediaState.needsResync = false; + if (reference.discontinuitySequence != lastDiscontinuitySequence) { operations.push(this.playerInterface_.mediaSourceEngine.resync( mediaState.type, reference.startTime)); } @@ -2591,7 +2583,6 @@ shaka.media.StreamingEngine.PlayerInterface; * clearBufferSafeMargin: number, * clearingBuffer: boolean, * seeked: boolean, - * needsResync: boolean, * adaptation: boolean, * recovering: boolean, * hasError: boolean, @@ -2646,9 +2637,6 @@ shaka.media.StreamingEngine.PlayerInterface; * True indicates that the presentation just seeked. * @property {boolean} adaptation * True indicates that the presentation just automatically switched variants. - * @property {boolean} needsResync - * True indicates that the stream needs to be resynced in sequence mode, - * regardless of discontinuity sequence. * @property {boolean} recovering * True indicates that the last segment was not appended because it could not * fit in the buffer.