修改进入会议状态

This commit is contained in:
yj 2024-12-16 14:27:13 +08:00
parent d0387662a6
commit 63914c1fb7
1 changed files with 11 additions and 12 deletions

View File

@ -20,18 +20,17 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
if (location.hash.indexOf('/meeting') === -1) { if (location.hash.indexOf('/meeting') === -1) {
await agora.init() await agora.init()
} }
setJoinRoomSettingForm((res: any) => { const list = [...joinRoomSettingForm]
res.forEach(async (item: any, index: number) => { list.forEach(async (item: any, index: number) => {
if (index === 0 && role.ID.includes(userInfo.roleId)) { if (index === 0 && role.ID.includes(userInfo.roleId)) {
await agora.getAudioMediaList().then(res => { await agora.getAudioMediaList().then(res => {
item.active = res.ecordingList.length ? true : false item.active = res.ecordingList.length ? true : false
}) })
} else { } else {
item.active = false item.active = false
} }
}); });
return res setJoinRoomSettingForm(list)
})
setRoomNumber(roomNum) setRoomNumber(roomNum)
getDeviceList() getDeviceList()
} }