fix: Only query "getPeersInCall" when using internal signaling

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Marcel Müller 2025-01-21 19:58:51 +01:00
Родитель fc0001c5a9
Коммит 9d0b558635
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -197,7 +197,6 @@ static NSString * const kNCScreenTrackKind = @"screen";
[NCUtils log:[NSString stringWithFormat:@"Did join call in NCCallController for token %@", self.room.token]];
[self.delegate callControllerDidJoinCall:self];
[self getPeersForCall];
[self startMonitoringMicrophoneAudioLevel];
if (self->_externalSignalingController) {
@ -205,6 +204,8 @@ static NSString * const kNCScreenTrackKind = @"screen";
[self createPublisherPeerConnection];
}
} else {
// Only with internal signaling we need to query the API for peers in call
[self getPeersForCall];
[self->_signalingController startPullingSignalingMessages];
}
@ -820,7 +821,7 @@ static NSString * const kNCScreenTrackKind = @"screen";
}];
}
#pragma mark - Call participants
#pragma mark - Call participants (internal signaling)
- (void)getPeersForCall
{
@ -1506,7 +1507,7 @@ static NSString * const kNCScreenTrackKind = @"screen";
// Calculate sessions that join the call
[newSessions removeObjectsInArray:oldSessions];
if (newSessions.count > 0) {
if (newSessions.count > 0 && !_externalSignalingController) {
[self getPeersForCall];
}