From efcaabbbd84bee028c7ce548a5ce8ec0cc2e9ff6 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 10 Nov 2022 22:45:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Android=E8=BF=9B=E5=85=A5=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E6=B2=A1=E6=9C=89=E5=A3=B0=E9=9F=B3=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/manage/components/MeetingManager.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/pages/manage/components/MeetingManager.vue b/resources/assets/js/pages/manage/components/MeetingManager.vue index 3040d1b7d..fd55d3269 100644 --- a/resources/assets/js/pages/manage/components/MeetingManager.vue +++ b/resources/assets/js/pages/manage/components/MeetingManager.vue @@ -149,6 +149,7 @@ export default { agoraClient: null, remoteUsers: [], + readyPlay: [], localUser: { uid: null, audioTrack: null, @@ -352,11 +353,14 @@ export default { this.loadIng--; this.addShow = false; this.meetingShow = true; - if (this.addData.tracks.includes("video")) { - this.$nextTick(_ => { + this.$nextTick(_ => { + if (this.addData.tracks.includes("video")) { this.$refs[`meeting_${this.localUser.uid}`].play('video') + } + this.readyPlay.forEach(item => { + this.$refs[`meeting_${item.uid}`][0].play(item.mediaType) }) - } + }) }, async leave() { @@ -437,7 +441,11 @@ export default { const index = this.remoteUsers.findIndex(item => item.uid == user.uid) if (index > -1) { await this.agoraClient.subscribe(user, mediaType); - this.$refs[`meeting_${user.uid}`][0].play(mediaType) + if (this.$refs[`meeting_${user.uid}`]) { + this.$refs[`meeting_${user.uid}`][0].play(mediaType) + } else { + this.readyPlay.push({uid: user.uid, mediaType}) + } } },