This commit is contained in:
yj 2024-09-05 10:52:19 +08:00
parent fa309a9985
commit d397b27d49
1 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,6 @@ export const agora = {
},
// 所有用户加入的第二个房间
allJoinChannelEx: async (bool: boolean) => {
await agora.startCameraCapture()
await rtcEngine.joinChannelEx(
option.tokenA,
{ channelId: option.channelId + 'a', localUid: Number('1' + option.screenShareId) },
@ -254,6 +253,7 @@ export const agora = {
updateChannelMediaOptionsEx: async (bool: boolean) => {
let obj;
if (bool) {
await agora.startCameraCapture()
obj = {
clientRoleType: ClientRoleType.ClientRoleBroadcaster, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
@ -263,6 +263,7 @@ export const agora = {
publishScreenTrack: false,//设置是否发布屏幕采集的视频
}
} else {
await agora.stopCameraCapture();
obj = {
clientRoleType: ClientRoleType.ClientRoleAudience, //用户角色 ClientRoleBroadcaster 主播 ClientRoleAudience 观众
autoSubscribeAudio: false,//设置是否自动订阅所有音频流
@ -276,7 +277,6 @@ export const agora = {
},
// 退出第二个房间
allLeaveChannelEx: async () => {
await agora.stopCameraCapture();
await rtcEngine.leaveChannelEx({ channelId: option.channelId + 'a', localUid: Number('1' + option.screenShareId) })
},
// ai降噪