c553bc5d by David LaPalomento

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.
1 parent ac8cb5e1
......@@ -3079,12 +3079,12 @@ test('does not process update end until buffered value has been set', function()
src: 'master.m3u8',
type: 'application/vnd.apple.mpegurl'
});
openMediaSource(player);
origDrainBuffer = player.tech_.hls.drainBuffer;
player.tech_.hls.drainBuffer = function() {
drainBufferCallCount++;
};
openMediaSource(player);
standardXHRResponse(requests.shift()); // master
standardXHRResponse(requests.shift()); // media
......