This commit is contained in:
parent
24a174c7b5
commit
c8dc0e3276
|
|
@ -1852,7 +1852,6 @@ const Meeting: React.FC = () => {
|
||||||
}
|
}
|
||||||
// 分享屏幕
|
// 分享屏幕
|
||||||
const clickSharedScreen = async (): Promise<void> => {
|
const clickSharedScreen = async (): Promise<void> => {
|
||||||
let data = sharedScreenList.find((item: any) => item.sourceId === sharedScreenItem.sourceId)
|
|
||||||
const elements = document.querySelectorAll('.intersectionObserver-view');
|
const elements = document.querySelectorAll('.intersectionObserver-view');
|
||||||
if (elements.length) {
|
if (elements.length) {
|
||||||
elements.forEach(item => {
|
elements.forEach(item => {
|
||||||
|
|
@ -1862,7 +1861,6 @@ const Meeting: React.FC = () => {
|
||||||
});
|
});
|
||||||
agora.setSubscribeVideoBlocklist([Number(user.screenShareId)], 1)
|
agora.setSubscribeVideoBlocklist([Number(user.screenShareId)], 1)
|
||||||
}
|
}
|
||||||
if (data) {
|
|
||||||
GetRoomRtcToken(state.channelId).then(async res => {
|
GetRoomRtcToken(state.channelId).then(async res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
await agora.destroyRendererByView(`video-source-camera-primary`)
|
await agora.destroyRendererByView(`video-source-camera-primary`)
|
||||||
|
|
@ -1887,9 +1885,6 @@ const Meeting: React.FC = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
message.error('请选择应用!')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 获取桌面可共享屏幕的引用
|
// 获取桌面可共享屏幕的引用
|
||||||
const getDesktopCapturerVideo = (): void => {
|
const getDesktopCapturerVideo = (): void => {
|
||||||
|
|
@ -3275,12 +3270,17 @@ const Meeting: React.FC = () => {
|
||||||
description={`这将停止[${isShareUser?.userName}]的共享,是否继续?`}
|
description={`这将停止[${isShareUser?.userName}]的共享,是否继续?`}
|
||||||
open={isSharePopConfirm}
|
open={isSharePopConfirm}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
|
let data = sharedScreenList.find((item: any) => item.sourceId === sharedScreenItem.sourceId)
|
||||||
|
if (data) {
|
||||||
PostSharedScreen(state.channelId).then(res => {
|
PostSharedScreen(state.channelId).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
setIsSharePopConfirm(false)
|
setIsSharePopConfirm(false)
|
||||||
clickSharedScreen()
|
clickSharedScreen()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
message.error('请选择应用!')
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setIsSharePopConfirm(false)
|
setIsSharePopConfirm(false)
|
||||||
|
|
@ -3293,11 +3293,16 @@ const Meeting: React.FC = () => {
|
||||||
}}>共享</Button>
|
}}>共享</Button>
|
||||||
</Popconfirm> :
|
</Popconfirm> :
|
||||||
<Button type="primary" className='m-ant-btn' onClick={() => {
|
<Button type="primary" className='m-ant-btn' onClick={() => {
|
||||||
|
let data = sharedScreenList.find((item: any) => item.sourceId === sharedScreenItem.sourceId)
|
||||||
|
if (data) {
|
||||||
PostSharedScreen(state.channelId).then(res => {
|
PostSharedScreen(state.channelId).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
clickSharedScreen()
|
clickSharedScreen()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
message.error('请选择应用!')
|
||||||
|
}
|
||||||
}}>共享</Button>
|
}}>共享</Button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue