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

Error event not being trigger when using url as array #1692

Open
duranmla opened this issue Oct 12, 2023 · 1 comment
Open

Error event not being trigger when using url as array #1692

duranmla opened this issue Oct 12, 2023 · 1 comment

Comments

@duranmla
Copy link

Current Behavior

The video player stays on error state without triggering error event

Expected Behavior

I should get the error event called so I can handle it as expected. On the code sandbox below, I should receive an error on the video player with multiple urls as I do with the one with only one url.

Steps to Reproduce

  1. Try to attach an error callback to a video with multiple wrong urls
  2. Your callback never gets fired

Environment

https://codesandbox.io/s/condescending-water-m6qdjr?file=/src/App.js

@anampartho
Copy link
Contributor

anampartho commented Oct 16, 2023

@duranmla This particular issue was happening because, ReactPlayer uses source tags to render multiple videos. Errors on these tags does not trigger the players error event. Hence you were not seeing the output of your error handler.

I have raised a pull request for the fix.

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

2 participants