diff --git a/main.js b/main.js index 5d85ed3..78d4267 100644 --- a/main.js +++ b/main.js @@ -29,7 +29,7 @@ class AppWindow extends BrowserWindow { // 开发 this.loadURL('http://localhost:3000'); } else { - // 打包 + // 测试 | 生产 this.loadFile(path.resolve(__dirname, './dist/index.html')); } this.once('ready-to-show', () => { diff --git a/src/App.tsx b/src/App.tsx index 6fd1780..7c0e8a1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -44,6 +44,13 @@ const App: React.FC = () => { } navigate('/login') } + if (import.meta.env.VITE_ENV !== 'development') { + document.addEventListener('keydown', (event) => { + if ((event.ctrlKey || event.metaKey) && event.key === 'r') { + event.preventDefault(); + } + }); + } window.addEventListener('resize', handleResize); const originalSetItem = window.localStorage.setItem; window.localStorage.setItem = function (key, value) { diff --git a/src/page/Meeting/index.module.scss b/src/page/Meeting/index.module.scss index 9864d6b..a47af55 100644 --- a/src/page/Meeting/index.module.scss +++ b/src/page/Meeting/index.module.scss @@ -365,7 +365,7 @@ >div:nth-child(3) { position: absolute; - top: 60px; + top: 50px; left: 50%; transform: translate(-50%, 0); width: 160px; diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index e4c2ba8..0b66bf9 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -334,7 +334,6 @@ const Meeting: React.FC = () => { roomNum: state.channelId }) agora.leaveChannel() - agora.stopScreenCapture() navigate(-1) } // 分享屏幕 @@ -542,28 +541,25 @@ const Meeting: React.FC = () => {
{allUserList.map((item: any, index: number) => { return ( - <> - {item.isRoom ? -
{ - if (footerList[1][3].active) { - return message.error('视频录制中请勿切换,或结束录制再切换!') - } - setCurrentVideoId(item.account) - }} - > -
-
- 暂无视频 -
+ item.isRoom ? +
{ + if (footerList[1][3].active) { + return message.error('视频录制中请勿切换,或结束录制再切换!') + } + setCurrentVideoId(item.account) + }} + > +
+
+ 暂无视频
- {meetingContentUser(item)} - {item.enableCamera ? null : meetingContentError(currentVideoId, item)} -
: null - } - +
+ {meetingContentUser(item)} + {item.enableCamera ? null : meetingContentError(currentVideoId, item)} +
: null ) } )} diff --git a/src/utils/package/agora.ts b/src/utils/package/agora.ts index 807b2ff..6d29934 100644 --- a/src/utils/package/agora.ts +++ b/src/utils/package/agora.ts @@ -1,6 +1,5 @@ import { message } from "antd"; const os = require('os'); -import storage from "./storage"; import { createAgoraRtcEngine, ClientRoleType, @@ -12,6 +11,7 @@ import { MediaRecorderContainerFormat, MediaRecorderStreamType } from "agora-electron-sdk"; +import { onInvoke } from "./signalr"; const option: any = { appId: 'dcfc466a6ecb4a1f972630065dfb1e75', token: '', @@ -111,12 +111,13 @@ const agora = { ); }, // 离开频道 - leaveChannel: () => { - rtcEngine.leaveChannel({ + leaveChannel: async () => { + await rtcEngine.leaveChannel({ stopAudioMixing: true, stopAllEffect: true, stopMicrophoneRecording: true, }) + agora.stopScreenCapture() rtcEngine.release() }, // 加入频道