From fbeb0740eb86261baf76b548234f64c680424c43 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 20 Aug 2024 10:36:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Meeting/index.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 93331c5..2b56463 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -404,13 +404,21 @@ const Meeting: React.FC = () => { } if (item.uid === userInfo.uid) { const footerListTemplate = [...footerList] - footerListTemplate[0][0].title = item.enableMicr ? '静音' : '解除静音' - footerListTemplate[0][0].active = !item.enableMicr - footerListTemplate[0][1].title = item.enableCamera ? '关闭视频' : '开启视频' - footerListTemplate[0][1].active = !item.enableCamera + await agora.getVideoDeviceManager().then(async (res) => { + if (res.list.length) { + footerListTemplate[0][1].title = item.enableCamera ? '关闭视频' : '开启视频' + footerListTemplate[0][1].active = !item.enableCamera + await agora.muteLocalVideoStream(!item.enableCamera) + } + }) + await agora.getAudioMediaList().then(async (res) => { + if (res.ecordingList.length) { + footerListTemplate[0][0].title = item.enableMicr ? '静音' : '解除静音' + footerListTemplate[0][0].active = !item.enableMicr + await agora.muteLocalAudioStream(!item.enableMicr) + } + }) setFooterList(footerListTemplate) - await agora.muteLocalAudioStream(!item.enableMicr) - await agora.muteLocalVideoStream(!item.enableCamera) } if (userSearchValue) { if (item.userName.indexOf(userSearchValue) !== -1) {