This commit is contained in:
yj 2024-08-13 17:37:27 +08:00
parent 616e1adf4d
commit 7e9ad23c49
2 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import {
} from "agora-electron-sdk"; } from "agora-electron-sdk";
import { GetRoomRtcToken } from "@/api/Home/Index"; import { GetRoomRtcToken } from "@/api/Home/Index";
import { storage } from '@/utils'; import { storage } from '@/utils';
import { onStop } from "./signalr";
const option: any = { const option: any = {
appId: 'dcfc466a6ecb4a1f972630065dfb1e75', appId: 'dcfc466a6ecb4a1f972630065dfb1e75',
token: '', token: '',
@ -136,6 +137,7 @@ const agora = {
stopAllEffect: true, stopAllEffect: true,
stopMicrophoneRecording: true, stopMicrophoneRecording: true,
}) })
onStop()
agora.stopScreenCapture() agora.stopScreenCapture()
agora.release() agora.release()
}, },

View File

@ -160,4 +160,9 @@ export const onInvoke = async (str: string, data: any) => {
break; break;
} }
} }
export const onStop = async () => {
if (connection) {
connection.stop()
}
}