|
@@ -146,6 +146,11 @@
|
|
|
this.startTime = false;
|
|
|
this.videoActive = false;
|
|
|
// this.client = false;
|
|
|
+
|
|
|
+ // call leaveVideoVisitAsPro
|
|
|
+ $.post('/api/clientVideoVisit/leaveVideoVisitAsPro', {}, function(_data) {
|
|
|
+ console.log(_data);
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
initOpenTok: function() {
|
|
@@ -175,9 +180,6 @@
|
|
|
var sessionId = this.otSessionId;
|
|
|
var token = this.selfToken;
|
|
|
|
|
|
- // destroy if existing
|
|
|
- // self.hangUp();
|
|
|
-
|
|
|
self.otSession = OT.initSession(apiKey, sessionId);
|
|
|
|
|
|
// peer connected
|
|
@@ -270,18 +272,8 @@
|
|
|
|
|
|
// if no other parties in call, hang up
|
|
|
if(!$('[data-stream]:not([data-stream="' + self.selfStreamId + '"])').length) {
|
|
|
- // self.hangUp();
|
|
|
- console.warn('No other parties in the call!');
|
|
|
- // new Noty({
|
|
|
- // theme: 'mint',
|
|
|
- // type: 'info',
|
|
|
- // text: 'All other participants have left the call',
|
|
|
- // progressBar: false,
|
|
|
- // timeout: 2500,
|
|
|
- // }).show();
|
|
|
self.startTime = 0;
|
|
|
self.started = false;
|
|
|
- // self.hangUp();
|
|
|
self.noOneElseInCall = true;
|
|
|
}
|
|
|
}
|
|
@@ -359,7 +351,9 @@
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
- self.hangUp();
|
|
|
+ self.startTime = 0;
|
|
|
+ self.started = false;
|
|
|
+ self.noOneElseInCall = true;
|
|
|
}
|
|
|
|
|
|
// turn pro video off
|