This commit is contained in:
yj 2024-08-28 15:44:02 +08:00
parent 5a30d69cc8
commit b9d967365e
2 changed files with 10 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "WGShare.Metting",
"private": true,
"version": "0.0.1",
"version": "0.0.2",
"main": "main.js",
"authors": "yj",
"description": "test",

View File

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