yangjie #47
|
|
@ -340,7 +340,6 @@ const Meeting: React.FC = () => {
|
|||
return res
|
||||
}))
|
||||
break;
|
||||
break;
|
||||
case 'userListWindowGetRoomKickout':
|
||||
GetRoomKickout(state.channelId, userListWindowGetRoomKickout.uid)
|
||||
break;
|
||||
|
|
@ -1013,6 +1012,17 @@ const Meeting: React.FC = () => {
|
|||
}, currentVideoId ? 0 : 1500);
|
||||
}, [currentLookUserStatus, currentVideoUid]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isScreenCapture) {
|
||||
agora.setupLocalVideo({
|
||||
uid: Number(user.uid),
|
||||
view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement,
|
||||
channelId: state.channelId,
|
||||
sourceType: VideoSourceType.VideoSourceCameraPrimary,
|
||||
type: true
|
||||
})
|
||||
}
|
||||
}, [isScreenCapture]);
|
||||
useEffect(() => {
|
||||
let timer: NodeJS.Timeout;
|
||||
|
||||
|
|
@ -1444,6 +1454,7 @@ const Meeting: React.FC = () => {
|
|||
}
|
||||
return res
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (uid === userInfo.uid || uid === userInfo.screenShareId) {
|
||||
if (String(uid).length === 9) {
|
||||
// 共享屏幕
|
||||
|
|
@ -1461,6 +1472,7 @@ const Meeting: React.FC = () => {
|
|||
setCurrentLookUserStatus(4)
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
// 全员观看
|
||||
const getShowUser = async (): Promise<void> => {
|
||||
|
|
@ -1797,15 +1809,6 @@ const Meeting: React.FC = () => {
|
|||
height: 160,
|
||||
})
|
||||
window.electron.setPosition('right')
|
||||
setTimeout(() => {
|
||||
agora.setupLocalVideo({
|
||||
uid: Number(user.uid),
|
||||
view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement,
|
||||
channelId: state.channelId,
|
||||
sourceType: VideoSourceType.VideoSourceCameraPrimary,
|
||||
type: true
|
||||
})
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -1848,6 +1851,7 @@ const Meeting: React.FC = () => {
|
|||
}
|
||||
// 停止共享
|
||||
const stopScreenCapture = async (): Promise<void> => {
|
||||
await agora.destroyRendererByView(`meetingAbsoluteVideo`)
|
||||
const footerListTemplate = [...footerList]
|
||||
await agora.leaveChannelEx(userInfo.screenShareId)
|
||||
agora.stopScreenCapture()
|
||||
|
|
|
|||
|
|
@ -395,6 +395,7 @@ export const agora = {
|
|||
},
|
||||
destroyRendererByView: async (key: string) => {
|
||||
let dom = document.getElementById(key);
|
||||
console.log(dom);
|
||||
if (dom) {
|
||||
await rtcEngine.destroyRendererByView(dom);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue