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,28 +541,25 @@ const Meeting: React.FC = () => {
<div className={getMeetingContentBodyLeftModeClass()} >
{allUserList.map((item: any, index: number) => {
return (
<>
{item.isRoom ?
<div
className={`${styles.meetingContentSwiperCard} ${setMeetingContentSwiperCardClass(item.account)}`}
key={index}
onClick={() => {
if (footerList[1][3].active) {
return message.error('视频录制中请勿切换,或结束录制再切换!')
}
setCurrentVideoId(item.account)
}}
>
<div className={`${styles.meetingContentSwiperCardVdeio} ${currentVideoId === item.account ? styles.active : ''}`} id={`video-${item.account}`}>
<div className={styles.meetingContentSwiperCardVdeioLoading}>
</div>
item.isRoom ?
<div
className={`${styles.meetingContentSwiperCard} ${setMeetingContentSwiperCardClass(item.account)}`}
key={index}
onClick={() => {
if (footerList[1][3].active) {
return message.error('视频录制中请勿切换,或结束录制再切换!')
}
setCurrentVideoId(item.account)
}}
>
<div className={`${styles.meetingContentSwiperCardVdeio} ${currentVideoId === item.account ? styles.active : ''}`} id={`video-${item.account}`}>
<div className={styles.meetingContentSwiperCardVdeioLoading}>
</div>
{meetingContentUser(item)}
{item.enableCamera ? null : meetingContentError(currentVideoId, item)}
</div> : null
}
</>
</div>
{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()
},
// 加入频道