lib-jitsi-meet
    Preparing search index...

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

    Hierarchy (View Summary)

    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

    • 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 facing mode for video track from camera. For other cases (e.g. audio track or 'desktop' video track) returns undefined.

      Returns CameraFacingMode

    • 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.

    • 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.

    • 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.

    • 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.

      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>