From 7f1a17c8e8ee5de311557b7637bebcbfe586495e Mon Sep 17 00:00:00 2001 From: cxc Date: Mon, 19 Sep 2022 14:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=A3=80=E5=AE=8C=E6=88=90=E5=90=8E?= =?UTF-8?q?=E5=86=8D=E5=90=AF=E5=8A=A8=E4=BC=9A=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/mediaCheck.vue | 9 ++++++++- src/views/meeting.vue | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b421511..def1542 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@element-plus/icons-vue": "^1.1.4", "@wangeditor/editor": "^5.0.1", "@wangeditor/editor-for-vue": "^5.1.10", - "@zoomus/websdk": "^2.4.0", + "@zoomus/websdk": "^2.5.0", "axios": "^0.26.1", "coi-serviceworker": "^0.1.6", "core-js": "^3.8.3", diff --git a/src/components/mediaCheck.vue b/src/components/mediaCheck.vue index 14eab4c..25c09ab 100644 --- a/src/components/mediaCheck.vue +++ b/src/components/mediaCheck.vue @@ -72,7 +72,6 @@ const isVideoAvailable = ref(undefined); const isAudioAvailable = ref(undefined); const videoStream = ref(null); const audioStream = ref(null); -// TODO:可能有摄像头占用问题。 onMounted(() => { nextTick(async () => { @@ -100,14 +99,22 @@ onMounted(() => { } }); }); + +const emit = defineEmits(["close"]); + const close = () => { try { videoStream.value.getTracks().forEach((track) => track.stop()); + } catch (error) { + console.log(error); + } + try { audioStream.value.getTracks().forEach((track) => track.stop()); } catch (error) { console.log(error); } showCheckMediaVideo.value = false; + emit("close"); };