You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No matter the video src, onError should trigger if there was a problem loading the video.
Native video error event works as expected for all cases: https://jsfiddle.net/ar8p41so/4/
Environment:
Framework: React
Meta Framework: Next.js
Node: 18.16.0
Browser: Chrome / any
The text was updated successfully, but these errors were encountered:
Current Behavior:
MediaPlayer
onError
event will only trigger when thesrc
contains a file type/extension in the name.For example:
https://justsomeinvalidwebsite.com/video.mp4
→ Triggers onError, media-player's<shadow-root>
contains video.https://justsomeinvalidwebsite.com/video
→ Does not trigger onError, media-player's<shadow-root>
is empty.notaurl.mp4
→ Triggers onError, media-player's<shadow-root>
contains video.notaurl
→ Does not trigger onError, media-player's<shadow-root>
is empty.Sandbox to demonstrate issue: https://codesandbox.io/p/sandbox/zealous-mountain-p49kyx?file=/app/page.tsx:22,33
(not sure why the last video doesn't load in codesandbox, but the onError bug still applies).
(Bug may also apply to
onHlsError
,onPlayFail
)Expected Behavior:
No matter the video src,
onError
should trigger if there was a problem loading the video.Native video
error
event works as expected for all cases: https://jsfiddle.net/ar8p41so/4/Environment:
The text was updated successfully, but these errors were encountered: