This commit is contained in:
yj 2024-08-27 11:09:43 +08:00
parent 92d8e9e443
commit 7a79e889c8
2 changed files with 5 additions and 3 deletions

View File

@ -254,7 +254,7 @@ const Meeting: React.FC = () => {
channelId: state.channelId, channelId: state.channelId,
uid: userInfo.uid, uid: userInfo.uid,
token: state.token, token: state.token,
tokenA: userInfo.uid === '1' ? '' : state.tokenA, tokenA: userInfo.roleId === '1' ? '' : state.tokenA,
}) })
storage.setItem('noViewChatList', 0) storage.setItem('noViewChatList', 0)
window.addEventListener('customStorageChange', handleCustomStorageChange); window.addEventListener('customStorageChange', handleCustomStorageChange);

View File

@ -39,6 +39,7 @@ const UserVideo: React.FC = () => {
}) })
monitorAgora.registerEventHandler({ monitorAgora.registerEventHandler({
onJoinChannelSuccess: async (info: any, _elapsed: any) => { onJoinChannelSuccess: async (info: any, _elapsed: any) => {
console.log(info, '本地')
// await monitorAgora.setupLocalVideo({ // await monitorAgora.setupLocalVideo({
// uid: info.localUid, // uid: info.localUid,
// view: document.getElementById(`video-${info.localUid}`), // view: document.getElementById(`video-${info.localUid}`),
@ -47,10 +48,11 @@ const UserVideo: React.FC = () => {
// }) // })
}, },
onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => { onUserJoined: async (info: any, remoteUid: any, _elapsed: any) => {
console.log(info, remoteUid, '远端')
}, },
onUserOffline: async (info: any, remoteUid: any, _reason: any) => { onUserOffline: async (info: any, remoteUid: any, _reason: any) => {
console.log(info, remoteUid, '退出')
}, },
}) })
window.addEventListener('customStorageChange', handleCustomStorageChange); window.addEventListener('customStorageChange', handleCustomStorageChange);
@ -95,7 +97,7 @@ const UserVideo: React.FC = () => {
} }
// 获取轮训用户 // 获取轮训用户
const getPolling = async (): Promise<void> => { const getPolling = async (): Promise<void> => {
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); console.log(res);
}) })
}; };