Ver Fonte

fixed hungup for pro

Josh há 4 anos atrás
pai
commit
4366b0ba6f
1 ficheiros alterados com 5 adições e 2 exclusões
  1. 5 2
      resources/views/app/video/call.blade.php

+ 5 - 2
resources/views/app/video/call.blade.php

@@ -199,6 +199,7 @@
                         return minutes + " min, " + seconds + " sec";
                     },
                     hangUp: function () {
+                        var sef = this;
                         if (this.otSession) {
                             try {
                                 this.otSession.disconnect();
@@ -210,7 +211,9 @@
                             this.started = false;
                             this.startTime = false;
                             this.videoActive = false;
-                            window.location.reload();
+                             if(self.publisher){
+                                 self.publisher.destroy();
+                             }
                             // this.client = false;
                         }
                     },
@@ -371,7 +374,7 @@
                             height: '100%',
                         };
                         var publisher = OT.initPublisher('self-view', publisherOptions, self.handleOpenTokError);
-
+                        self.publisher = publisher;
                         publisher.on('streamCreated', function (event) {
                             var selfView = $('#self-view');
                             selfView.attr('data-stream', event.stream.id);