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

MediaPlayer onError does not trigger for unknown src #901

Open
giliamverheide opened this issue Aug 15, 2023 · 1 comment
Open

MediaPlayer onError does not trigger for unknown src #901

giliamverheide opened this issue Aug 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@giliamverheide
Copy link

Current Behavior:

MediaPlayer onError event will only trigger when the src contains a file type/extension in the name.
For example:

  • src: https://justsomeinvalidwebsite.com/video.mp4 → Triggers onError, media-player's <shadow-root> contains video.
  • src: https://justsomeinvalidwebsite.com/videoDoes not trigger onError, media-player's <shadow-root> is empty.
  • src: notaurl.mp4 → Triggers onError, media-player's <shadow-root> contains video.
  • src: notaurlDoes 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:

  • Framework: React
  • Meta Framework: Next.js
  • Node: 18.16.0
  • Browser: Chrome / any
@giliamverheide giliamverheide added the bug Something isn't working label Aug 15, 2023
@roshaninet
Copy link

i have same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants