去除分享屏幕描边
This commit is contained in:
parent
3e31304d43
commit
652830f6f1
|
|
@ -189,7 +189,7 @@ const Meeting: React.FC = () => {
|
||||||
const channel = new BroadcastChannel('meeting_channel');
|
const channel = new BroadcastChannel('meeting_channel');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let time: NodeJS.Timeout;
|
let time: NodeJS.Timeout;
|
||||||
// let getDesktopCapturerVideoTime: NodeJS.Timeout;
|
let getDesktopCapturerVideoTime: NodeJS.Timeout;
|
||||||
setUser(userInfo)
|
setUser(userInfo)
|
||||||
window.electron.getIsMaximized().then((res: boolean) => {
|
window.electron.getIsMaximized().then((res: boolean) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
|
@ -358,28 +358,28 @@ const Meeting: React.FC = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 10000);
|
}, 10000);
|
||||||
// getDesktopCapturerVideoTime = setInterval(() => {
|
getDesktopCapturerVideoTime = setInterval(() => {
|
||||||
// setSharedScreenItem((i: any) => {
|
setSharedScreenItem((i: any) => {
|
||||||
// if (i && i.type === 0) {
|
if (i && i.type === 0) {
|
||||||
// agora.getDesktopCapturerVideo({ width: 0, height: 0 }, { width: 0, height: 0 }, false).then(res => {
|
agora.getDesktopCapturerVideo({ width: 0, height: 0 }, { width: 0, height: 0 }, false).then(res => {
|
||||||
// if (res.length) {
|
if (res.length) {
|
||||||
// let row = res.find((item: any) => item.sourceId === i.sourceId)
|
let row = res.find((item: any) => item.sourceId === i.sourceId)
|
||||||
// if (!row) {
|
if (!row) {
|
||||||
// stopScreenCapture()
|
stopScreenCapture()
|
||||||
// setSharedScreenItem('')
|
setSharedScreenItem('')
|
||||||
// allUserLook(userInfo.uid, userInfo.userName)
|
allUserLook(userInfo.uid, userInfo.userName)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// return i
|
return i
|
||||||
// })
|
})
|
||||||
// }, 3000)
|
}, 3000)
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('customStorageChange', handleCustomStorageChange);
|
window.removeEventListener('customStorageChange', handleCustomStorageChange);
|
||||||
window.removeEventListener('wheel', handleWheelChange);
|
window.removeEventListener('wheel', handleWheelChange);
|
||||||
clearInterval(time)
|
clearInterval(time)
|
||||||
// clearInterval(getDesktopCapturerVideoTime)
|
clearInterval(getDesktopCapturerVideoTime)
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ export const agora = {
|
||||||
},
|
},
|
||||||
// 桌面捕获音频和视频的媒体源的信息
|
// 桌面捕获音频和视频的媒体源的信息
|
||||||
getDesktopCapturerVideo: async (thumbSize: any, iconSize: any, includeScreen: boolean) => {
|
getDesktopCapturerVideo: async (thumbSize: any, iconSize: any, includeScreen: boolean) => {
|
||||||
return await rtcEngine.getScreenCaptureSources(thumbSize, iconSize, includeScreen).filter((item: any) => item.type === 1)
|
return await rtcEngine.getScreenCaptureSources(thumbSize, iconSize, includeScreen)
|
||||||
},
|
},
|
||||||
// 共享屏幕采集
|
// 共享屏幕采集
|
||||||
setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean) => {
|
setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean) => {
|
||||||
|
|
@ -414,8 +414,6 @@ export const agora = {
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
windowFocus: true,
|
windowFocus: true,
|
||||||
enableHighLight: true,
|
|
||||||
highLightColor: 0xFF99CC00,
|
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -425,8 +423,6 @@ export const agora = {
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
windowFocus: true,
|
windowFocus: true,
|
||||||
enableHighLight: true,
|
|
||||||
highLightColor: 0xFF99CC00,
|
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue