|
@@ -76,6 +76,8 @@
|
|
selfUserType: 'CLIENT',
|
|
selfUserType: 'CLIENT',
|
|
selfStreamId: '',
|
|
selfStreamId: '',
|
|
noOneElseInCall: true,
|
|
noOneElseInCall: true,
|
|
|
|
+
|
|
|
|
+ heartbeatTimer: false,
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
timeDisplay: function() {
|
|
timeDisplay: function() {
|
|
@@ -220,6 +222,12 @@
|
|
// turn client video off
|
|
// turn client video off
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
console.log(_data);
|
|
console.log(_data);
|
|
|
|
+
|
|
|
|
+ // stop heart beat
|
|
|
|
+ if(self.heartbeatTimer) {
|
|
|
|
+ window.clearInterval(self.heartbeatTimer);
|
|
|
|
+ self.heartbeatTimer = false;
|
|
|
|
+ }
|
|
});
|
|
});
|
|
|
|
|
|
// in case of accidental disconnection
|
|
// in case of accidental disconnection
|
|
@@ -253,6 +261,14 @@
|
|
// turn client video on
|
|
// turn client video on
|
|
$.post('/api/clientVideoVisit/turnClientVideoOn', {}, function(_data) {
|
|
$.post('/api/clientVideoVisit/turnClientVideoOn', {}, function(_data) {
|
|
console.log(_data);
|
|
console.log(_data);
|
|
|
|
+
|
|
|
|
+ // start heart beat
|
|
|
|
+ self.heartbeatTimer = window.setInterval(function() {
|
|
|
|
+ $.post('/api/clientVideoVisit/registerClientVideoHeartbeat', {}, function(_data) {
|
|
|
|
+ console.log(_data);
|
|
|
|
+ });
|
|
|
|
+ }, 5000);
|
|
|
|
+
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
@@ -273,6 +289,13 @@
|
|
// turn client video off
|
|
// turn client video off
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
console.log(_data);
|
|
console.log(_data);
|
|
|
|
+
|
|
|
|
+ // stop heart beat
|
|
|
|
+ if(self.heartbeatTimer) {
|
|
|
|
+ window.clearInterval(self.heartbeatTimer);
|
|
|
|
+ self.heartbeatTimer = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|