diff options
Diffstat (limited to 'youtube/static/js/av-merge.js')
-rw-r--r-- | youtube/static/js/av-merge.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/youtube/static/js/av-merge.js b/youtube/static/js/av-merge.js index f6ea007..84e121c 100644 --- a/youtube/static/js/av-merge.js +++ b/youtube/static/js/av-merge.js @@ -283,10 +283,9 @@ Stream.prototype.checkBuffer = async function() { if (i < this.sidx.entries.length && !this.sidx.entries[i].requested) { this.fetchSegment(i); - // We are playing the last segment and we have it. + // We have all the segments until the end // Signal the end of stream - } else if (currentSegmentIdx == this.sidx.entries.length - 1 - && this.sidx.entries[currentSegmentIdx].have) { + } else if (i == this.sidx.entries.length) { if (this.streamType == 'audio') this.avMerge.audioEndOfStream(); else |