Display Attendees Count - iOS
In this guide, we will see how you can display the number of attendees in realtime.
note
Before going forward in this guide, do make sure all the attendees join the meeting with mode as SIGNALLING_ONLY
- We will get the all the
participantsexcept local participant usingparticipantsproperty of the theMeetingclass. With all the participants, we will filter out participants who have joined as aSIGNALLING_ONLYand then display that count.
- Swift
class LiveStreamViewController: ObservableObject {
@Published var viewerParticipantCount: Int = 0
//...
}
extension LiveStreamViewController: MeetingEventListener {
func onMeetingJoined() {
//...
viewerParticipantCount = 1
}
func onParticipantJoined(_ participant: Participant) {
//...
viewerParticipantCount +=
meeting?.participants.values.count { $0.mode == .SIGNALLING_ONLY } ?? 0
}
}
API Reference
The API references for all the methods utilized in this guide are provided below.
Got a Question? Ask us on discord

