This commit is contained in:
yj 2024-08-28 16:49:17 +08:00
parent b9d967365e
commit 3998bed6ff
1 changed files with 3 additions and 6 deletions

View File

@ -864,8 +864,7 @@ const Meeting: React.FC = () => {
case '停止共享':
await getUserRoomInfo().then(async (res) => {
if (res) {
await stopScreenCapture(true)
await allUserLook(userInfo.uid, userInfo.userName)
await stopScreenCapture()
} else {
message.error(msgTips)
}
@ -1033,15 +1032,13 @@ const Meeting: React.FC = () => {
}
}
// 停止共享
const stopScreenCapture = async (bool: boolean = true): Promise<void> => {
const stopScreenCapture = async (): Promise<void> => {
const footerListTemplate = [...footerList]
await agora.leaveChannelEx(userInfo.screenShareId)
agora.stopScreenCapture()
footerListTemplate[1][0].title = '共享屏幕'
setFooterList(footerListTemplate)
if (bool) {
renderVideo()
}
renderVideo()
}
// 获取房间用户
const getRoomUser = async (): Promise<void> => {