This commit is contained in:
parent
6d98f0fc0f
commit
ad16a0867b
|
|
@ -1261,6 +1261,7 @@ const Meeting: React.FC = () => {
|
|||
}
|
||||
// 刷新
|
||||
const refreshVideoView = async (userItem: any): Promise<void> => {
|
||||
agora.destroyRendererByConfig(Number(userItem.uid), state.channelId)
|
||||
if (userItem.uid === userInfo.uid) {
|
||||
await agora.setupLocalVideo({
|
||||
uid: Number(userItem.uid),
|
||||
|
|
@ -1295,12 +1296,12 @@ const Meeting: React.FC = () => {
|
|||
if (userItem.uid === userInfo.uid) {
|
||||
userItem.enableCamera ? agora.startCameraCapture() : agora.stopCameraCapture()
|
||||
}
|
||||
refreshVideoView(userItem)
|
||||
}
|
||||
if (key === 'OperMicr') {
|
||||
userItem.enableMicr = item.user.enableMicr;
|
||||
}
|
||||
userItem.isAdmin = role.ID.includes(item.user.roleId) || item.user.isRoomManager;
|
||||
refreshVideoView(userItem)
|
||||
}
|
||||
if (key === 'ManagerRefresh') {
|
||||
callBack && callBack()
|
||||
|
|
@ -1837,7 +1838,7 @@ const Meeting: React.FC = () => {
|
|||
const footerListTemplate = [...footerList]
|
||||
await agora.leaveChannelEx(userInfo.screenShareId)
|
||||
agora.stopScreenCapture()
|
||||
await agora.destroyRendererByView()
|
||||
await agora.destroyRendererByViewScreenCapture()
|
||||
footerListTemplate[1][0].title = '共享屏幕'
|
||||
setFooterList(footerListTemplate)
|
||||
window.electron.createChildWindow('stop')
|
||||
|
|
|
|||
|
|
@ -391,9 +391,9 @@ export const agora = {
|
|||
},
|
||||
// 销毁视频渲染dom
|
||||
destroyRendererByConfig: async (uid: number, channelId?: string) => {
|
||||
await rtcEngine.destroyRendererByConfig(VideoSourceType.VideoSourceRemote, channelId, uid);
|
||||
await rtcEngine.destroyRendererByConfig(option.uid === uid ? VideoSourceType.VideoSourceCameraPrimary : VideoSourceType.VideoSourceRemote, channelId, uid);
|
||||
},
|
||||
destroyRendererByView: async () => {
|
||||
destroyRendererByViewScreenCapture: async () => {
|
||||
let dom = document.getElementById(`meetingAbsoluteVideo`);
|
||||
if (dom) {
|
||||
await rtcEngine.destroyRendererByView(dom);
|
||||
|
|
@ -465,7 +465,7 @@ export const agora = {
|
|||
return await rtcEngine.getScreenCaptureSources(thumbSize, iconSize, includeScreen)
|
||||
},
|
||||
// 共享屏幕采集
|
||||
setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean, token:string) => {
|
||||
setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean, token: string) => {
|
||||
const user = JSON.parse(storage.getItem('user') as string)
|
||||
agora.stopScreenCapture();
|
||||
if (isComputerAudio) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue