From 7ad3970e4e0e44e0490dcc88bc72ef2a57fe2666 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Wed, 14 Aug 2024 13:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/package/agora.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/utils/package/agora.ts b/src/utils/package/agora.ts index 2c4835b..0d8431c 100644 --- a/src/utils/package/agora.ts +++ b/src/utils/package/agora.ts @@ -142,12 +142,12 @@ const agora = { // 加入频道 joinChannel: () => { rtcEngine.joinChannel(option.token, option.channelId, option.uid, { - autoSubscribeAudio: true, - autoSubscribeVideo: true, - publishMicrophoneTrack: true, - publishCameraTrack: true, - clientRoleType: ClientRoleType.ClientRoleBroadcaster, - publishScreenTrack: false, + autoSubscribeAudio: true,//设置是否自动订阅所有音频流 + autoSubscribeVideo: true,//设置是否自动订阅所有视频流 + publishMicrophoneTrack: true,//设置是否发布麦克风采集到的音频 + publishCameraTrack: true,//设置是否发布摄像头采集的视频 + clientRoleType: ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众 + publishScreenTrack: false,//设置是否发布屏幕采集的视频 }); }, // 共享屏幕单独用户 @@ -157,12 +157,12 @@ const agora = { option.token, { channelId: option.channelId, localUid: Number(uid) }, { - autoSubscribeAudio: false, - autoSubscribeVideo: false, - publishMicrophoneTrack: false, - publishCameraTrack: false, - clientRoleType: ClientRoleType.ClientRoleBroadcaster, - publishScreenTrack: true, + autoSubscribeAudio: false,//设置是否自动订阅所有音频流 + autoSubscribeVideo: false,//设置是否自动订阅所有视频流 + publishMicrophoneTrack: false,//设置是否发布麦克风采集到的音频 + publishCameraTrack: false,//设置是否发布摄像头采集的视频 + clientRoleType: ClientRoleType.ClientRoleBroadcaster,//用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众 + publishScreenTrack: true,//设置是否发布屏幕采集的视频 } ); },