diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 7f2b0df..e85500f 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -1688,26 +1688,24 @@ const Meeting: React.FC = () => { // 退出房间 const leaveChannel = async (bool: boolean = true): Promise => { setIsLeave(true) - setTimeout(async () => { - await stopScreenCapture() - await stopRecorderMedia() - if (bool) { - await getLeave() - } - await agora.leaveChannel() - setRecorder((res: any) => { - if (res) { + await stopScreenCapture() + await stopRecorderMedia() + if (bool) { + await getLeave() + } + await agora.leaveChannel() + setRecorder((res: any) => { + if (res) { + } else { + if (userInfo.isAnonymous) { + storage.setItem('userLogin', false) } else { - if (userInfo.isAnonymous) { - storage.setItem('userLogin', false) - } else { - navigate('/home/index') - } + navigate('/home/index') } - return res - }) - }, 1000) + } + return res + }) } // 分享屏幕 const clickSharedScreen = async (): Promise => {