Compare commits
4 Commits
cfdf042eaf
...
1a2dac9903
| Author | SHA1 | Date |
|---|---|---|
|
|
1a2dac9903 | |
|
|
1fc69f8c4b | |
|
|
9b41377055 | |
|
|
0a411fd5c5 |
|
|
@ -0,0 +1,12 @@
|
|||
.meetingDisconnected {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 80px);
|
||||
top: 0;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
z-index: 5;
|
||||
background-color: #07090B;
|
||||
padding: 20px 40px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import styles from '@/components/MeetingDisconnected/index.module.scss'
|
||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||
import { useState, useImperativeHandle, forwardRef } from "react";
|
||||
const MeetingDisconnected = forwardRef((props: any, ref: any) => {
|
||||
useImperativeHandle(ref, () => ({
|
||||
changeModal: (bool: boolean) => {
|
||||
setIsMeetingDisconnectedModal(bool)
|
||||
}
|
||||
}))
|
||||
const [isMeetingDisconnectedModal, setIsMeetingDisconnectedModal] = useState(false);
|
||||
return (
|
||||
<>
|
||||
{isMeetingDisconnectedModal ? <div className={styles.meetingDisconnected}>
|
||||
<InfoCircleOutlined style={{ marginRight: '10px', color: '#faad14' }} />网络已断开,尝试重新连接中...
|
||||
</div> : null}
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
||||
export default MeetingDisconnected
|
||||
|
|
@ -22,6 +22,7 @@ import UserVideo from '@/components/UserVideo';
|
|||
import { role } from '@/config/role';
|
||||
import { fixWebmDuration } from "webm-duration-fix-buffer";
|
||||
import { getKeyOpenChildWindow, setKeyOpenChildWindow } from '@/utils/package/public';
|
||||
import MeetingDisconnected from '@/components/MeetingDisconnected';
|
||||
const { confirm } = Modal;
|
||||
const { exec } = require('child_process');
|
||||
const fs = require('fs').promises;
|
||||
|
|
@ -34,6 +35,7 @@ const Meeting: React.FC = () => {
|
|||
const invitingPersonnelRef = useRef<any>();
|
||||
const stupWizardRef = useRef<any>();
|
||||
const equipmentManagementRef = useRef<any>();
|
||||
const meetingDisconnectedRef = useRef<any>();
|
||||
const [isClicked, setIsClicked] = useState(false);
|
||||
const [statusList, setStatusList] = useState({
|
||||
userList: false,
|
||||
|
|
@ -166,7 +168,8 @@ const Meeting: React.FC = () => {
|
|||
const [_currentRequestSpeakType, setCurrentRequestSpeakType] = useState<'video' | 'audio' | ''>('')
|
||||
const [_mediaStream, setMediaStream] = useState<any>('')
|
||||
const [isShare, setIsShare] = useState<any>(null)
|
||||
const [isSharePopConfirm, setIsSharePopConfirm] = useState<any>(false)
|
||||
const [isSharePopConfirm, setIsSharePopConfirm] = useState(false)
|
||||
const [_isNetworkDisconnected, setIsNetworkDisconnected] = useState(false)
|
||||
const [isShareUser, setIsShareUser] = useState<any>(null)
|
||||
const [currentLookUserStatus, setCurrentLookUserStatus] = useState<0 | 1 | 2 | 3 | 4>(1)
|
||||
const [clickCurrentLookUserStatus, setClickCurrentLookUserStatus] = useState<boolean>(true)
|
||||
|
|
@ -1037,6 +1040,14 @@ const Meeting: React.FC = () => {
|
|||
const reconnectingCode = [2, 16, 11, 13, 14, 12]
|
||||
if (stateNumber === 4 && reconnectingCode.indexOf(reason) >= 0) {
|
||||
message.error('网络断开,请检查网络')
|
||||
meetingDisconnectedRef.current.changeModal(true)
|
||||
setIsScreenCapture(bool => {
|
||||
if (bool) {
|
||||
setIsNetworkDisconnected(true)
|
||||
stopScreenCapture()
|
||||
}
|
||||
return bool
|
||||
})
|
||||
}
|
||||
},
|
||||
onLocalVideoStateChanged: async (_source: VideoSourceType, _state: LocalVideoStreamState, reason: LocalVideoStreamReason) => {
|
||||
|
|
@ -1723,6 +1734,7 @@ const Meeting: React.FC = () => {
|
|||
enableCamera: !footerList[0][1].active
|
||||
})
|
||||
message.success('网络已连接。')
|
||||
meetingDisconnectedRef.current.changeModal(false)
|
||||
setRoomUserList((res: any) => {
|
||||
let userItem = res.find((item: any) => item.uid === userInfo.uid)
|
||||
if (userItem.isRoomManager) {
|
||||
|
|
@ -1732,9 +1744,15 @@ const Meeting: React.FC = () => {
|
|||
userId: userInfo.uid
|
||||
})
|
||||
}
|
||||
setIsNetworkDisconnected(bool => {
|
||||
if (bool) {
|
||||
allUserLook(userItem.uid, userItem.userName)
|
||||
}
|
||||
return false
|
||||
})
|
||||
setIsScreenCapture(bool => {
|
||||
if (bool) {
|
||||
allUserLook(userItem.screenShareId, userItem.userName)
|
||||
allUserLook(userItem.uid, userItem.userName)
|
||||
}
|
||||
return bool
|
||||
})
|
||||
|
|
@ -2858,6 +2876,7 @@ const Meeting: React.FC = () => {
|
|||
<InvitingPersonnelModal ref={invitingPersonnelRef} />
|
||||
<StupWizard ref={stupWizardRef} />
|
||||
<EquipmentManagement ref={equipmentManagementRef} />
|
||||
<MeetingDisconnected ref={meetingDisconnectedRef} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ $pagination-hover-background-color: #5575F2;
|
|||
// ant-notification
|
||||
.ant-notification {
|
||||
-webkit-app-region: no-drag;
|
||||
|
||||
.ant-notification-notice-wrapper {
|
||||
background-color: #1F2022;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue