|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="trtccom" v-if="show">
|
|
|
- <Device @switchDevice="switchDevice" v-if="show" />
|
|
|
+ <Device @switchDevice="switchDevice" @canUseDevice="canUseDevice" />
|
|
|
<div class="local" id="local" v-if="isJoined">
|
|
|
<div class="tag">
|
|
|
<div :class="audioMuted ? 'muteAudio' : 'unmuteAudio'" @click="muteAudio"></div>
|
|
@@ -60,6 +60,7 @@ async function createLocalStream() {
|
|
|
}
|
|
|
|
|
|
async function handleJoin() {
|
|
|
+ console.log(!store.commit("rtc/getInitParamsStates"),'getInitParamsStates');
|
|
|
if (!store.commit("rtc/getInitParamsStates")) {
|
|
|
return;
|
|
|
}
|
|
@@ -275,11 +276,10 @@ let switchDevice = async ({ videoId, audioId }) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-watch(show, () => {
|
|
|
- if (show.value) {
|
|
|
+let canUseDevice = ()=>{
|
|
|
handleJoin();
|
|
|
- }
|
|
|
-});
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -291,6 +291,7 @@ watch(show, () => {
|
|
|
z-index: 9999;
|
|
|
left: 10px;
|
|
|
top: 10px;
|
|
|
+ background: #000;
|
|
|
.muteAudio {
|
|
|
background: url(~@/assets/images/icon/mic-mute.svg) center center no-repeat;
|
|
|
}
|