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"); };