This commit is contained in:
parent
c28481e3ba
commit
ed4106d6e0
|
|
@ -77,6 +77,7 @@ const UserVideo: React.FC = () => {
|
|||
};
|
||||
// 获取轮训用户
|
||||
const getPolling = async (): Promise<void> => {
|
||||
setUserList([])
|
||||
GetPolling(state.channelId?.split('1')[0] as string, from.viewPeopleValue).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
setUserList(res.data)
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ const Meeting: React.FC = () => {
|
|||
tokenA: state.tokenA,
|
||||
})
|
||||
if (userInfo.roleId === '1') {
|
||||
await agora.allJoinChannelEx()
|
||||
await agora.allJoinChannelEx(true)
|
||||
}
|
||||
}
|
||||
// 状态更新
|
||||
|
|
|
|||
|
|
@ -236,13 +236,13 @@ export const agora = {
|
|||
);
|
||||
},
|
||||
// 所有用户加入的第二个房间
|
||||
allJoinChannelEx: async () => {
|
||||
allJoinChannelEx: async (bool: boolean = false) => {
|
||||
await agora.startCameraCapture()
|
||||
await rtcEngine.joinChannelEx(
|
||||
option.tokenA,
|
||||
{ channelId: option.channelId + '1', localUid: Number('1' + option.screenShareId) },
|
||||
{
|
||||
clientRoleType: ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
|
||||
clientRoleType: bool ? ClientRoleType.ClientRoleAudience : ClientRoleType.ClientRoleBroadcaster , //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
|
||||
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
|
||||
autoSubscribeVideo: true,//设置是否自动订阅所有视频流
|
||||
publishMicrophoneTrack: false,//设置是否发布麦克风采集到的音频
|
||||
|
|
|
|||
Loading…
Reference in New Issue