getOnlineParticipants method

Iterable<Participant> getOnlineParticipants(
  1. MeshDocument document
)

Implementation

Iterable<Participant> getOnlineParticipants(MeshDocument document) sync* {
  for (final participantName in getParticipantNames(document)) {
    if (participantName == room.localParticipant?.getAttribute("name")) {
      yield room.localParticipant!;
    }
    for (final part in room.messaging.remoteParticipants.where((x) => x.getAttribute("name") == participantName)) {
      yield part;
    }
  }
}