14
main.js
|
|
@ -202,6 +202,7 @@ app.on('ready', () => {
|
||||||
connection.off('ExitSharedScreen');
|
connection.off('ExitSharedScreen');
|
||||||
connection.off('SetSpeaker');
|
connection.off('SetSpeaker');
|
||||||
connection.off('ReceivedOperation');
|
connection.off('ReceivedOperation');
|
||||||
|
connection.off('StopedSharedScreen');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ipcMain.handle('onStop', (event) => {
|
ipcMain.handle('onStop', (event) => {
|
||||||
|
|
@ -221,7 +222,7 @@ app.on('ready', () => {
|
||||||
await connection.invoke(str, data.roomNum, data.msg)
|
await connection.invoke(str, data.roomNum, data.msg)
|
||||||
break;
|
break;
|
||||||
case 'sendOper':
|
case 'sendOper':
|
||||||
await connection.invoke(str, data.roomNum, data.type)
|
await connection.invoke(str, data.roomNum, data.contentString)
|
||||||
break;
|
break;
|
||||||
case 'getDrivers':
|
case 'getDrivers':
|
||||||
// 获取某个人的设备列表
|
// 获取某个人的设备列表
|
||||||
|
|
@ -281,10 +282,10 @@ app.on('ready', () => {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// 扩展操作
|
// 扩展操作
|
||||||
connection.on("Operation", (type) => {
|
connection.on("Operation", (contentString) => {
|
||||||
mainWindow.webContents.send('onSignalr', {
|
mainWindow.webContents.send('onSignalr', {
|
||||||
key: 'Operation',
|
key: 'Operation',
|
||||||
type
|
contentString
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// 移出会议
|
// 移出会议
|
||||||
|
|
@ -433,6 +434,13 @@ app.on('ready', () => {
|
||||||
contentString
|
contentString
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
// 共享人取消共享屏幕
|
||||||
|
connection.on("StopedSharedScreen", (ScreenShareId) => {
|
||||||
|
mainWindow.webContents.send('onSignalr', {
|
||||||
|
key: 'StopedSharedScreen',
|
||||||
|
ScreenShareId
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 放大缩小退出窗口
|
// 放大缩小退出窗口
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,11 @@ export const PostSharedScreen = (roomNum: string) =>
|
||||||
url: `/room/shared-screen?roomNum=${roomNum}`,
|
url: `/room/shared-screen?roomNum=${roomNum}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
|
export const PostStopSharedScreen = (roomNum: string) =>
|
||||||
|
request({
|
||||||
|
url: `/room/stop-shared-screen?roomNum=${roomNum}`,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
export const PostHomeVerLog = (data: any) =>
|
export const PostHomeVerLog = (data: any) =>
|
||||||
request({
|
request({
|
||||||
url: `/home/ver-log`,
|
url: `/home/ver-log`,
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 311 KiB |
|
Before Width: | Height: | Size: 712 KiB After Width: | Height: | Size: 243 KiB |
|
Before Width: | Height: | Size: 838 KiB After Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 600 KiB After Width: | Height: | Size: 153 KiB |
|
Before Width: | Height: | Size: 921 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 203 KiB |
|
|
@ -8,7 +8,7 @@ import { SearchOutlined, EllipsisOutlined, ExclamationCircleFilled, FullscreenEx
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import { thumbImageBufferToBase64 } from '@/utils/package/base64'
|
import { thumbImageBufferToBase64 } from '@/utils/package/base64'
|
||||||
import { storage } from '@/utils';
|
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 ImageUrl from '@/utils/package/imageUrl'
|
||||||
import { agora } from '@/utils/package/agora'
|
import { agora } from '@/utils/package/agora'
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
@ -723,7 +723,7 @@ const Meeting: React.FC = () => {
|
||||||
break;
|
break;
|
||||||
// 扩展操作
|
// 扩展操作
|
||||||
case 'Operation':
|
case 'Operation':
|
||||||
switch (item.type) {
|
switch (item.contentString) {
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1001,6 +1001,21 @@ const Meeting: React.FC = () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
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 () => {
|
return () => {
|
||||||
|
|
@ -1164,6 +1179,8 @@ const Meeting: React.FC = () => {
|
||||||
timer = ''
|
timer = ''
|
||||||
}
|
}
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
|
setIsShare((req: any) => {
|
||||||
|
if (!req) {
|
||||||
setRoomUserList((res: any) => {
|
setRoomUserList((res: any) => {
|
||||||
let userItem = res.find((item: any) => item.uid === userInfo.uid)
|
let userItem = res.find((item: any) => item.uid === userInfo.uid)
|
||||||
if (!role.ID.includes(userInfo.roleId) && userItem && userItem.isRoomManager) {
|
if (!role.ID.includes(userInfo.roleId) && userItem && userItem.isRoomManager) {
|
||||||
|
|
@ -1196,6 +1213,9 @@ const Meeting: React.FC = () => {
|
||||||
timer = ''
|
timer = ''
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
return req
|
||||||
|
})
|
||||||
}, 1000 * 60 * 5);
|
}, 1000 * 60 * 5);
|
||||||
} else {
|
} else {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
|
|
@ -2084,18 +2104,7 @@ const Meeting: React.FC = () => {
|
||||||
// 设置全员看谁
|
// 设置全员看谁
|
||||||
const allUserLook = async (uid: string, name: string, bool?: boolean): Promise<void> => {
|
const allUserLook = async (uid: string, name: string, bool?: boolean): Promise<void> => {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
setRoomUserList((newChatList: any) => {
|
await PostStopSharedScreen(state.channelId)
|
||||||
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
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
await PostShowUser(state.channelId, uid, name)
|
await PostShowUser(state.channelId, uid, name)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -446,8 +446,8 @@ export const agora = {
|
||||||
startCameraCapture: async (bool: boolean = false) => {
|
startCameraCapture: async (bool: boolean = false) => {
|
||||||
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {
|
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {
|
||||||
format: {
|
format: {
|
||||||
width: bool ? 160 : 1280,
|
width: bool ? 160 : 1920,
|
||||||
height: bool ? 160 : 720,
|
height: bool ? 160 : 1080,
|
||||||
fps: 15,
|
fps: 15,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||