Vijayakrishnan 4 роки тому
батько
коміт
f3ee69dbc8
1 змінених файлів з 15 додано та 6 видалено
  1. 15 6
      resources/views/app/video/call-agora-v2.blade.php

+ 15 - 6
resources/views/app/video/call-agora-v2.blade.php

@@ -23,7 +23,7 @@
 
 <body class="p-0 m-0">
 
-    <div id="proCallComponent">
+    <div id="proCallComponent" v-cloak>
 
         <div class="d-flex px-2 border-bottom mb-2 {{ $client ? '' : 'justify-content-center' }}">
             @if($client)
@@ -98,7 +98,7 @@
 
     </div>
 
-    <div class="border-top patient-queue mcp-theme-1" id="queueComponent">
+    <div class="border-top patient-queue mcp-theme-1" id="queueComponent" v-cloak>
         <div class="bg-secondary text-white font-weight-bold text-center py-1" v-if="items.length > 0">
             @{{ items.length }} patient@{{ items.length > 1 ? 's' : '' }} in the queue
         </div>
@@ -341,6 +341,9 @@
 
                         this.socketClient.subscribe("/user/topic/leaveClientRoom", (message) => {
                             console.log("leaveClientRoom received:", message.body);
+                            // refresh meeting data
+                            // TODO: do participant thumb removal
+                            this.getMeetingInfo();
                         });
 
                     },
@@ -371,7 +374,7 @@
                                 this.myMedia.isCameraAcquired = true;
                             }
                             catch (e) {
-                                console.log('ALIX: error in getting mic');
+                                console.log('ALIX: error in getting camera');
                             }
                         }
                         async function _initMediaServiceEvents() {
@@ -581,7 +584,9 @@
                         this.socketClient.send("/app/leaveClientRoom", {},
                             JSON.stringify({sessionKey: '{{$performer->session_key}}'})
                         );
-                        window.location.href = '/pro/meet';
+                        window.setTimeout(() => {   // a little timeout for the WS message sending op to complete
+                            window.location.href = '/pro/meet';
+                        }, 250);
                     },
                     // end: actions that notify participants via socket
 
@@ -601,7 +606,11 @@
                     this.enterClientRoomAsPro();
                 }
             });
-            new Vue({
+        })();
+    </script>
+    <script>
+        (function() {
+            window.queueComponent = new Vue({
                 el: '#queueComponent',
                 data: {
                     items: []
@@ -638,7 +647,7 @@
                         }, 'json');
                     }
                 }
-            })
+            });
         })();
     </script>
 </body>