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