user1621010
user1621010

Reputation: 81

Video chat (webRTC) with Chrome to Chrome doesn't work

I try to build a simple video chat between two peers. This is the structure :

I use Mozilla "45.0.1" and Chrome "49.0.2623.112 m"

I use the code from https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling for signal server and clients with some changes



I use public STUN/TURN server :

var STUN = {
    urls: 'stun:stun.l.google.com:19302',
};
var TURN = {
    urls: 'turn:64.233.184.127:19305',
    credential: ***
    username: ***
};

I don't think it's a problem with the code (client or signal server) since it works with Firefox to Firefox and "local Chrome" to "external" Chrome.

EDIT :

Today, I used the code I found from easyRTC.

I had the same results :

I made some small changes to the server for https and port(6503): (note : I've created a port forward 6502->6503)

// Load required modules
var http    = require("https");              // http server core module
var express = require("express");           // web framework external module
var io      = require("socket.io");         // web socket external module
var easyrtc = require("../");           // EasyRTC external module
var fs = require('fs')

// Setup and configure Express http server. Expect a subfolder called "static" to be the web root.
var httpApp = express();
httpApp.use(express.static(__dirname + "/static/"));

// Start Express http server on port 6503
//var webServer = http.createServer(httpApp).listen(6503);

var options = {
    key: fs.readFileSync('key.key'),
    cert: fs.readFileSync('cert.crt')
};

// Our HTTP server does nothing but service WebSocket
// connections, so every request just returns 404. Real Web
// requests are handled by the main server on the box. If you
// want to, you can return real HTML here and serve Web content.
var webServer = http.createServer(options, httpApp).listen(6503);

The messages of the server :


debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Room [default] Running func 'connectionRoomObj.emitRoomDataDelta' debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Room [default] Running func 'connectionRoomObj.generateRoomDataDelta' debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [roomData] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [offer] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [offer] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC message received of type [easyrtc_streamReceived] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcMsg' with msgType [easyrtc_streamReceived] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [answer] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [answer] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [setUserCfg] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] WebRTC setUserCfg command received. This feature is not yet complete. debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcCmd' with msgType [candidate] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC message received of type [easyrtc_streamReceived] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] EasyRTC command received with msgType [setUserCfg] debug - EasyRTC: [easyrtc.audioVideoSimple][LHX9gZKB__gYlPeUo_gW] WebRTC setUserCfg command received. This feature is not yet complete. debug - EasyRTC: [easyrtc.audioVideoSimple][9dl9HdL-TPqwCMTeo_gX] Running func 'onEmitEasyrtcMsg' with msgType [easyrtc_streamReceived]


So, I proved that the code is not the problem. Does anyone have any idea?

Upvotes: 0

Views: 652

Answers (1)

user1621010
user1621010

Reputation: 81

I found the problem. The problem was that the public TURN server I used, changes the username/password every x minutes. I haven't noticed this, so I used the same username/password. When I changed username/password then everything worked fine for Firefox, Chrome, Opera and combinations of them.

Upvotes: 0

Related Questions