diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index 1dd1df4..203d87a 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -34,6 +34,9 @@ const StupWizard = forwardRef((_props: any, ref: any) => { } } storage.setItem('setting', JSON.stringify(setting)) + }, + getStupWizardModal: () => { + return isStupWizard } })) const [list, setList] = useState([ diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index eab2ef9..351382a 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -1409,25 +1409,27 @@ const Meeting: React.FC = () => { }) } else if (reason === 3 || reason === 4) { message.error({ - content:
请检查摄像头是否正常工作,检查摄像头是否被其他应用占用,或者尝试重新加入频道, { + content:
检查摄像头是否正常、未被占用,或尝试重新加入频道。 { stupWizardRef.current.changeModal(1); }}>前往修改摄像头
, - duration: 60, + duration: 15, key: 'cameraTemporarily' }); } else if (_state === 3) { - await PostOpenCamera({ - roomNum: state.channelId, - uid: userInfo.uid, - enableCamera: false - }) - message.error({ - content:
请检查摄像头是否正常工作,检查摄像头是否被其他应用占用,或者尝试重新加入频道, { - stupWizardRef.current.changeModal(1); - }}>前往修改摄像头
, - duration: 60, - key: 'cameraTemporarily' - }); + if (!stupWizardRef.current.getStupWizardModal()) { + await PostOpenCamera({ + roomNum: state.channelId, + uid: userInfo.uid, + enableCamera: false + }) + message.error({ + content:
检查摄像头是否正常、未被占用,或尝试重新加入频道。 { + stupWizardRef.current.changeModal(1); + }}>前往修改摄像头
, + duration: 15, + key: 'cameraTemporarily' + }); + } } }, onTokenPrivilegeWillExpire: async (connection: RtcConnection, _token: string) => {