瀏覽代碼

Video - multiple video divs for participants - fix

Vijayakrishnan 3 年之前
父節點
當前提交
fb56debf9b
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      resources/views/app/video/call-minimal.blade.php

+ 9 - 0
resources/views/app/video/call-minimal.blade.php

@@ -139,6 +139,8 @@
             $btnMuteAudio: null,
             $btnUnmuteAudio: null,
 
+            initializing: false,
+
             // methods
             init: function() {
 
@@ -299,6 +301,13 @@
             // init media
             initMedia: function() {
 
+                if(this.initializing) {
+                    console.log('Init already in progress.');
+                    return;
+                }
+
+                this.initializing = true;
+
                 // create client
                 this.mediaServiceClient = AgoraRTC.createClient({mode: 'rtc', codec: 'vp8'});