This commit is contained in:
yj 2024-10-16 17:57:52 +08:00
parent 6b653becd9
commit 29b06d7903
2 changed files with 13 additions and 7 deletions

View File

@ -12,20 +12,26 @@ import { role } from '@/config/role';
let time = null as any;
const JoinSetting = forwardRef((_props: any, ref: any) => {
useImperativeHandle(ref, () => ({
changeModal: (roomNum: string = '') => {
changeModal: async (roomNum: string = '') => {
let userInfo = JSON.parse(storage.getItem('user') as string)
setUser(userInfo)
setJoinRoomSettingModal(true)
if (location.hash.indexOf('/meeting') === -1) {
await agora.init()
}
setJoinRoomSettingForm((res: any) => {
res.forEach((item: any) => {
res.forEach((item: any, index: number) => {
if (index === 0) {
agora.getAudioMediaList().then(res => {
item.active = res.ecordingList.length ? true : false
})
} else {
item.active = false
}
});
return res
})
setRoomNumber(roomNum)
if (location.hash.indexOf('/meeting') === -1) {
agora.init()
}
getDeviceList()
}
}))

View File

@ -595,7 +595,7 @@ const Meeting: React.FC = () => {
message.success(`操作成功`)
await agora.updateChannelMediaOptions(item.user.isRoomManager)
await postOpenMicrApi(item.user.isRoomManager, userInfo.uid, false)
await postOpenCameraApi(item.user.isRoomManager, userInfo.uid)
await postOpenCameraApi(false, userInfo.uid) // 不管身份如何改变都关闭摄像头
await stopScreenCapture()
} else {
message.success(`${item.user.userName}已结束发言`)