diff --git a/src/videojs-hls.js b/src/videojs-hls.js index 41c2641f5..d26381664 100644 --- a/src/videojs-hls.js +++ b/src/videojs-hls.js @@ -370,12 +370,20 @@ var // expose the HLS plugin state player.hls.readyState = function() { - if (!player.hls.media) { + if (!player.hls.playlists.media()) { return 0; // HAVE_NOTHING } return 1; // HAVE_METADATA }; + // loaded in error state fix + if (player.error() && player.error().code === 4 && srcUrl) { + player.error(null); + player.one('play', function() { + player.trigger('firstplay'); + }); + } + player.on('seeking', function() { var currentTime = player.currentTime(); player.hls.mediaIndex = getMediaIndexByTime(player.hls.playlists.media(),