I'm having trouble getting the y-webrtc provider to work between different browsers. It seems like the creator isn't planning to fix it anytime soon. While I've dug into the package, I'm not quite sure what the issue is—maybe it's related to yjs or peerjs, I'm not sure. I do know that it works fine within the same browser using Y-Broadcast, but I'm looking for a way to get it working across browsers, especially for a multiplayer game involving 4 to 8 players. Any advice on troubleshooting this or understanding P2P connections would be greatly appreciated! Here's a link to the GitHub issue I'm referencing.
2 Answers
It looks like the issue isn't clearly identified yet, but it probably has to do with how y-webrtc utilizes peerjs. Given that y-webrtc is a pretty lightweight library, I suggest forking it and adding some debugging statements to track where things may be failing. Just a heads-up: even if you get it working, setting up a signaling server and potentially a TURN server can add to the complexity, so you might want to consider having a dedicated server too.
It's a bummer to hear that the dev isn't focusing on y-webrtc. I was planning to use Yjs in an upcoming project, but I might have to think twice now. The idea of P2P is neat, but the hurdles may not be worth it. Just a heads up!
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically