|
@@ -154,7 +154,6 @@
|
|
|
}
|
|
|
},
|
|
|
timeDisplay: function() {
|
|
|
- // this.time = new Date().getTime() - this.startTime;
|
|
|
var seconds = this.time / 1000,
|
|
|
minutes = parseInt(seconds / 60, 10);
|
|
|
seconds = parseInt(seconds % 60, 10);
|
|
@@ -221,6 +220,17 @@
|
|
|
pro.type = _data.hcpCategory;
|
|
|
pro.status = 'active';
|
|
|
|
|
|
+ @if($guest)
|
|
|
+ var self = this;
|
|
|
+ if(!this.startTime) {
|
|
|
+ this.startTime = new Date().getTime();
|
|
|
+ window.setInterval(function() {
|
|
|
+ self.time = new Date().getTime() - self.startTime;
|
|
|
+ }, 1000);
|
|
|
+ this.started = true;
|
|
|
+ }
|
|
|
+ @endif
|
|
|
+
|
|
|
// TODO: init pro stream
|
|
|
},
|
|
|
leaveCall: function() {
|
|
@@ -282,6 +292,16 @@
|
|
|
);
|
|
|
|
|
|
// WS subscriptions
|
|
|
+
|
|
|
+ @if(!$guest)
|
|
|
+ if(!self.startTime) {
|
|
|
+ self.startTime = new Date().getTime();
|
|
|
+ window.setInterval(function() {
|
|
|
+ self.time = new Date().getTime() - self.startTime;
|
|
|
+ }, 1000);
|
|
|
+ self.started = true;
|
|
|
+ }
|
|
|
+ @endif
|
|
|
@endif
|
|
|
|
|
|
// TODO: init own stream
|