I have scoured the web and tried every hack and quirk out there, yet still cannot get socket io client api call to resolve through easyrtc. I am using iisnode and express 3.x, along with
var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('
socket.io').listen(server);
server.listen(process.env.PORT);
var fs = require('fs');
var easyrtc = require('easyrtc');
// Start EasyRTC server
var rtc = easyrtc.listen(app, io);
app.use(express.static(__dirname + "/static/"));
app.get('/nodejs/videoconference', function(req, res) {
var file = fs.readFileSync(__dirname + '/static/vc.html', {encoding: 'utf8'});
res.send(file);
//res.send('hello from [carrie] in pmwebs - would serve:' + path.join(__dirname + '/static/vc.html'));
});
io.configure(function(){
io.set('transports',['xhr-polling']); //Use long-polling instead of websockets!
});
io.on('connection', function(socket) {
//emit and listen messages
console.log('hello world i am a hot socket');
});
<html>
<head>
<title>Video Conference</title>
<link rel="stylesheet" type="text/css" href="/easyrtc/easyrtc.css" />
<script src="/easyrtc/easyrtc.js"></script>
<script>
var selfEasyrtcid = "";
function connect() {
easyrtc.enableDebug(true);
easyrtc.setVideoDims(640,480);
easyrtc.setRoomOccupantListener(convertListToButtons);
easyrtc.easyApp("emmchat", "selfVideo", ["callerVideo"], loginSuccess, loginFailure);
}
function clearConnectList() {
var otherClientDiv = document.getElementById('otherClients');
while (otherClientDiv.hasChildNodes()) {
otherClientDiv.removeChild(otherClientDiv.lastChild);
}
}
function convertListToButtons (roomName, data, isPrimary) {
clearConnectList();
var otherClientDiv = document.getElementById('otherClients');
for(var easyrtcid in data) {
var button = document.createElement('button');
button.onclick = function(easyrtcid) {
return function() {
performCall(easyrtcid);
};
}(easyrtcid);
var label = document.createTextNode(easyrtc.idToName(easyrtcid));
button.appendChild(label);
otherClientDiv.appendChild(button);
}
}
function performCall(otherEasyrtcid) {
easyrtc.hangupAll();
var successCB = function() {};
var failureCB = function() {};
easyrtc.call(otherEasyrtcid, successCB, failureCB);
}
function loginSuccess(easyrtcid) {
selfEasyrtcid = easyrtcid;
document.getElementById("iam").innerHTML = "I am " + easyrtc.cleanId(easyrtcid);
}
function loginFailure(errorCode, message) {
easyrtc.showError(errorCode, message);
}
</script>
</head>
<body onload="connect()"><!---->
<div id="demoContainer">
<div id="connectControls">
<div id="iam">Not yet connected...</div>
<br />
<strong>Connected users:</strong>
<div id="otherClients"></div>
</div>
<div id="videos">
<video autoplay="autoplay" class="easyrtcMirror" id="selfVideo" muted="muted" volume="0" ></video>
<div style="position:relative;float:left;">
<video autoplay="autoplay" id="callerVideo"></video>
</div>
</div>
</div>
</body>
</html>
socket.io.js:1659 GET https://192.168.1.126/socket.io/1/?t=1438967991355 404 (Not Found)Socket.handshake @ socket.io.js:1659Socket.connect @ socket.io.js:1699Socket @ socket.io.js:1551io.connect @ socket.io.js:94connectToWSServer @ easyrtc.js:4464connect @ easyrtc.js:5468postGetUserMedia @ easyrtc.js:5391initMediaSource.tryToGetSize @ easyrtc.js:2062
easyrtc.js:814 debug 2015-08-07T17:19:51.453Z : cfg={"userSettings":{"sharingAudio":true,"sharingVideo":true,"sharingData":false,"nativeVideoWidth":640,"nativeVideoHeight":480,"windowWidth":1920,"windowHeight":304,"screenWidth":1920,"screenHeight":1200,"cookieEnabled":true,"language":"en-US"}} [ at sendDeltas (
https://192.168.1.126/easyrtc/easyrtc.js:4663:26)]
easyrtc.js:814 debug 2015-08-07T17:19:51.454Z : sending socket message {"msgType":"setUserCfg","msgData":{"setUserCfg":{"userSettings":{"sharingAudio":true,"sharingVideo":true,"sharingData":false,"nativeVideoWidth":640,"nativeVideoHeight":480,"windowWidth":1920,"windowHeight":304,"screenWidth":1920,"screenHeight":1200,"cookieEnabled":true,"language":"en-US"}}}} [ at sendSignalling (
https://192.168.1.126/easyrtc/easyrtc.js:2734:22)]