This commit is contained in:
parent
2f1f8b920b
commit
fb9e8b14ce
|
|
@ -770,6 +770,20 @@ const Meeting: React.FC = () => {
|
|||
// 开关麦克风
|
||||
const postOpenMicr = async (enableMicr: boolean, uid: string, isAll?: boolean): Promise<void> => {
|
||||
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)
|
||||
} else {
|
||||
message.error(msgTips)
|
||||
|
|
@ -783,18 +797,6 @@ const Meeting: React.FC = () => {
|
|||
enableMicr
|
||||
})
|
||||
} 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({
|
||||
roomNum: state.channelId,
|
||||
uid,
|
||||
|
|
@ -997,7 +999,7 @@ const Meeting: React.FC = () => {
|
|||
</div> : null}
|
||||
{user.roleId === '1' ? <Popover placement="bottom" title={''} content={
|
||||
<div className={styles.meetingContentSwiperCardPopover}>
|
||||
{item.isRoomManager || item.roleId === '1' ? <Button
|
||||
{item.isRoomManager || item.roleId === '1' ? <Button
|
||||
type="primary"
|
||||
className='m-ant-btn'
|
||||
size={'small'}
|
||||
|
|
|
|||
Loading…
Reference in New Issue