-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(FEC-8233): handle media & error recovering #61
Conversation
renaming the callback function, cleaning the event listener on adapter destruction.
src/hls-adapter.js
Outdated
@@ -678,9 +699,20 @@ export default class HlsAdapter extends BaseMediaSourceAdapter { | |||
HlsAdapter._logger.error("cannot recover, last media error recovery failed"); | |||
} | |||
} | |||
this._videoElement.addEventListener(EventType.LOADED_METADATA, this._onRecoveredCallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@odedhutzler you would want to this only if (recover) { ... }
.
Actually, because we only add the listener after we call _recoverDecodingError
or _recoverSwapAudioCodec
there's a chance that this might not even pick up, so better return this to be inlined twice, above and before each call to the recover handlers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@odedhutzler please see failing test
If the media recovered successfully, trigger media recovered event
CheckLists