yangjie #31
|
|
@ -0,0 +1,4 @@
|
|||
.meetingDisconnected {
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import styles from '@/components/MeetingDisconnected/index.module.scss'
|
||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||
import { Modal } from 'antd';
|
||||
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 (
|
||||
<>
|
||||
<Modal
|
||||
title=""
|
||||
open={isMeetingDisconnectedModal}
|
||||
footer={null}
|
||||
centered
|
||||
width={'300px'}
|
||||
closable={false}
|
||||
>
|
||||
<div className={styles.meetingDisconnected}>
|
||||
<InfoCircleOutlined style={{ marginRight: '10px' }} />网络已断开,尝试重新连接中...
|
||||
</div>
|
||||
</Modal>
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
||||
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('网络断开,请检查网络')
|
||||
setIsScreenCapture(bool => {
|
||||
if (bool) {
|
||||
meetingDisconnectedRef.current.changeModal(true)
|
||||
setIsNetworkDisconnected(true)
|
||||
stopScreenCapture()
|
||||
}
|
||||
return bool
|
||||
})
|
||||
}
|
||||
},
|
||||
onLocalVideoStateChanged: async (_source: VideoSourceType, _state: LocalVideoStreamState, reason: LocalVideoStreamReason) => {
|
||||
|
|
@ -1732,6 +1743,13 @@ const Meeting: React.FC = () => {
|
|||
userId: userInfo.uid
|
||||
})
|
||||
}
|
||||
setIsNetworkDisconnected(bool => {
|
||||
if (bool) {
|
||||
meetingDisconnectedRef.current.changeModal(false)
|
||||
allUserLook(userItem.screenShareId, userItem.userName)
|
||||
}
|
||||
return false
|
||||
})
|
||||
setIsScreenCapture(bool => {
|
||||
if (bool) {
|
||||
allUserLook(userItem.screenShareId, userItem.userName)
|
||||
|
|
@ -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