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); }) };