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

Play two or more videos in the same page, I have this Error appendBuffer #1687

Open
netodev13 opened this issue Oct 8, 2023 · 2 comments
Open
Labels
Needs more info Please add more information or examples

Comments

@netodev13
Copy link

Hi I'm tryng to play some videos, but I have this Console Error:
[MSEController] > Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source.

I am using react player to play two videos in the same page through a url that I get from a fetch and then from a useEffect and a usestate variable send the value of the url to the component, however there are cases where when rendering the component, I get the error mentioned above and it remains infinite in the console.

The error is MediaError, in OnError event.

What I have been trying is to handle the error and to avoid that it continues showing in the console.

the VideoUrl state variable is the one I use to store the list of url for the videos

thank you in advance and if you need more info to find the solution I will be attentive.
code1
code2

@luwes
Copy link
Collaborator

luwes commented Oct 11, 2023

could you provide a codesandbox online? that will be easier to debug. thanks!

@luwes luwes added the Needs more info Please add more information or examples label Oct 11, 2023
@netodev13
Copy link
Author

netodev13 commented Oct 17, 2023

Hi, thanks for replying, sorry for the delay, I was testing.
Here I send you the link to the test of my code, for politics of my company I can't send the API I'm using.

Now the code is testing with a video previously uploaded to the project, however the problem that arises is when I get the URL of an API, since the video is a stream of a camera and when assigning it to the reactPlayer component is when it generates the error.
https://codesandbox.io/embed/hungry-maxwell-ss84w3?fontsize=14&hidenavigation=1&theme=dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs more info Please add more information or examples
Projects
None yet
Development

No branches or pull requests

2 participants