yangjie #49

Merged
yangqiang merged 71 commits from yangjie into master 2025-03-10 14:21:26 +08:00
1 changed files with 21 additions and 18 deletions
Showing only changes of commit 4121283ef1 - Show all commits

View File

@ -1003,7 +1003,7 @@ const Meeting: React.FC = () => {
break;
// 共享人取消共享屏幕
case 'StopedSharedScreen':
getShowUser()
setVideoUser()
break;
}
})
@ -1726,26 +1726,29 @@ const Meeting: React.FC = () => {
}, 500);
}
// 全员观看
const getShowUser = () => {
const getShowUser = async (): Promise<void> => {
if (location.href.indexOf('/meeting') !== -1) {
await GetShowUser(state.channelId).then(async (res) => {
if (res.code === 200 && res.data) {
renderVideo(res.data)
}
})
}
}
const setVideoUser = () => {
setRoomUserList((newChatList: any) => {
setActiveSpeaker(res => {
let item = newChatList.find((item: any) => item.uid === res)
if (item && item.isRoom && item.isAdmin) {
renderVideo(res)
} else {
GetShowUser(state.channelId).then((req) => {
if (req.code === 200 && req.data) {
renderVideo(req.data)
}
})
getShowUser()
}
return res
})
return newChatList
})
}
}
// 加入房间时间
const changeCurrentSeconds = (): string => {
const duration = dayjs.duration(currentSeconds, 'seconds');
@ -2201,7 +2204,7 @@ const Meeting: React.FC = () => {
enableCamera: !storeDevice[0][1].active,
isRoomManager: userItem ? userItem.isRoomManager : false,
})
await getShowUser()
setVideoUser()
if (userItem.isRoomManager) {
await postOpenMicr(!storeDevice[0][0].active, userInfo.uid)
await postOpenCamera(!storeDevice[0][1].active, userInfo.uid)