This commit is contained in:
yj 2025-02-25 17:18:16 +08:00
parent f9dc5830aa
commit 034d46b39e
10 changed files with 67 additions and 46 deletions

14
main.js
View File

@ -202,6 +202,7 @@ app.on('ready', () => {
connection.off('ExitSharedScreen');
connection.off('SetSpeaker');
connection.off('ReceivedOperation');
connection.off('StopedSharedScreen');
}
});
ipcMain.handle('onStop', (event) => {
@ -221,7 +222,7 @@ app.on('ready', () => {
await connection.invoke(str, data.roomNum, data.msg)
break;
case 'sendOper':
await connection.invoke(str, data.roomNum, data.type)
await connection.invoke(str, data.roomNum, data.contentString)
break;
case 'getDrivers':
// 获取某个人的设备列表
@ -281,10 +282,10 @@ app.on('ready', () => {
})
});
// 扩展操作
connection.on("Operation", (type) => {
connection.on("Operation", (contentString) => {
mainWindow.webContents.send('onSignalr', {
key: 'Operation',
type
contentString
})
});
// 移出会议
@ -433,6 +434,13 @@ app.on('ready', () => {
contentString
})
});
// 共享人取消共享屏幕
connection.on("StopedSharedScreen", (ScreenShareId) => {
mainWindow.webContents.send('onSignalr', {
key: 'StopedSharedScreen',
ScreenShareId
})
});
}
});
// 放大缩小退出窗口

View File

@ -171,7 +171,11 @@ export const PostSharedScreen = (roomNum: string) =>
url: `/room/shared-screen?roomNum=${roomNum}`,
method: 'post'
})
export const PostStopSharedScreen = (roomNum: string) =>
request({
url: `/room/stop-shared-screen?roomNum=${roomNum}`,
method: 'post'
})
export const PostHomeVerLog = (data: any) =>
request({
url: `/home/ver-log`,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 KiB

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 838 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 KiB

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 203 KiB

View File

@ -8,7 +8,7 @@ import { SearchOutlined, EllipsisOutlined, ExclamationCircleFilled, FullscreenEx
import { useLocation, useNavigate } from 'react-router-dom';
import { thumbImageBufferToBase64 } from '@/utils/package/base64'
import { storage } from '@/utils';
import { GetRoomUser, PostOpenMicr, GetSharedScreen, PostOpenCamera, GetLeaveAll, PostRoomManager, DeleteRoomManager, GetRoomKickout, GetShowUser, PostShowUser, PostMuteAll, GetRoomUserItem, GetApplySpeak, PostSharedScreen } from '@/api/Meeting';
import { GetRoomUser, PostOpenMicr, GetSharedScreen, PostOpenCamera, GetLeaveAll, PostRoomManager, DeleteRoomManager, GetRoomKickout, GetShowUser, PostShowUser, PostMuteAll, GetRoomUserItem, GetApplySpeak, PostSharedScreen, PostStopSharedScreen } from '@/api/Meeting';
import ImageUrl from '@/utils/package/imageUrl'
import { agora } from '@/utils/package/agora'
import dayjs from 'dayjs';
@ -723,7 +723,7 @@ const Meeting: React.FC = () => {
break;
// 扩展操作
case 'Operation':
switch (item.type) {
switch (item.contentString) {
}
break;
@ -1001,6 +1001,21 @@ const Meeting: React.FC = () => {
}
break;
// 共享人取消共享屏幕
case 'StopedSharedScreen':
setRoomUserList((newChatList: any) => {
setActiveSpeaker(res => {
let item = newChatList.find((item: any) => item.uid === res)
if (item && item.isRoom && item.isAdmin) {
renderVideo(res)
} else {
getShowUser()
}
return res
})
return newChatList
})
break;
}
})
return () => {
@ -1164,37 +1179,42 @@ const Meeting: React.FC = () => {
timer = ''
}
timer = setTimeout(() => {
setRoomUserList((res: any) => {
let userItem = res.find((item: any) => item.uid === userInfo.uid)
if (!role.ID.includes(userInfo.roleId) && userItem && userItem.isRoomManager) {
DeleteRoomManager({
roomId: state.roomId,
roomNum: state.channelId,
userId: userInfo.uid
})
confirm({
title: '提示',
icon: <ExclamationCircleFilled />,
content: `由于您长时间未发言,已自动取消发言权限,是否重新申请发言?`,
centered: true,
okText: '确定',
cancelText: '取消',
async onOk() {
GetApplySpeak(state.channelId).then(res => {
if (res.code === 200) {
setIsClicked(true);
message.success('申请发言成功')
setIsShare((req: any) => {
if (!req) {
setRoomUserList((res: any) => {
let userItem = res.find((item: any) => item.uid === userInfo.uid)
if (!role.ID.includes(userInfo.roleId) && userItem && userItem.isRoomManager) {
DeleteRoomManager({
roomId: state.roomId,
roomNum: state.channelId,
userId: userInfo.uid
})
confirm({
title: '提示',
icon: <ExclamationCircleFilled />,
content: `由于您长时间未发言,已自动取消发言权限,是否重新申请发言?`,
centered: true,
okText: '确定',
cancelText: '取消',
async onOk() {
GetApplySpeak(state.channelId).then(res => {
if (res.code === 200) {
setIsClicked(true);
message.success('申请发言成功')
}
})
},
onCancel() {
}
})
},
onCancel() {
}
clearTimeout(timer)
timer = ''
return res
})
}
clearTimeout(timer)
timer = ''
return res
return req
})
}, 1000 * 60 * 5);
} else {
@ -2084,18 +2104,7 @@ const Meeting: React.FC = () => {
// 设置全员看谁
const allUserLook = async (uid: string, name: string, bool?: boolean): Promise<void> => {
if (bool) {
setRoomUserList((newChatList: any) => {
setActiveSpeaker(res => {
let item = newChatList.find((item: any) => item.uid === res)
if (item && item.isRoom && item.isAdmin) {
PostShowUser(state.channelId, item.uid, name)
} else {
PostShowUser(state.channelId, uid, name)
}
return res
})
return newChatList
})
await PostStopSharedScreen(state.channelId)
} else {
await PostShowUser(state.channelId, uid, name)
}

View File

@ -446,8 +446,8 @@ export const agora = {
startCameraCapture: async (bool: boolean = false) => {
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {
format: {
width: bool ? 160 : 1280,
height: bool ? 160 : 720,
width: bool ? 160 : 1920,
height: bool ? 160 : 1080,
fps: 15,
}
})