Vijayakrishnan Krishnan 5 лет назад
Родитель
Сommit
ae3d02aa11
2 измененных файлов с 13 добавлено и 7 удалено
  1. 1 1
      public/css/meeting.css
  2. 12 6
      resources/views/meet.blade.php

+ 1 - 1
public/css/meeting.css

@@ -120,7 +120,7 @@ h1 {
 .main-view .thumbs {
     position: absolute;
     z-index: 2;
-    bottom: 1rem;
+    bottom: 1.5rem;
     right: 1rem;
     width: 180px;
     height: 100%;

+ 12 - 6
resources/views/meet.blade.php

@@ -270,7 +270,6 @@
                         @if($guest)
                         self.pro = true;
                         @else
-                        self.joinMeetingAsPro();
                         self.client = true;
                         @endif
 
@@ -311,9 +310,10 @@
                     // self connected
                     self.otSession.on("sessionConnected", function(event) {
                         console.log(event);
-
-                        // call join as assistant/pro here
                         self.selfUserType = event.target.connection.data.split('|')[1];
+                        @if(!$guest)
+                        self.joinMeetingAsPro(self.selfUserType);
+                        @endif
                     });
 
                     // self disconnected
@@ -399,11 +399,17 @@
                 },
 
                 @if(!$guest)
-                joinMeetingAsPro: function() {
-                    var self = this;
+                joinMeetingAsPro: function(_type) {
+                    var self = this, endPoint = '';
+                    if(_type === 'ASSISTANT') {
+                        endPoint = 'joinVideoVisitAsAssistantPro';
+                    }
+                    else {
+                        endPoint = 'joinVideoVisitAsMcpPro';
+                    }
                     $.ajax({
                         type: 'post',
-                        url: '/api/clientVideoVisit/joinVideoVisitAsMcpPro',
+                        url: '/api/clientVideoVisit/' + endPoint,
                         headers: {
                             'sessionKey': localStorage.sessionKey
                         },