yangjie #46
|
|
@ -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(() => {
|
||||
setRecorder((res: any) => {
|
||||
if (res) {
|
||||
|
||||
} else {
|
||||
if (userInfo.isAnonymous) {
|
||||
storage.setItem('userLogin', false)
|
||||
} else {
|
||||
navigate('/home/index')
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
return res
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
// 分享屏幕
|
||||
const clickSharedScreen = async (): Promise<void> => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue