-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
support for multiple tab connection #647
Comments
Each tab will need a unique ID because they'll need a unique connection to each other. Each tab would just be another peer. There's no way to keep the same connection across tabs. |
Thank you @jrowny for the update. |
@Jaysojitra13, I think Workers could help you with that. At least that's an optimization I'm planning to do sometime with my project. |
@quentincaffeino , I also tried with the sharedWorkers. But the problem is I'm not able to pass the object of peerjs itself. Here is the reference, https://blog.arnellebalane.com/sending-data-across-different-browser-tabs-6225daac93ec. Let me know if you found any solution. |
@Jaysojitra13, And you won't be able because they don't share any mutual memory and all connection between worker and client is going through binary data channel. I don't understand why would you want to pass peerjs instance. The solution is to use messaging between worker and a client. |
When I establish a connection using perrjs in one tab of chrome, it's working properly. But when I open a new tab, it again tries to make a connection. So it throws an error like "ID_IS_TAKEN".
Usecase is when I open multiple tabs, the connection should remain the same across all the tabs.
Is there any way to prevent this?
The text was updated successfully, but these errors were encountered: