优化非管理员加入第二个房间什么流都不能接
This commit is contained in:
parent
193c99cbfa
commit
0702536b3c
|
|
@ -260,6 +260,7 @@ export const agora = {
|
||||||
},
|
},
|
||||||
// 所有用户加入的第二个房间
|
// 所有用户加入的第二个房间
|
||||||
allJoinChannelEx: async (bool: boolean = false) => {
|
allJoinChannelEx: async (bool: boolean = false) => {
|
||||||
|
const user = await JSON.parse(storage.getItem('user') as string)
|
||||||
await agora.startCameraCapture(true)
|
await agora.startCameraCapture(true)
|
||||||
await rtcEngine.joinChannelEx(
|
await rtcEngine.joinChannelEx(
|
||||||
option.tokenA,
|
option.tokenA,
|
||||||
|
|
@ -267,7 +268,7 @@ export const agora = {
|
||||||
{
|
{
|
||||||
clientRoleType: bool ? ClientRoleType.ClientRoleAudience : ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
|
clientRoleType: bool ? ClientRoleType.ClientRoleAudience : ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
|
||||||
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
|
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
|
||||||
autoSubscribeVideo: true,//设置是否自动订阅所有视频流
|
autoSubscribeVideo: user.roleId === '1' ? true : false,//设置是否自动订阅所有视频流
|
||||||
publishMicrophoneTrack: false,//设置是否发布麦克风采集到的音频
|
publishMicrophoneTrack: false,//设置是否发布麦克风采集到的音频
|
||||||
publishCameraTrack: true,//设置是否发布摄像头采集的视频
|
publishCameraTrack: true,//设置是否发布摄像头采集的视频
|
||||||
publishScreenTrack: false,//设置是否发布屏幕采集的视频
|
publishScreenTrack: false,//设置是否发布屏幕采集的视频
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue