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