Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

How to do error handling with streams that have codec problems or broken? #44

Open
jffluis opened this issue Dec 3, 2023 · 1 comment

Comments

@jffluis
Copy link

jffluis commented Dec 3, 2023

just want to catch error and just just a js alert is enough. Can u help?

How can i get a js object to get and error by Hls.js? I'm using vanilla js.

<hls-video
src="myurl"
slot="media"
autoplay
controls
playsinline>
</hls-video>
@luwes
Copy link
Contributor

luwes commented Jan 12, 2024

listen for the error event and check the .error property similar to the native video element.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error_event
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error

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

No branches or pull requests

2 participants