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,//设置是否发布屏幕采集的视频 } ); },