Whilst utilizing the Opentok plugin for video chat (client version - 2.2.5.1 , server Node sdk - 2.2.3), an error occurs 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
In addition, another error is also encountered:
OT.SessionDisconnectEvent{
type: "sessionDisconnected",
cancelable: true,
preventDefault: function,
isDefaultPrevented: function,
reason: "networkDisconnected"
}
Although it states
"reason" : "network disconnected"
, a thorough check confirms that there are no issues with the network connection.
The following code snippet has been utilized:
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 abruptly terminates following this and the publishing ceases. The duration between the start of publishing and disconnection remains consistent at 53 seconds (unsure if this is pertinent).
GruntJS and EmberJS have also been incorporated alongside Opentok.
Any assistance would be greatly appreciated.