diff --git a/main.js b/main.js index a3b35f1..b6b42f2 100644 --- a/main.js +++ b/main.js @@ -113,11 +113,6 @@ function createWindow() { mainWindow.focus(); } const additionalData = { myKey: 'myValue' } -// 退出房间 -app.on('will-quit', async (event) => { - await mainWindow.webContents.send('quitAndInstall'); -}); - app.on('ready', () => { const gotTheLock = app.requestSingleInstanceLock(additionalData) if (gotTheLock) { diff --git a/src/components/JoinSetting/index.tsx b/src/components/JoinSetting/index.tsx index fe0cffb..a892189 100644 --- a/src/components/JoinSetting/index.tsx +++ b/src/components/JoinSetting/index.tsx @@ -21,7 +21,7 @@ const JoinSetting = forwardRef((_props: any, ref: any) => { } setJoinRoomSettingForm((res: any) => { res.forEach((item: any, index: number) => { - if (index === 0) { + if (index === 0 && role.ID.includes(user.roleId)) { agora.getAudioMediaList().then(res => { item.active = res.ecordingList.length ? true : false }) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 5752c38..2b91a24 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -355,6 +355,13 @@ const Meeting: React.FC = () => { time: changeCurrentSeconds(), }); }, 1000) + // 首次加载图标更新 + const firstFooterList = [...footerList] + firstFooterList[0][0].title = state.enableMicr ? '静音' : '解除静音' + firstFooterList[0][0].active = !state.enableMicr + firstFooterList[0][1].title = state.enableCamera ? '关闭视频' : '开启视频' + firstFooterList[0][1].active = !state.enableCamera + setFooterList(firstFooterList) setTimeout(async () => { const setting = await JSON.parse(storage.getItem('setting') as string); const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);