From 2afcef025b27e4b71ca68c3c52fe3ddff530ea3d Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Mon, 20 Jan 2025 10:43:12 +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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 6f358cc..59629d8 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -164,6 +164,7 @@ const Meeting: React.FC = () => { const [chatList, setChatList] = useState([]) const [isExpand, setIsExpand] = useState(false) const [currentVideoId, setCurrentVideoId] = useState('') + const [currentVideoUid, setCurrentVideoUid] = useState('') let [currentSeconds, setCurrentSeconds] = useState(0) const [currentEffective, setCurrentEffective] = useState(4) const [networkQuality, setNetworkQuality] = useState({ @@ -973,7 +974,7 @@ const Meeting: React.FC = () => { useEffect(() => { async function setView() { - let uid = currentVideoId || userInfo.uid + let uid = currentVideoUid switch (currentLookUserStatus) { case 1: await agora.setupLocalVideo({ @@ -1428,6 +1429,7 @@ const Meeting: React.FC = () => { } else { uid = userInfo.uid } + setCurrentVideoUid(uid) if (currentVideoId) { await agora.destroyRendererByView(`video-source-camera-primary`) await agora.destroyRendererByView(`video-source-screen`)