lib-jitsi-meet
    Preparing search index...

    QualityController class that is responsible for maintaining optimal video quality experience on the local endpoint by controlling the codec, encode resolution and receive resolution of the remote video streams. It also makes adjustments based on the outbound and inbound rtp stream stats reported by the underlying peer connection.

    Index

    Constructors

    • Parameters

      • conference: JitsiConference

        The JitsiConference instance.

      • options: {
            enableAdaptiveMode: boolean;
            jvb: object;
            lastNRampupTime: number;
            p2p: object;
        }

        video quality settings passed through config.js.

      Returns QualityController

    Accessors

    Methods

    • Creates a debounced function that delays the execution of the provided function until after the specified delay has elapsed. Unlike typical debounce implementations, the timer does not reset when the function is called again within the delay period.

      Parameters

      • func: Function

        The function to be debounced.

      • delay: number

        The delay in milliseconds.

      Returns (...args: any) => void

      • The debounced function.
    • Adjusts the lastN value so that fewer remote video sources are received from the bridge in an attempt to improve encode resolution of the outbound video streams based on cpuLimited parameter passed. If cpuLimited is false, the lastN value will slowly be ramped back up to the channelLastN value set in config.js.

      Parameters

      • cpuLimited: boolean

        whether the endpoint is cpu limited or not.

      Returns boolean

      boolean - Returns true if an action was taken, false otherwise.

    • Adjusts the requested resolution for remote video sources by updating the receiver constraints in an attempt to improve the encode resolution of the outbound video streams.

      Returns void

    • Updates the codec preference order for the local endpoint on the active media session and switches the video codec if needed.

      Parameters

      • trackId: number

        The track ID of the local video track for which stats have been captured.

      Returns boolean

      • Returns true if video codec was changed.
    • Adjusts codec, lastN or receive resolution based on the send resolution (of the outbound streams) and limitation reported by the browser in the WebRTC stats. Recovery is also attempted if the limitation goes away. No action is taken if the adaptive mode has been disabled through config.js.

      Parameters

      • sourceStats: ISourceStats

        The outbound-rtp stats for a local video track.

      Returns void