From 30b34d5872ccaedf3ed2506ab8db16f5af88a8f4 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 27 Aug 2024 15:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Meeting/index.tsx | 10 +++++++++- src/page/UserVideo/index.tsx | 14 +++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 48004fa..72dfa95 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -477,7 +477,15 @@ const Meeting: React.FC = () => { break; // 管理员查看随机用户 case 'Watch': - console.log(item); + if (userInfo.roleId !== '1') { + let userId = item.watchUids.find((uid: any) => uid === userInfo.uid) + if (userId) { + await agora.startCameraCapture() + } else { + await agora.stopCameraCapture(); + } + agora.updateChannelMediaOptionsEx(userId ? true : false) + } break; } }) diff --git a/src/page/UserVideo/index.tsx b/src/page/UserVideo/index.tsx index 5c06ab3..33f9117 100644 --- a/src/page/UserVideo/index.tsx +++ b/src/page/UserVideo/index.tsx @@ -131,15 +131,15 @@ const UserVideo: React.FC = () => {
-
- { - userList.map((item: any, index: number) => { - return
+ { + userList.map((item: any, index: number) => { + return
+
- }) - } -
+
+ }) + }