While using Opentok plugin for video chat (client version - 2.2.5.1 , server Node sdk - 2.2.3) , i get this error after publishing to the session :
Rumor.Socket: Rumor Socket Disconnected: Connectivity loss was detected as it was too long since the socket received the last PONG message
Along with that i also get this error :
OT.SessionDisconnectEvent{
type: "sessionDisconnected",
cancelable: true,
preventDefault: function,
isDefaultPrevented: function,
reason: "networkDisconnected"
}
It does say "reason" : "network disconnected"
, but i have double checked and nothing seems to wrong with the network connection .
This is the code i have been using :
session = TB.initSession(TOK_API_KEY,session_id);
session.on("sessionDisconnected", function(event) {
console.log("SESSION DISCONNECTED: "+new Date());
console.log(event);
});
session.on('sessionConnected', function(e){
console.log("SESSION CONNECTED");
var prop = {width: 400, height:300, name:"My Video"};
publisher = TB.initPublisher("broadcast_display", prop, function(error) {
if (error) {
console.log('error initializing publisher', error);
} else {
console.log('publisher initialized successfully');
}
});
});
session.connect(token, function(error) {
if (error) {
console.log(error);
} else {
console.log("Published: "+new Date());
session.publish(publisher);
}
});
The session terminates after this and the publishing also stops . The time it takes to disconnect after publishing starts and the disconnection is consistent (53 secs . Not sure if this is relevant) .
I have also been using GruntJS and EmberJS along with Opentok .
Any help ?
This is a known bug in OpenTok when used with EmberJS. This bug has been found and fixed and should be released in the JS update late this week or next week.