From 7a79e889c869782d067d44f035d01fb35289487e Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Tue, 27 Aug 2024 11:09:43 +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 | 2 +- src/page/UserVideo/index.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 99b0274..89d6d9f 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -254,7 +254,7 @@ const Meeting: React.FC = () => { channelId: state.channelId, uid: userInfo.uid, token: state.token, - tokenA: userInfo.uid === '1' ? '' : state.tokenA, + tokenA: userInfo.roleId === '1' ? '' : state.tokenA, }) storage.setItem('noViewChatList', 0) window.addEventListener('customStorageChange', handleCustomStorageChange); diff --git a/src/page/UserVideo/index.tsx b/src/page/UserVideo/index.tsx index 7b8dc30..867ca87 100644 --- a/src/page/UserVideo/index.tsx +++ b/src/page/UserVideo/index.tsx @@ -39,6 +39,7 @@ const UserVideo: React.FC = () => { }) monitorAgora.registerEventHandler({ onJoinChannelSuccess: async (info: any, _elapsed: any) => { + console.log(info, '本地') // await monitorAgora.setupLocalVideo({ // uid: info.localUid, // view: document.getElementById(`video-${info.localUid}`), @@ -47,10 +48,11 @@ const UserVideo: React.FC = () => { // }) }, onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => { + console.log(info, remoteUid, '远端') }, onUserOffline: async (info: any, remoteUid: any, _reason: any) => { - + console.log(info, remoteUid, '退出') }, }) window.addEventListener('customStorageChange', handleCustomStorageChange); @@ -95,7 +97,7 @@ const UserVideo: React.FC = () => { } // 获取轮训用户 const getPolling = async (): Promise => { - GetPolling(getQueryParameterRegex('channelId') as string, from.viewPeopleValue).then((res: any) => { + GetPolling(getQueryParameterRegex('channelId')?.split('a')[0] as string, from.viewPeopleValue).then((res: any) => { console.log(res); }) };