From 4520bba95d3ad66c985251cabadfeb181aaecfc5 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Fri, 21 Feb 2025 16:12: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 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 638de24..fb2f921 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -1449,14 +1449,11 @@ const Meeting: React.FC = () => { setAudioStatus(newState) }, onActiveSpeaker: (_connection: RtcConnection, uid: number) => { - GetSharedScreen(state.channelId).then(req => { - if (req.code === 200) { - if (req.data) { - setIsShare(req.data) - } else { - renderVideo(String(uid)) - } + setIsShare((res: any) => { + if (!res) { + renderVideo(String(uid)) } + return res }) } })