This commit is contained in:
parent
881298cce9
commit
d3977ea0ae
2
main.js
2
main.js
|
|
@ -29,7 +29,7 @@ class AppWindow extends BrowserWindow {
|
||||||
// 开发
|
// 开发
|
||||||
this.loadURL('http://localhost:3000');
|
this.loadURL('http://localhost:3000');
|
||||||
} else {
|
} else {
|
||||||
// 打包
|
// 测试 | 生产
|
||||||
this.loadFile(path.resolve(__dirname, './dist/index.html'));
|
this.loadFile(path.resolve(__dirname, './dist/index.html'));
|
||||||
}
|
}
|
||||||
this.once('ready-to-show', () => {
|
this.once('ready-to-show', () => {
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,13 @@ const App: React.FC = () => {
|
||||||
}
|
}
|
||||||
navigate('/login')
|
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);
|
window.addEventListener('resize', handleResize);
|
||||||
const originalSetItem = window.localStorage.setItem;
|
const originalSetItem = window.localStorage.setItem;
|
||||||
window.localStorage.setItem = function (key, value) {
|
window.localStorage.setItem = function (key, value) {
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@
|
||||||
|
|
||||||
>div:nth-child(3) {
|
>div:nth-child(3) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 60px;
|
top: 50px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,6 @@ const Meeting: React.FC = () => {
|
||||||
roomNum: state.channelId
|
roomNum: state.channelId
|
||||||
})
|
})
|
||||||
agora.leaveChannel()
|
agora.leaveChannel()
|
||||||
agora.stopScreenCapture()
|
|
||||||
navigate(-1)
|
navigate(-1)
|
||||||
}
|
}
|
||||||
// 分享屏幕
|
// 分享屏幕
|
||||||
|
|
@ -542,28 +541,25 @@ const Meeting: React.FC = () => {
|
||||||
<div className={getMeetingContentBodyLeftModeClass()} >
|
<div className={getMeetingContentBodyLeftModeClass()} >
|
||||||
{allUserList.map((item: any, index: number) => {
|
{allUserList.map((item: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<>
|
item.isRoom ?
|
||||||
{item.isRoom ?
|
<div
|
||||||
<div
|
className={`${styles.meetingContentSwiperCard} ${setMeetingContentSwiperCardClass(item.account)}`}
|
||||||
className={`${styles.meetingContentSwiperCard} ${setMeetingContentSwiperCardClass(item.account)}`}
|
key={index}
|
||||||
key={index}
|
onClick={() => {
|
||||||
onClick={() => {
|
if (footerList[1][3].active) {
|
||||||
if (footerList[1][3].active) {
|
return message.error('视频录制中请勿切换,或结束录制再切换!')
|
||||||
return message.error('视频录制中请勿切换,或结束录制再切换!')
|
}
|
||||||
}
|
setCurrentVideoId(item.account)
|
||||||
setCurrentVideoId(item.account)
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<div className={`${styles.meetingContentSwiperCardVdeio} ${currentVideoId === item.account ? styles.active : ''}`} id={`video-${item.account}`}>
|
||||||
<div className={`${styles.meetingContentSwiperCardVdeio} ${currentVideoId === item.account ? styles.active : ''}`} id={`video-${item.account}`}>
|
<div className={styles.meetingContentSwiperCardVdeioLoading}>
|
||||||
<div className={styles.meetingContentSwiperCardVdeioLoading}>
|
暂无视频
|
||||||
暂无视频
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{meetingContentUser(item)}
|
</div>
|
||||||
{item.enableCamera ? null : meetingContentError(currentVideoId, item)}
|
{meetingContentUser(item)}
|
||||||
</div> : null
|
{item.enableCamera ? null : meetingContentError(currentVideoId, item)}
|
||||||
}
|
</div> : null
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { message } from "antd";
|
import { message } from "antd";
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
import storage from "./storage";
|
|
||||||
import {
|
import {
|
||||||
createAgoraRtcEngine,
|
createAgoraRtcEngine,
|
||||||
ClientRoleType,
|
ClientRoleType,
|
||||||
|
|
@ -12,6 +11,7 @@ import {
|
||||||
MediaRecorderContainerFormat,
|
MediaRecorderContainerFormat,
|
||||||
MediaRecorderStreamType
|
MediaRecorderStreamType
|
||||||
} from "agora-electron-sdk";
|
} from "agora-electron-sdk";
|
||||||
|
import { onInvoke } from "./signalr";
|
||||||
const option: any = {
|
const option: any = {
|
||||||
appId: 'dcfc466a6ecb4a1f972630065dfb1e75',
|
appId: 'dcfc466a6ecb4a1f972630065dfb1e75',
|
||||||
token: '',
|
token: '',
|
||||||
|
|
@ -111,12 +111,13 @@ const agora = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// 离开频道
|
// 离开频道
|
||||||
leaveChannel: () => {
|
leaveChannel: async () => {
|
||||||
rtcEngine.leaveChannel({
|
await rtcEngine.leaveChannel({
|
||||||
stopAudioMixing: true,
|
stopAudioMixing: true,
|
||||||
stopAllEffect: true,
|
stopAllEffect: true,
|
||||||
stopMicrophoneRecording: true,
|
stopMicrophoneRecording: true,
|
||||||
})
|
})
|
||||||
|
agora.stopScreenCapture()
|
||||||
rtcEngine.release()
|
rtcEngine.release()
|
||||||
},
|
},
|
||||||
// 加入频道
|
// 加入频道
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue