Flavionel 5 år sedan
förälder
incheckning
0c92ae5b8d
1 ändrade filer med 34 tillägg och 34 borttagningar
  1. 34 34
      resources/js/components/pages/ClientEntrance.vue

+ 34 - 34
resources/js/components/pages/ClientEntrance.vue

@@ -416,55 +416,55 @@ export default {
         },
         ready() {
             this.$nextTick(function() {
-            this.readyForUse = true;
-            if (this.user.type === "associate") {
-                if (!this.meeting.id || this.active_menu_item.template !== "room") return;
-                this.getToken({}, true);
-                return;
-            }
+                this.readyForUse = true;
+                if (this.user.type === "associate") {
+                    if (!this.meeting.id || this.active_menu_item.template !== "room") return;
+                    this.getToken({}, true);
+                    return;
+                }
 
-            if (this.meeting.scheduledDate && !this.meeting.startedAt && this.meeting.scheduledDate > new Date()) {
-                alert("Meeting not started.");
-                return;
-            }
-            let participantId = this.user.id;
-            if (!participantId) {
-                this.$refs.initialModal.show(this.meeting.passwordRequired);
-                return;
-            }
-            this.getToken({
-                participantId
-            });
+                if (this.meeting.scheduledDate && !this.meeting.startedAt && this.meeting.scheduledDate > new Date()) {
+                    alert("Meeting not started.");
+                    return;
+                }
+                let participantId = this.user.id;
+                if (!participantId) {
+                    this.$refs.initialModal.show(this.meeting.passwordRequired);
+                    return;
+                }
+                this.getToken({
+                    participantId
+                });
             });
         }
     },
     watch: {
         publisherReady(val) {
-        if (val && this.session.sessionConnected) this.publishToSession();
+            if (val && this.session.sessionConnected) this.publishToSession();
         },
         "session.sessionConnected"(val) {
-        if (val && this.publisherReady) this.publishToSession();
+            if (val && this.publisherReady) this.publishToSession();
         },
         "user.is_active_and_visible"(val) {
-        if (!this.publisher || !this.publisher.publishVideo) return;
-        this.publisher.publishVideo(val);
-        this.publisher.publishAudio(val);
+            if (!this.publisher || !this.publisher.publishVideo) return;
+            this.publisher.publishVideo(val);
+            this.publisher.publishAudio(val);
         },
         "meeting.id"(val) {
-        if (this.loadingInProgress) return;
-        this.loadingInProgress = true;
-        this.disconnect();
+            if (this.loadingInProgress) return;
+            this.loadingInProgress = true;
+            this.disconnect();
 
-        if (val) {
-            this.getToken({}, true);
-        } else {
-            this.loadingInProgress = false;
-        }
+            if (val) {
+                this.getToken({}, true);
+            } else {
+                this.loadingInProgress = false;
+            }
         },
         "active_menu_item.template"(val) {
-        if (this.loadingInProgress || val !== "room" || !this.meeting.id || this.openTokSession) return;
-        this.loadingInProgress = true;
-        this.getToken({}, true);
+            if (this.loadingInProgress || val !== "room" || !this.meeting.id || this.openTokSession) return;
+            this.loadingInProgress = true;
+            this.getToken({}, true);
         }
     },
     mounted() {