Updates from PR review
Showing
1 changed file
with
6 additions
and
1 deletions
... | @@ -1754,7 +1754,12 @@ test('drainBuffer will not proceed with empty source buffer', function() { | ... | @@ -1754,7 +1754,12 @@ test('drainBuffer will not proceed with empty source buffer', function() { |
1754 | player.hls.segmentBuffer_ = [{mediaIndex: 0, playlist: newMedia, offset: 0, bytes: [0,0,0]}]; | 1754 | player.hls.segmentBuffer_ = [{mediaIndex: 0, playlist: newMedia, offset: 0, bytes: [0,0,0]}]; |
1755 | 1755 | ||
1756 | player.hls.drainBuffer(); | 1756 | player.hls.drainBuffer(); |
1757 | deepEqual(player.hls.segmentBuffer_,compareBuffer,'playlist remains unchanged'); | 1757 | |
1758 | /* Normally, drainBuffer() calls segmentBuffer.shift(), removing a segment from the stack. | ||
1759 | * Comparing two buffers to ensure no segment was popped verifies that we returned early | ||
1760 | * from drainBuffer() because sourceBuffer was empty. | ||
1761 | */ | ||
1762 | deepEqual(player.hls.segmentBuffer_, compareBuffer, 'playlist remains unchanged'); | ||
1758 | 1763 | ||
1759 | player.hls.playlists.media = oldMedia; | 1764 | player.hls.playlists.media = oldMedia; |
1760 | }); | 1765 | }); | ... | ... |
-
Please register or sign in to post a comment