This commit is contained in:
yj 2024-08-19 14:13:43 +08:00
parent 2f1f8b920b
commit fb9e8b14ce
1 changed files with 15 additions and 13 deletions

View File

@ -770,6 +770,20 @@ const Meeting: React.FC = () => {
// 开关麦克风 // 开关麦克风
const postOpenMicr = async (enableMicr: boolean, uid: string, isAll?: boolean): Promise<void> => { const postOpenMicr = async (enableMicr: boolean, uid: string, isAll?: boolean): Promise<void> => {
if (getUserRoomInfo()) { if (getUserRoomInfo()) {
if (!isAll) {
let msg = '';
if (uid === user.uid) {
await agora.getAudioMediaList().then(res => {
if (!res.ecordingList.length) {
msg = '未检测到麦克风!'
}
})
}
if (msg) {
message.error(msg)
return
}
}
postOpenMicrApi(enableMicr, uid, isAll) postOpenMicrApi(enableMicr, uid, isAll)
} else { } else {
message.error(msgTips) message.error(msgTips)
@ -783,18 +797,6 @@ const Meeting: React.FC = () => {
enableMicr enableMicr
}) })
} else { } else {
let msg = '';
if (uid === user.uid) {
await agora.getAudioMediaList().then(res => {
if (!res.ecordingList.length) {
msg = '未检测到麦克风!'
}
})
}
if (msg) {
message.error(msg)
return
}
await PostOpenMicr({ await PostOpenMicr({
roomNum: state.channelId, roomNum: state.channelId,
uid, uid,
@ -997,7 +999,7 @@ const Meeting: React.FC = () => {
</div> : null} </div> : null}
{user.roleId === '1' ? <Popover placement="bottom" title={''} content={ {user.roleId === '1' ? <Popover placement="bottom" title={''} content={
<div className={styles.meetingContentSwiperCardPopover}> <div className={styles.meetingContentSwiperCardPopover}>
{item.isRoomManager || item.roleId === '1' ? <Button {item.isRoomManager || item.roleId === '1' ? <Button
type="primary" type="primary"
className='m-ant-btn' className='m-ant-btn'
size={'small'} size={'small'}