I use easyrtc with node.js. The *****:8080/demos/demo_audio_video_simple.html work correct on the same network. But if i try it from 2 different networks i get only a black screen.
After some research I found out, i need a TURN Server, but it doesn't work.
// Load required modules
var http = require("http"); // 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"); // EasyRTC external module
// 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 8080
var webServer = http.createServer(httpApp).listen(8080);
// Start Socket.io so it attaches itself to Express server
var socketServer = io.listen(webServer, {"log level":3});
var myIceServers = [
{"url":"stun:anyfirewall.com:3478"},
{
"url":"turn:anyfirewall.com:443",
"username":"flex*****",
"credential":"32M3KsE*****"
},
{
"url":"turn:anyfirewall.com:443[?transport=tcp]",
"username":"flex*****",
"credential":"32M3Ks*****"
}
];
easyrtc.setOption("appIceServers", myIceServers);
easyrtc.on("getIceConfig", function(connectionObj, callback){
callback(null, myIceServers);
})
// Start EasyRTC server
var rtc = easyrtc.listen(httpApp, socketServer);
What have I done wrong?