Function waitForParticipant

  • Returns a participant that matches the given identity. If identity is None, the first participant that joins the room will be returned. If the participant has already joined, the function will return immediately.

    Parameters

    • __namedParameters: {
          identity?: string;
          includeLocal: true;
          kind?: ParticipantKind | ParticipantKind[];
          room: Room;
          signal?: AbortSignal;
      }
      • Optional identity?: string
      • includeLocal: true
      • Optional kind?: ParticipantKind | ParticipantKind[]
      • room: Room
      • Optional signal?: AbortSignal

    Returns Promise<Participant>

    A promise that resolves to the participant.

  • Parameters

    • __namedParameters: {
          identity?: string;
          includeLocal?: false;
          kind?: ParticipantKind | ParticipantKind[];
          room: Room;
          signal?: AbortSignal;
      }
      • Optional identity?: string
      • Optional includeLocal?: false
      • Optional kind?: ParticipantKind | ParticipantKind[]
      • room: Room
      • Optional signal?: AbortSignal

    Returns Promise<RemoteParticipant>