muxinc / media-chrome

Custom elements (web components) for making audio and video player controls that look great in your website or app.
https://media-chrome.org
MIT License
1.77k stars 71 forks source link

How to get error messages #776

Closed jffluis closed 11 months ago

jffluis commented 11 months ago

Hi. I'm running into an issue that some of my video link are broken an need to alert the user that video is returning 404. There is an API for that?

Thank you.

luwes commented 11 months ago

Thanks for the feedback!

Error dialogs are not included in the library yet but they can be added manually with listening to the video error event and showing an overlay with the message of video.error.

See https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error_event

jffluis commented 11 months ago

ty just found a way to do it.