Skip to content
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

Support shaka error events & player load failure. #13

Open
matvp91 opened this issue Dec 13, 2020 · 0 comments
Open

Support shaka error events & player load failure. #13

matvp91 opened this issue Dec 13, 2020 · 0 comments

Comments

@matvp91
Copy link
Owner

matvp91 commented Dec 13, 2020

Should add an onError event, which will emit a shaka.util.Error, or a custom error if it's originated from the wrapper implementation. The latter happens when player.load rejects it's promise.

This feature definitely needs a bit of thinking because I'd rather not map each shaka event. We're exposing both shaka's player & ui API through an imperative handle, theoretically this should be suffice for binding any shaka related event.

We do need some sort of error handling when an error occurs due to a method call in the wrapper implementation (such as player.load, but that could confuse people if it was named onError, which is too generic. An onPlayerLoadFailed / onPlayerLoadSuccess event might be better in this case. Those integrating this lib can then use controllerRef.current.player.addEventListener, which is the addEventListener method from the shaka instance underneath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant