|
@@ -216,6 +216,12 @@
|
|
// self disconnected
|
|
// self disconnected
|
|
self.otSession.on('sessionDisconnected', function sessionDisconnected(event) {
|
|
self.otSession.on('sessionDisconnected', function sessionDisconnected(event) {
|
|
console.log('You were disconnected from the session.', event.reason);
|
|
console.log('You were disconnected from the session.', event.reason);
|
|
|
|
+
|
|
|
|
+ // turn client video off
|
|
|
|
+ $.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
|
|
+ console.log(_data);
|
|
|
|
+ });
|
|
|
|
+
|
|
// in case of accidental disconnection
|
|
// in case of accidental disconnection
|
|
self.initOpenTok();
|
|
self.initOpenTok();
|
|
});
|
|
});
|
|
@@ -244,6 +250,10 @@
|
|
}, 1000);
|
|
}, 1000);
|
|
self.started = true;
|
|
self.started = true;
|
|
|
|
|
|
|
|
+ // turn client video on
|
|
|
|
+ $.post('/api/clientVideoVisit/turnClientVideoOn', {}, function(_data) {
|
|
|
|
+ console.log(_data);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
self.publisher.on('streamDestroyed', function(event) {
|
|
self.publisher.on('streamDestroyed', function(event) {
|
|
@@ -259,6 +269,11 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // turn client video off
|
|
|
|
+ $.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
|
|
+ console.log(_data);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
// Connect to the session
|
|
// Connect to the session
|