Set timestampOffset to the end of the current playback TimeRange when we encount…
…er a discontinuity in the playlist
Showing
1 changed file
with
3 additions
and
6 deletions
... | @@ -945,7 +945,6 @@ videojs.Hls.prototype.drainBuffer = function(event) { | ... | @@ -945,7 +945,6 @@ videojs.Hls.prototype.drainBuffer = function(event) { |
945 | segment, | 945 | segment, |
946 | decrypter, | 946 | decrypter, |
947 | segIv, | 947 | segIv, |
948 | segmentOffset = 0, | ||
949 | // ptsTime, | 948 | // ptsTime, |
950 | segmentBuffer = this.segmentBuffer_; | 949 | segmentBuffer = this.segmentBuffer_; |
951 | 950 | ||
... | @@ -1030,11 +1029,9 @@ videojs.Hls.prototype.drainBuffer = function(event) { | ... | @@ -1030,11 +1029,9 @@ videojs.Hls.prototype.drainBuffer = function(event) { |
1030 | // this.tech_.el().vjs_discontinuity(); | 1029 | // this.tech_.el().vjs_discontinuity(); |
1031 | // } | 1030 | // } |
1032 | 1031 | ||
1033 | // determine the timestamp offset for the start of this segment | 1032 | if (segment.discontinuity) { |
1034 | segmentOffset = this.playlists.expiredPostDiscontinuity_ + this.playlists.expiredPreDiscontinuity_; | 1033 | this.sourceBuffer.timestampOffset = this.findCurrentBuffered_().end(0); |
1035 | segmentOffset += videojs.Hls.Playlist.duration(playlist, | 1034 | } |
1036 | playlist.mediaSequence, | ||
1037 | playlist.mediaSequence + mediaIndex); | ||
1038 | 1035 | ||
1039 | this.sourceBuffer.appendBuffer(bytes); | 1036 | this.sourceBuffer.appendBuffer(bytes); |
1040 | 1037 | ... | ... |
-
Please register or sign in to post a comment