Don't patch HLS until after MediaSource opens
If Flash-based source buffers are being used, the HLS source handler isn't available until later in the player lifecycle. Wait a bit before spying on drainBuffer() to account for that possible delay.
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -3079,12 +3079,12 @@ test('does not process update end until buffered value has been set', function() | ... | @@ -3079,12 +3079,12 @@ test('does not process update end until buffered value has been set', function() |
3079 | src: 'master.m3u8', | 3079 | src: 'master.m3u8', |
3080 | type: 'application/vnd.apple.mpegurl' | 3080 | type: 'application/vnd.apple.mpegurl' |
3081 | }); | 3081 | }); |
3082 | |||
3083 | openMediaSource(player); | ||
3082 | origDrainBuffer = player.tech_.hls.drainBuffer; | 3084 | origDrainBuffer = player.tech_.hls.drainBuffer; |
3083 | player.tech_.hls.drainBuffer = function() { | 3085 | player.tech_.hls.drainBuffer = function() { |
3084 | drainBufferCallCount++; | 3086 | drainBufferCallCount++; |
3085 | }; | 3087 | }; |
3086 | |||
3087 | openMediaSource(player); | ||
3088 | standardXHRResponse(requests.shift()); // master | 3088 | standardXHRResponse(requests.shift()); // master |
3089 | standardXHRResponse(requests.shift()); // media | 3089 | standardXHRResponse(requests.shift()); // media |
3090 | 3090 | ... | ... |
-
Please register or sign in to post a comment