muaz-khan / WebRTC-Experiment

WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
https://www.webrtc-experiment.com/
MIT License
11.77k stars 3.95k forks source link

Video Game Voice Chatting with WebRTC #627

Open nsmith1024 opened 5 years ago

nsmith1024 commented 5 years ago

Hello, I wrote a WebGL/HTML5 video game that runs in browser (JavaScript), and i want my players to have voice chat so they can talk to each other while playing.

So i want to have a headless linux server so that the HTML5 video game code can communicate with the server to create WebRTC voice rooms on the server so players can conference chat with each other wile playing.

I read there is a new API in JavaScript called MediaDevices.getUserMedia() that can use WebRTC for voice conferencing.

Since i really dont know anything about it (there is so many things to know these days) do you know any WebRTC type server that can set up the voice chat rooms and route the voice streams to each other, and also Javascript code in the browser to capture the mic, send streams and play streams from others using WebRTC and MediaDevices.getUserMedia(), or have any code that shows how to do all that??

Any help would be appreciated, thanks!

abdularis commented 4 years ago

You need SFU (Selective Forwarding Unit) for that, there are solution you can use,