|
@@ -222,12 +222,6 @@
|
|
|
// turn client video off
|
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
|
console.log(_data);
|
|
|
-
|
|
|
- // stop heart beat
|
|
|
- if(self.heartbeatTimer) {
|
|
|
- window.clearInterval(self.heartbeatTimer);
|
|
|
- self.heartbeatTimer = false;
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
// in case of accidental disconnection
|
|
@@ -262,12 +256,7 @@
|
|
|
$.post('/api/clientVideoVisit/turnClientVideoOn', {}, function(_data) {
|
|
|
console.log(_data);
|
|
|
|
|
|
- // start heart beat
|
|
|
- self.heartbeatTimer = window.setInterval(function() {
|
|
|
- $.post('/api/clientVideoVisit/registerClientVideoHeartbeat', {}, function(_data) {
|
|
|
- console.log(_data);
|
|
|
- });
|
|
|
- }, 5000);
|
|
|
+
|
|
|
|
|
|
});
|
|
|
});
|
|
@@ -289,13 +278,6 @@
|
|
|
// turn client video off
|
|
|
$.post('/api/clientVideoVisit/turnClientVideoOff', {}, function(_data) {
|
|
|
console.log(_data);
|
|
|
-
|
|
|
- // stop heart beat
|
|
|
- if(self.heartbeatTimer) {
|
|
|
- window.clearInterval(self.heartbeatTimer);
|
|
|
- self.heartbeatTimer = false;
|
|
|
- }
|
|
|
-
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -471,6 +453,13 @@
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
+ // start heart beat
|
|
|
+ self.heartbeatTimer = window.setInterval(function() {
|
|
|
+ $.post('/api/clientVideoVisit/registerClientVideoHeartbeat', {}, function(_data) {
|
|
|
+ console.log(_data);
|
|
|
+ });
|
|
|
+ }, 5000);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
</script>
|