yangjie #46

Merged
yangqiang merged 15 commits from yangjie into master 2025-01-03 10:43:27 +08:00
1 changed files with 26 additions and 7 deletions
Showing only changes of commit 2284b01d89 - Show all commits

View File

@ -171,6 +171,7 @@ const Meeting: React.FC = () => {
})
const [networkOther, setNetworkOther] = useState<RtcStats>({})
const [isComputerAudio, setIsComputerAudio] = useState(false)
const [_isLeave, setIsLeave] = useState(false)
const [isScreenCapture, setIsScreenCapture] = useState(false)
const [isFluencyPriority, setIsFluencyPriority] = useState(false)
const [open, setOpen] = useState(false)
@ -884,7 +885,7 @@ const Meeting: React.FC = () => {
}, 1, 3)
message.error('录制失败,请重新录制!')
}
recorder.onstop = async (event: any) => {
recorder.onstop = async () => {
}
recorder.ondataavailable = async (event: any) => {
@ -915,6 +916,16 @@ const Meeting: React.FC = () => {
onCancel() {
}
})
setIsLeave(bool => {
if (bool) {
if (userInfo.isAnonymous) {
storage.setItem('userLogin', false)
} else {
navigate('/home/index')
}
}
return false
})
};
reader.readAsArrayBuffer(blob);
}
@ -1680,6 +1691,7 @@ const Meeting: React.FC = () => {
}
// 退出房间
const leaveChannel = async (bool: boolean = true): Promise<void> => {
setIsLeave(true)
await stopScreenCapture()
await stopRecorderMedia()
if (bool) {
@ -1687,12 +1699,19 @@ const Meeting: React.FC = () => {
}
await agora.leaveChannel()
setTimeout(() => {
if (userInfo.isAnonymous) {
storage.setItem('userLogin', false)
} else {
navigate('/home/index')
}
}, 2000)
setRecorder((res: any) => {
if (res) {
} else {
if (userInfo.isAnonymous) {
storage.setItem('userLogin', false)
} else {
navigate('/home/index')
}
}
return res
})
}, 1000)
}
// 分享屏幕
const clickSharedScreen = async (): Promise<void> => {