|
@@ -416,55 +416,55 @@ export default {
|
|
},
|
|
},
|
|
ready() {
|
|
ready() {
|
|
this.$nextTick(function() {
|
|
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: {
|
|
watch: {
|
|
publisherReady(val) {
|
|
publisherReady(val) {
|
|
- if (val && this.session.sessionConnected) this.publishToSession();
|
|
|
|
|
|
+ if (val && this.session.sessionConnected) this.publishToSession();
|
|
},
|
|
},
|
|
"session.sessionConnected"(val) {
|
|
"session.sessionConnected"(val) {
|
|
- if (val && this.publisherReady) this.publishToSession();
|
|
|
|
|
|
+ if (val && this.publisherReady) this.publishToSession();
|
|
},
|
|
},
|
|
"user.is_active_and_visible"(val) {
|
|
"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) {
|
|
"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) {
|
|
"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() {
|
|
mounted() {
|