This commit is contained in:
parent
28119cb828
commit
2e26bdf63f
|
|
@ -144,6 +144,8 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
token,
|
token,
|
||||||
roomId: res.data.id,
|
roomId: res.data.id,
|
||||||
roomName: res.data.roomName,
|
roomName: res.data.roomName,
|
||||||
|
enableMicr: joinRoomSettingForm.list[0].active,
|
||||||
|
enableCamera: joinRoomSettingForm.list[1].active,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ const Meeting: React.FC = () => {
|
||||||
agora.registerEventHandler({
|
agora.registerEventHandler({
|
||||||
onJoinChannelSuccess: async (info: any, _elapsed: any) => {
|
onJoinChannelSuccess: async (info: any, _elapsed: any) => {
|
||||||
if (String(info.localUid).length !== 9) {
|
if (String(info.localUid).length !== 9) {
|
||||||
await getJoin()
|
await getJoin(state.enableMicr, state.enableCamera)
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await agora.setupLocalVideo({
|
await agora.setupLocalVideo({
|
||||||
uid: Number(info.localUid),
|
uid: Number(info.localUid),
|
||||||
|
|
@ -418,7 +418,7 @@ const Meeting: React.FC = () => {
|
||||||
message.success('网络已恢复。')
|
message.success('网络已恢复。')
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await onStart(async () => {
|
await onStart(async () => {
|
||||||
await getJoin()
|
await getJoin(!footerList[0][0].active, !footerList[0][1].active)
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -680,6 +680,7 @@ const Meeting: React.FC = () => {
|
||||||
})
|
})
|
||||||
setRoomUserList(res.data)
|
setRoomUserList(res.data)
|
||||||
callback && callback(res.data)
|
callback && callback(res.data)
|
||||||
|
changeAgoraDevice()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -691,7 +692,7 @@ const Meeting: React.FC = () => {
|
||||||
case 'reconnect':
|
case 'reconnect':
|
||||||
if (e.value == true) {
|
if (e.value == true) {
|
||||||
storage.setItem('reconnect', false)
|
storage.setItem('reconnect', false)
|
||||||
await getJoin()
|
await getJoin(!footerList[0][0].active, !footerList[0][1].active)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -792,11 +793,11 @@ const Meeting: React.FC = () => {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
// 加入房间
|
// 加入房间
|
||||||
const getJoin = async (): Promise<void> => {
|
const getJoin = async (enableMicr: boolean, enableCamera: boolean): Promise<void> => {
|
||||||
await GetJoin({
|
await GetJoin({
|
||||||
roomNum: state.channelId,
|
roomNum: state.channelId,
|
||||||
enableMicr: true,
|
enableMicr,
|
||||||
enableCamera: true
|
enableCamera
|
||||||
})
|
})
|
||||||
await getRoomUser()
|
await getRoomUser()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue