Contents

isNearbyWithLocalParticipant

A Boolean value that indicates whether the participant is physically nearby with the local participant.

Declaration

var isNearbyWithLocalParticipant: Bool { get }

Mentioned in

Discussion

This property is always true for the local participant.

You can observe which remote participants are nearby with the $activeParticipants publisher.

for await activeParticipants in session.$activeParticipants.values {
    // Ignore the local participant value that defaults to 'true'.
    self.isNearbyWithOthers = activeParticipants.contains {
         $0 != session.localParticipant && $0.isNearbyWithLocalParticipant
    }
}