监听销毁
This commit is contained in:
parent
00aad100ea
commit
3e5c3ddcfd
|
|
@ -228,7 +228,7 @@
|
|||
position: absolute !important;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: calc(100% - 300px) !important;
|
||||
height: calc(100% - 260px) !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
}
|
||||
|
||||
.meetingContentSwiperCard {
|
||||
height: 300px;
|
||||
height: 260px;
|
||||
width: calc(100% / 4);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import ImageUrl from '@/utils/package/imageUrl'
|
|||
import agora from '@/utils/package/agora'
|
||||
import StupWizard from '@/components/StupWizard';
|
||||
import SpeakerModeModal from '@/components/SpeakerModeModal';
|
||||
import { onInvoke, onSignalr } from '@/utils/package/signalr';
|
||||
import { onInvoke, onSignalr, offSignalr } from '@/utils/package/signalr';
|
||||
import dayjs from 'dayjs';
|
||||
import durationPlugin from 'dayjs/plugin/duration';
|
||||
import { VideoSourceType } from 'agora-electron-sdk';
|
||||
|
|
@ -188,6 +188,9 @@ const Meeting: React.FC = () => {
|
|||
break;
|
||||
}
|
||||
})
|
||||
return () => {
|
||||
offSignalr()
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@ export const onSignalr = (callBack: Function) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
export const offSignalr = () => {
|
||||
if (connection) {
|
||||
connection.off('ReceiveMessage');
|
||||
connection.off('RefreshUserList');
|
||||
connection.off('Operation');
|
||||
}
|
||||
}
|
||||
export const onInvoke = async (str: string, data: any) => {
|
||||
switch (str) {
|
||||
case 'joinChannel':
|
||||
|
|
|
|||
Loading…
Reference in New Issue