This commit is contained in:
parent
6606d22b91
commit
5550b6e950
|
|
@ -301,8 +301,8 @@ const Meeting: React.FC = () => {
|
||||||
if (item.user.uid === userInfo.uid) {
|
if (item.user.uid === userInfo.uid) {
|
||||||
await agora.updateChannelMediaOptions(item.user.isRoomManager)
|
await agora.updateChannelMediaOptions(item.user.isRoomManager)
|
||||||
if (!item.user.isRoomManager) {
|
if (!item.user.isRoomManager) {
|
||||||
postOpenMicr(false, userInfo.id)
|
await postOpenMicrApi(false, userInfo.uid)
|
||||||
postOpenCamera(false, userInfo.id)
|
await postOpenCameraApi(false, userInfo.uid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setAllUserListData('ManagerRefresh', item)
|
setAllUserListData('ManagerRefresh', item)
|
||||||
|
|
@ -733,6 +733,13 @@ 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()) {
|
||||||
|
postOpenMicrApi(enableMicr, uid, isAll)
|
||||||
|
} else {
|
||||||
|
message.error(msgTips)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 开关麦克风
|
||||||
|
const postOpenMicrApi = async (enableMicr: boolean, uid: string, isAll?: boolean): Promise<void> => {
|
||||||
if (isAll) {
|
if (isAll) {
|
||||||
await PostMuteAll({
|
await PostMuteAll({
|
||||||
roomNum: state.channelId,
|
roomNum: state.channelId,
|
||||||
|
|
@ -757,10 +764,8 @@ const Meeting: React.FC = () => {
|
||||||
enableMicr
|
enableMicr
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
message.error(msgTips)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开关视频
|
// 开关视频
|
||||||
const postOpenCamera = async (enableCamera: boolean, uid: string): Promise<void> => {
|
const postOpenCamera = async (enableCamera: boolean, uid: string): Promise<void> => {
|
||||||
if (getUserRoomInfo()) {
|
if (getUserRoomInfo()) {
|
||||||
|
|
@ -776,6 +781,13 @@ const Meeting: React.FC = () => {
|
||||||
message.error(msg)
|
message.error(msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
postOpenCameraApi(enableCamera, uid)
|
||||||
|
} else {
|
||||||
|
message.error(msgTips)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 开关视频
|
||||||
|
const postOpenCameraApi = async (enableCamera: boolean, uid: string): Promise<void> => {
|
||||||
if (enableCamera) {
|
if (enableCamera) {
|
||||||
await agora.startCameraCapture()
|
await agora.startCameraCapture()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -786,9 +798,6 @@ const Meeting: React.FC = () => {
|
||||||
uid,
|
uid,
|
||||||
enableCamera
|
enableCamera
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
message.error(msgTips)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 演讲者模式
|
// 演讲者模式
|
||||||
// const changeSpeakerMode = (): void => {
|
// const changeSpeakerMode = (): void => {
|
||||||
|
|
@ -1120,7 +1129,7 @@ const Meeting: React.FC = () => {
|
||||||
{item.userName}{item.uid === user.uid ? '(我)' : ''}
|
{item.userName}{item.uid === user.uid ? '(我)' : ''}
|
||||||
{item.roleId === '1' || item.isRoomManager ?
|
{item.roleId === '1' || item.isRoomManager ?
|
||||||
<span style={{ color: '#02B188', marginLeft: '4px' }}>
|
<span style={{ color: '#02B188', marginLeft: '4px' }}>
|
||||||
{item.roleId === '1' ? '主持人' : '临时主持人'}
|
{item.roleId === '1' ? '主讲人' : '主讲人'}
|
||||||
</span>
|
</span>
|
||||||
: null}
|
: null}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue