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');
|
||||
} else {
|
||||
// 打包
|
||||
// 测试 | 生产
|
||||
this.loadFile(path.resolve(__dirname, './dist/index.html'));
|
||||
}
|
||||
this.once('ready-to-show', () => {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@
|
|||
|
||||
>div:nth-child(3) {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
top: 50px;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 160px;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
}
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
},
|
||||
// 加入频道
|
||||
|
|
|
|||
Loading…
Reference in New Issue