This commit is contained in:
yj 2024-07-22 17:15:17 +08:00
parent 881298cce9
commit d3977ea0ae
5 changed files with 31 additions and 27 deletions

View File

@ -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', () => {

View File

@ -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) {

View File

@ -365,7 +365,7 @@
>div:nth-child(3) {
position: absolute;
top: 60px;
top: 50px;
left: 50%;
transform: translate(-50%, 0);
width: 160px;

View File

@ -334,7 +334,6 @@ const Meeting: React.FC = () => {
roomNum: state.channelId
})
agora.leaveChannel()
agora.stopScreenCapture()
navigate(-1)
}
// 分享屏幕
@ -542,8 +541,7 @@ const Meeting: React.FC = () => {
<div className={getMeetingContentBodyLeftModeClass()} >
{allUserList.map((item: any, index: number) => {
return (
<>
{item.isRoom ?
item.isRoom ?
<div
className={`${styles.meetingContentSwiperCard} ${setMeetingContentSwiperCardClass(item.account)}`}
key={index}
@ -562,8 +560,6 @@ const Meeting: React.FC = () => {
{meetingContentUser(item)}
{item.enableCamera ? null : meetingContentError(currentVideoId, item)}
</div> : null
}
</>
)
}
)}

View File

@ -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()
},
// 加入频道