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

Can't create multiple jsmpeg at once #41

Open
mehranmd opened this issue Jan 27, 2022 · 2 comments
Open

Can't create multiple jsmpeg at once #41

mehranmd opened this issue Jan 27, 2022 · 2 comments

Comments

@mehranmd
Copy link

I Have a React application which uses your module to play camera feeds from web socket. when we try to load 2 or more camera at once the camera won't start playing and console log is also empty without any error or warning.

Steps to reproduce the behavior:

  1. put multiple instance of JSMpeg into a 'map' function and create multiple instance of it
  2. when we press "F5" on the browser, the problem resolves, until next time we open the browser again.
  3. I use the latest Chrome, Edge to test this matter
@mehranmd
Copy link
Author

It might be useful, i create my JSMpeg instance like this:

componentDidMount() { new JSMpeg.VideoElement(this.els.videoWrapper, this.props.videoUrl, this.props.options, this.props.overlayOptions); };

@KevinSalmon
Copy link

I have the same behaviour with my Angular app only on Android WebView.

I found a workaround. I create one player at a time. When the first player calls play or load hooks, I instantiate the second player, and so on.

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