DEV Community

loading...

Discussion on: WebRTC - A Simple Video Chat With JavaScript (Part 1)

Collapse
jeffersonxavier profile image
Jefferson Xavier Author

Hi, thanks for your comment.

It's simple, to open stream with voice only just pass the option video with false to getUserMedia() function like

{video: false, audio: true}

To open connection with multiple users the dynamic is same. Use all array received in other-users socket event calling the new RTCPeerConnection to any user and change the variables localConnection and remoteConnection to store a array with all connections initiated or received.