Currently when HLS.js freezes it fires several non-fatal "bufferStalled" and "bufferNudgeOnStall" errors before firing a single fatal "bufferStalled" error. All of these errors count as "media" errors, and so _errorCount["media"] is set to 6 or 7 before _handleMediaError() gets called (by the fatal one) - meaning we never attempt _hls.recoverMediaError() or _hls.swapAudioCodec()
Should be a trivial fix of moving the increment/set error count step to within the if (data.fatal) block
Currently when HLS.js freezes it fires several non-fatal "bufferStalled" and "bufferNudgeOnStall" errors before firing a single fatal "bufferStalled" error. All of these errors count as "media" errors, and so
_errorCount["media"]is set to 6 or 7 before_handleMediaError()gets called (by the fatal one) - meaning we never attempt_hls.recoverMediaError()or_hls.swapAudioCodec()Should be a trivial fix of moving the increment/set error count step to within the
if (data.fatal)block