lib-jitsi-meet
    Preparing search index...

    Represents a single media track (either audio or video).

    Hierarchy (View Summary)

    Index

    Constructors

    • Represents a single media track (either audio or video).

      Parameters

      • conference: JitsiConference

        the rtc instance

      • stream: MediaStream

        the WebRTC MediaStream instance

      • track: MediaStreamTrack

        the WebRTC MediaStreamTrack instance, must be part of the given stream.

      • streamInactiveHandler: (this: MediaStreamTrack, ev: Event) => void

        the function that will handle onended/oninactive events of the stream.

      • trackMediaType: MediaType

        the media type of the JitsiTrack

      • OptionalvideoType: VideoType

        the VideoType for this track if any

      Returns JitsiTrack

    Properties

    conference: JitsiConference
    disposed: boolean
    videoType: VideoType

    Methods

    • 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

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

      Returns string

    • 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 this is a local track.

      Returns boolean

      'true' if it's a local track or 'false' otherwise.

    • Check whether this is a local audio track.

      Returns boolean

      • true if track represents a local audio track, false 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>

    • Assigns the source name to a track.

      Parameters

      • _name: string

        The name to be assigned to the track.

      Returns void