The FFCLocalParticipant class represents a local participant in the FlipFlopCloud SDK. It extends the FFCParticipant class and provides additional functionality specific to local participants.

Hierarchy (View Summary)

Implements

  • IFFCLocalParticipant

Accessors

  • get attributes(): Readonly<Record<string, string>>

    Gets the participant's attributes.

    Returns Readonly<Record<string, string>>

    A read-only record of the participant's attributes.

  • get audioLevel(): number

    Gets the participant's audio level.

    Returns number

    The audio level as a number.

  • set audioLevel(level: number): void

    Sets the participant's audio level.

    Parameters

    • level: number

      The audio level to set.

    Returns void

  • get identity(): string

    Gets the participant's identity.

    Returns string

    The participant's identity as a string.

  • get isAgent(): boolean

    Indicates whether the participant is an agent.

    Returns boolean

    true if the participant is an agent, otherwise false.

  • get isCameraEnabled(): boolean

    Indicates whether the participant's camera is enabled.

    Returns boolean

    true if the camera is enabled, otherwise false.

  • get isE2EEEnabled(): boolean

    Indicates whether end-to-end encryption (E2EE) is enabled for the participant.

    Returns boolean

    true if E2EE is enabled, otherwise false.

  • get isEncrypted(): boolean

    Indicates whether the participant's media is encrypted.

    Returns boolean

    true if the participant's media is encrypted, otherwise false.

  • get isLocal(): boolean

    Indicates whether the participant is local.

    Returns boolean

    true because this is a local participant.

  • get isMicrophoneEnabled(): boolean

    Indicates whether the participant's microphone is enabled.

    Returns boolean

    true if the microphone is enabled, otherwise false.

  • get isScreenShareEnabled(): boolean

    Indicates whether the participant's screen sharing is enabled.

    Returns boolean

    true if screen sharing is enabled, otherwise false.

  • get isSpeaking(): boolean

    Indicates whether the participant is currently speaking.

    Returns boolean

    true if the participant is speaking, otherwise false.

  • get joinedAt(): undefined | Date

    Gets the date and time when the participant joined.

    Returns undefined | Date

    A Date object representing the join time, or undefined if not available.

  • get lastCameraError(): undefined | Error

    Gets the last error encountered while accessing the camera.

    Returns undefined | Error

    An Error instance, or undefined if no error occurred.

  • get lastMicrophoneError(): undefined | Error

    Gets the last error encountered while accessing the microphone.

    Returns undefined | Error

    An Error instance, or undefined if no error occurred.

  • get lastSpokeAt(): undefined | Date

    Gets the date and time when the participant last spoke.

    Returns undefined | Date

    A Date object representing the last time the participant spoke, or undefined if not available.

  • get metadata(): undefined | string

    Gets the participant's metadata.

    Returns undefined | string

    The participant's metadata as a string, or undefined if not set.

  • get name(): undefined | string

    Gets the participant's name.

    Returns undefined | string

    The participant's name as a string, or undefined if not set.

  • get permissions(): undefined | FFCParticipantPermission

    Gets the participant's permissions.

    Returns undefined | FFCParticipantPermission

    The participant's permissions as an FFCParticipantPermission instance, or undefined if not set.

  • get sid(): string

    Gets the participant's unique session identifier (SID).

    Returns string

    The participant's SID as a string.

Methods

  • Enables both the camera and microphone for the participant.

    Returns Promise<void>

    A promise that resolves when both are enabled.

  • Republishes all tracks for the participant.

    Parameters

    • Optionalopts: FFCTrackPublishOptions

      (Optional) Track publishing options.

    • restartTracks: boolean = true

      (Optional) Whether to restart the tracks before republishing. Defaults to true.

    Returns Promise<void>

    A promise that resolves when all tracks are republished.

  • Sets the attributes for the participant.

    Parameters

    • attributes: Record<string, any>

      A record of attributes to set.

    Returns Promise<void>

    A promise that resolves when the attributes are set.

  • Sets the metadata for the participant.

    Parameters

    • metadata: string

      The metadata to set as a string.

    Returns Promise<void>

    A promise that resolves when the metadata is set.

  • Sets the name of the participant.

    Parameters

    • name: string

      The name to set as a string.

    Returns Promise<void>

    A promise that resolves when the name is set.

  • Sets track subscription permissions for the participant.

    Parameters

    • allParticipantsAllowed: boolean

      Whether all participants are allowed to subscribe to the tracks.

    • participantTrackPermissions: FFCParticipantTrackPermission[]

      An array of track permissions for specific participants.

    Returns void

  • Unpublishes a track for the participant.

    Parameters

    • track: MediaStreamTrack | FFCLocalTrack<Kind>

      The track to unpublish, either as an FFCLocalTrack or a MediaStreamTrack.

    • OptionalstopOnUnpublish: boolean

      (Optional) Whether to stop the track when it is unpublished.

    Returns Promise<undefined | FFCLocalTrackPublication>

    A promise that resolves to the unpublished track publication, or undefined if not available.