DEV Community

Discussion on: Let’s Build a Video Chat App with JavaScript and WebRTC

Collapse
 
levincem profile image
levincem

Hi,

Great tutorial, but i have issues to make it work..

It only displays the local stream, i can't find out why..
The remote stream seems to connect, but it does not trigger the handleRemoteStreamAdded function ?

I've just made a few changes (the correction below for the var numClients, and the deprecated "onaddstream" replaces by "ontrack"

I'm not really used to js development (PHP mostly) so debugging is not easy !

A little help/advices would be much appreciated !

Here is my console log :
Attempted to create or join room foo main.js:32:11
Going to find Local media main.js:105:9
Getting user media with constraints
Object { audio: true, video: true }
main.js:124:9
Message from server: Received request to create or join room foo main.js:63:15
Message from server: Room foo now has 0 client(s) main.js:63:15
Message from server: Client ID z-44yxk-0TY0syYKAAAF joined room foo main.js:63:15
joined: foo main.js:57:11
Adding local stream. main.js:114:11
Client sending message: got user media foo main.js:96:11
Message from server: Client said: got user media main.js:63:15
Client received message: bye foo main.js:70:13
Another peer made a request to join room foo main.js:50:11
This peer is the initiator of room foo! main.js:51:11
Client received message: got user media foo main.js:70:13

maybeStart() false
MediaStream { id: "{792c32de-cee6-4511-a716-97bad26679b7}", active: true, onaddtrack: null, onremovetrack: null }
true main.js:128:11
creating peer connection main.js:130:13
WebRTC: Using more than two STUN/TURN servers slows down discovery 2 9fa9772d-8c14-4df4-897f-9b6b84dd36ac:275
WebRTC: Using five or more STUN/TURN servers causes problems 3 9fa9772d-8c14-4df4-897f-9b6b84dd36ac:275
Created RTCPeerConnnection main.js:154:13
isInitiator false main.js:134:13






Thanks for any help