diff --git a/main.js b/main.js
index c933883..f6b030b 100644
--- a/main.js
+++ b/main.js
@@ -552,6 +552,7 @@ app.on('ready', () => {
}
}
mainWindow.setSkipTaskbar(false)
+ mainWindow.setResizable(true)
mainWindow.setAlwaysOnTop(false)
} else {
childWindow[key].close()
@@ -574,7 +575,6 @@ app.on('ready', () => {
mainWindow.setMinimumSize(250, config.height);
mainWindow.setMaximumSize(250, config.height);
mainWindow.setSize(250, config.height)
- mainWindow.setBounds({ height: config.height })
break;
}
});
@@ -695,16 +695,13 @@ function windowOperation(config) {
x = Math.round((display.workArea.width - child.getSize()[0]) / 2);
child.setPosition(x, 0);
mainWindow.setSkipTaskbar(true)
+ mainWindow.setResizable(false)
mainWindow.setAlwaysOnTop(true, 'screen-saver')
break;
case 'chatSmallWindow':
y = height - child.getSize()[1];
child.setPosition(40, y - 200);
break;
- case 'currentSpeakUserWindow':
- x = width - child.getSize()[0];
- child.setPosition(x - 40, 210);
- break;
case 'noticeWindow':
x = width - child.getSize()[0];
y = height - child.getSize()[1];
diff --git a/src/App.tsx b/src/App.tsx
index b73bfcd..ada9605 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -20,7 +20,6 @@ import ShareScreenWindow from "@/page/Meeting/ShareScreenWindow";
import UserListWindow from "@/page/Meeting/UserListWindow";
import ChatSmallWindow from "@/page/Meeting/ChatSmallWindow";
import ChatBigWindow from "@/page/Meeting/ChatBigWindow";
-import CurrentSpeakUserWindow from "@/page/Meeting/CurrentSpeakUserWindow";
import NoticeWindow from "@/page/Meeting/NoticeWindow";
import { getKeyOpenChildWindow, setKeyOpenChildWindow, storageSeeting } from "./utils/package/public";
const fs = require('fs').promises;
@@ -37,7 +36,7 @@ const App: React.FC = () => {
});
const [spinning, setSpinning] = useState(false);
const [isState, setIsState] = useState(true);
- const urlHashArr = ['#/userListWindow', '#/shareScreenWindow', '#/chatSmallWindow', '#/chatBigWindow', '#/currentSpeakUserWindow', '#/noticeWindow']
+ const urlHashArr = ['#/userListWindow', '#/shareScreenWindow', '#/chatSmallWindow', '#/chatBigWindow', '#/noticeWindow']
if (urlHashArr.indexOf(location.hash) == -1) {
useEffect(() => {
let userInfo = JSON.parse(storage.getItem('user') as string)
@@ -276,7 +275,6 @@ const App: React.FC = () => {
} />
} />
} />
- } />
} />
} />
diff --git a/src/page/Meeting/CurrentSpeakUserWindow/index.module.scss b/src/page/Meeting/CurrentSpeakUserWindow/index.module.scss
deleted file mode 100644
index 4b7bf32..0000000
--- a/src/page/Meeting/CurrentSpeakUserWindow/index.module.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-.currentSpeakUserWindow {
- color: white;
- width: 100%;
- display: flex;
- flex-direction: column;
- height: 100%;
- background-color: #16191E;
- padding: 4px;
- box-sizing: border-box;
-
- >div {
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- max-width: 100%;
- width: fit-content;
- font-size: 14px;
- }
-}
\ No newline at end of file
diff --git a/src/page/Meeting/CurrentSpeakUserWindow/index.tsx b/src/page/Meeting/CurrentSpeakUserWindow/index.tsx
deleted file mode 100644
index 64fbf8a..0000000
--- a/src/page/Meeting/CurrentSpeakUserWindow/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import styles from '@/page/Meeting/CurrentSpeakUserWindow/index.module.scss'
-import { useEffect, useState } from "react";
-const CurrentSpeakUserWindow: React.FC = () => {
- const [inputValue, setInputValue] = useState('')
- const channel = new BroadcastChannel('meeting_channel');
- useEffect(() => {
- let time: NodeJS.Timeout;
- time = setInterval(() => {
- channel.postMessage({
- type: 'currentSpeakUserWindowGetUserName'
- })
- }, 1000)
- window.electron.windowHandleMessageCallBack((_e: any, data: any) => {
- if (data.parmes.currentSpeakUser.length) {
- setInputValue(data.parmes.currentSpeakUser.join(';'))
- } else {
- setInputValue('')
- }
- })
- return () => {
- clearInterval(time)
- }
- }, []);
-
- return (
- <>
-
-
- {`正在说话: ${inputValue}`}
-
-
- >
- )
-}
-
-export default CurrentSpeakUserWindow
diff --git a/src/page/Meeting/index.module.scss b/src/page/Meeting/index.module.scss
index 97678a3..7a75217 100644
--- a/src/page/Meeting/index.module.scss
+++ b/src/page/Meeting/index.module.scss
@@ -121,14 +121,16 @@
.meetingAbsoluteText {
position: absolute;
width: 100%;
- bottom: 0;
left: 0;
color: white;
text-align: center;
- z-index: 1;
+ z-index: 2;
background-color: rgba(0, 0, 0, 0.5);
cursor: pointer;
font-size: 14px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
}
}
diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx
index 64f5044..48d1dac 100644
--- a/src/page/Meeting/index.tsx
+++ b/src/page/Meeting/index.tsx
@@ -146,6 +146,7 @@ const Meeting: React.FC = () => {
});
const [roomUserList, setRoomUserList] = useState([])
const [_speackUid, setSpeackUid] = useState([])
+ const [currentSpeakUser, setCurrentSpeakUser] = useState([])
const [chatList, setChatList] = useState([])
const [isExpand, setIsExpand] = useState(false)
const [currentVideoId, setCurrentVideoId] = useState('')
@@ -380,33 +381,26 @@ const Meeting: React.FC = () => {
userId: noticeWindowPostRoomManager.uid
})
break;
- case 'currentSpeakUserWindowGetUserName':
- setSpeackUid((uids: any) => {
- const usernames: string[] = [];
- setRoomUserList((res: any) => {
- uids.forEach((uid: any) => {
- const user = res.find((item: any) => item.uid == uid);
- if (user) {
- usernames.push(user.userName);
- }
- })
- window.electron.windowHandleMessage({
- key: 'currentSpeakUserWindow',
- parmes: {
- currentSpeakUser: usernames,
- }
- })
- return res
- });
- return []
- })
- break;
}
}
time = setInterval(() => {
setCurrentSeconds(currentSeconds => {
return currentSeconds += 1
})
+ setSpeackUid((uids: any) => {
+ const usernames: string[] = [];
+ setRoomUserList((res: any) => {
+ uids.forEach((uid: any) => {
+ const user = res.find((item: any) => item.uid == uid);
+ if (user) {
+ usernames.push(user.userName);
+ }
+ })
+ setCurrentSpeakUser(usernames)
+ return res
+ });
+ return []
+ })
}, 1000)
// 首次加载图标更新
const firstFooterList = [...footerList]
@@ -418,27 +412,34 @@ const Meeting: React.FC = () => {
setTimeout(async () => {
const setting = await JSON.parse(storage.getItem('setting') as string);
const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);
- if (stateInfo && setting.isRecordingTips && !recorder) {
+ console.log(isScreenCapture);
+
+ if (stateInfo && setting.isRecordingTips) {
setRecorder((data: any) => {
if (!data) {
- confirm({
- title: '提示',
- icon: ,
- content: `是否录制本次会议?`,
- centered: true,
- okText: '确定',
- cancelText: '取消',
- async onOk() {
- if (stateInfo) {
- changeStatusList({
- title: '录制'
- }, 1, 3)
- } else {
- message.error('当前不在会议室!')
- }
- },
- onCancel() {
+ setIsScreenCapture(bool => {
+ if (!bool) {
+ confirm({
+ title: '提示',
+ icon: ,
+ content: `是否录制本次会议?`,
+ centered: true,
+ okText: '确定',
+ cancelText: '取消',
+ async onOk() {
+ if (stateInfo) {
+ changeStatusList({
+ title: '录制'
+ }, 1, 3)
+ } else {
+ message.error('当前不在会议室!')
+ }
+ },
+ onCancel() {
+ }
+ })
}
+ return bool
})
}
return data
@@ -1628,13 +1629,6 @@ const Meeting: React.FC = () => {
key: 'chatSmallWindow',
show: true,
})
- window.electron.createChildWindow({
- url: location.origin + `/#/currentSpeakUserWindow`,
- width: 200,
- height: 30,
- key: 'currentSpeakUserWindow',
- show: true,
- })
window.electron.createChildWindow({
url: location.origin + `/#/chatBigWindow`,
width: 540,
@@ -2090,13 +2084,14 @@ const Meeting: React.FC = () => {
<>
{isScreenCapture ?
+
{currentSpeakUser.length ? '正在说话:' + currentSpeakUser.join(';') : '正在说话:'}
{footerList[0][1].active ?
: null}
-
{
+
{
setIsExpand(!isExpand)
window.electron.setChildWindow({
- height: isExpand ? 160 : 20,
+ height: isExpand ? 160 : 40,
key: 'main'
})
}}>{isExpand ? '展开' : '收起'}
@@ -2104,7 +2099,7 @@ const Meeting: React.FC = () => {
{contextHolder}
-
@@ -2148,7 +2143,7 @@ const Meeting: React.FC = () => {
{networkIcon(currentEffective)}
详情
-
+ }
{changeCurrentSeconds()}
会议号:{state.channelId} 会议名称:{state.roomName}
@@ -2663,7 +2658,7 @@ const Meeting: React.FC = () => {
) : null
}
-
+ {isScreenCapture ? null :
{footerList.map((item: any, itemIndex: number) => {
return (
@@ -2816,7 +2811,7 @@ const Meeting: React.FC = () => {
)
})}
-
+
}