This commit is contained in:
yj 2024-08-29 14:26:01 +08:00
parent daf96cd4d5
commit 016f1a8f2f
1 changed files with 2 additions and 9 deletions

View File

@ -226,16 +226,9 @@ export const agora = {
await rtcEngine.joinChannelEx(
option.tokenA,
{ channelId: option.channelId + '1', localUid: Number('1' + option.screenShareId) },
{
clientRoleType: ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
autoSubscribeAudio: true,//设置是否自动订阅所有音频流
autoSubscribeVideo: true,//设置是否自动订阅所有视频流
publishMicrophoneTrack: true,//设置是否发布麦克风采集到的音频
publishCameraTrack: true,//设置是否发布摄像头采集的视频
publishScreenTrack: false,//设置是否发布屏幕采集的视频
}
{}
);
// await agora.updateChannelMediaOptionsEx(false)
await agora.updateChannelMediaOptionsEx(false)
},
updateChannelMediaOptionsEx: async (bool: boolean) => {
rtcEngine.updateChannelMediaOptionsEx({