lib-jitsi-meet
    Preparing search index...

    Represents a single media track(either audio or video). One JitsiLocalTrack corresponds to one WebRTC MediaStreamTrack.

    Hierarchy

    • default
      • JitsiLocalTrack
    Index

    Constructors

    • Constructs a new JitsiLocalTrack instance.

      Parameters

      • trackInfo: ITrackInfo
        • constraints

          The contraints used for creating the track.

        • rtcId

          The ID assigned by the RTC module.

        • stream

          The WebRTC MediaStream, parent of the track.

        • track

          The underlying WebRTC MediaStreamTrack for new JitsiLocalTrack.

        • mediaType

          The MediaType of the JitsiLocalTrack.

        • videoType

          The VideoType of the JitsiLocalTrack.

        • effects

          The effects to be applied to the JitsiLocalTrack.

        • deviceId

          The ID of the local device for this track.

        • facingMode

          Thehe camera facing mode used in getUserMedia call (for mobile only).

        • sourceId

          The id of the desktop sharing source, which is the Chrome media source ID, returned by Desktop Picker on Electron. NOTE: defined for desktop sharing tracks only.

        • sourceType

          The type of source the track originates from.

      Returns JitsiLocalTrack

    Properties

    conference: JitsiConference
    deviceId: string
    disposed: boolean
    maxEnabledResolution?: number
    metadata: ITrackMetadata
    resolution?: number
    rtcId: number
    sourceId?: string
    sourceType?: string
    videoType: VideoType

    Methods

    • Adds new cancellable listener.

      Parameters

      • eventName: string

        the name of the event

      • listener: EventListener

        the listener.

      Returns () => void

      • The unsubscribe function.
    • Applies media constraints to the current MediaStreamTrack.

      Parameters

      • constraints: IAudioConstraints

        Media constraints to apply.

      Returns Promise<void>

    • Attaches the MediaStream of this track to an HTML container. Adds the container to the list of containers that are displaying the track.

      Parameters

      • container: HTMLElement

        the HTML container which can be 'video' or 'audio' element.

      Returns Promise<void>

    • Removes this JitsiTrack from the passed HTML container.

      Parameters

      • Optionalcontainer: HTMLElement

        the HTML container to detach from this JitsiTrack. If null or undefined, all containers are removed. A container can be a 'video', 'audio' or 'object' HTML element instance to which this JitsiTrack is currently attached.

      Returns void

    • Returns Promise<void>

      sending the media track. And removes it from the HTML. NOTE: Works for local tracks only.

    • Emits an event.

      Parameters

      • event: string

        event name

      • ...args: any[]

      Returns void

    • Returns facing mode for video track from camera. For other cases (e.g. audio track or 'desktop' video track) returns undefined.

      Returns CameraFacingMode

    • Returns the height of the track in normalized landscape format.

      Returns number

    • Returns id of the track.

      Returns string

      id of the track or null if this is fake track.

    • Returns the WebRTC MediaStream instance.

      Returns MediaStream

    • Returns the participant id which owns the track.

      Returns string

      the id of the participants. It corresponds to the Colibri endpoint id/MUC nickname in case of Jitsi-meet.

    • Returns the source name associated with the jitsi track.

      Returns string

      source name

    • Returns the ID of the underlying WebRTC Media Stream(if any)

      Returns string

    • Return the underlying WebRTC MediaStreamTrack

      Returns MediaStreamTrack

    • Returns the ID of the underlying WebRTC MediaStreamTrack(if any)

      Returns string

    • Return the underlying WebRTC MediaStreamTrack label

      Returns string

    • Return meaningful usage label for this track depending on it's media and eventual video type.

      Returns string

    • Returns the width of the track in normalized landscape format.

      Returns number

    • Checks whether the MediaStream is active/not ended. When there is no check for active we don't have information and so will return that stream is active (in case of FF).

      Returns boolean

      whether MediaStream is active.

    • Check if this is an audio track.

      Returns boolean

    • Returns whether the MediaStreamTrack captured from the device is in the 'ended' state or its device was found to be removed. While a stream effect is active this checks the device track, not the effect's output.

      Returns boolean

    • Check whether this is a local audio track.

      Returns boolean

      • true if track represents a local audio track, false otherwise.
    • Returns true - if the stream is muted and false otherwise.

      Returns boolean

      true - if the stream is muted and false otherwise.

    • Checks whether the attached MediaStream is receiving data from source or not. If the stream property is null (because of mute or another reason) this method will return false. NOTE: This method doesn't indicate problem with the streams directly. For example in case of video mute the method will return false or if the user has disposed the track.

      Returns boolean

      true if the stream is receiving data and false this otherwise.

    • Check if this is a video track.

      Returns boolean

    • Returns the number of listeners for the specified event.

      Parameters

      • OptionaleventName: string

        The name of the event.

      Returns number

      • The number of listeners for the event.
    • Attaches a handler for events (e.g., "participant joined") in the conference. All possible events are defined in JitsiConferenceEvents.

      Parameters

      • eventId: string

        The event ID.

      • handler: EventListener

        Handler for the event.

      Returns void

    • Removes all listeners for the given event, or for every event when no event is given.

      Parameters

      • OptionaleventName: string

        The name of the event.

      Returns void

    • Alias for off method.

      Parameters

      • eventId: string

        The event ID.

      • Optionalhandler: EventListener

        Optional, the specific handler to unbind.

      Returns void

    • Sets the audio level for the stream

      Parameters

      • audioLevel: number

        value between 0 and 1

      • Optionaltpc: TraceablePeerConnection

        the peerconnection instance which is source for the audio level. It can be undefined for a local track if the audio level was measured outside of the peerconnection (see /modules/statistics/LocalStatsCollector.js).

      Returns void

    • Sets new audio output device for track's DOM elements. Video tracks are ignored. Emits JitsiTrackEvents.TRACK_AUDIO_OUTPUT_CHANGED, and JitsiTrackEvents.TRACK_AUDIO_OUTPUT_FAILED if any element could not be switched.

      Parameters

      • audioOutputDeviceId: string

        id of 'audiooutput' device from navigator.mediaDevices.enumerateDevices(), '' for default device

      Returns Promise<void>

    • Sets the effect and switches between the modified stream and original one.

      Parameters

      • Optionaleffect: IStreamEffect

        Represents the effect instance to be used.

      Returns Promise<void>