@ceeblue/wrts-client
    Preparing search index...

    Interface IPlaying

    Interface for real-time playback information

    interface IPlaying {
        log: ILog;
        get audioByteRate(): number;
        get audioPerSecond(): number;
        get bufferAmount(): number;
        get buffering(): boolean;
        get bufferLimitHigh(): number;
        get bufferLimitLow(): number;
        get bufferLimitMiddle(): number;
        get bufferState(): BufferState;
        get dataByteRate(): number;
        get maximumResolution(): Resolution | undefined;
        get passthroughCMAF(): boolean | undefined;
        get playbackRate(): number;
        get playbackSpeed(): number;
        get recvByteRate(): number;
        get reliable(): boolean;
        get signal(): AbortSignal;
        get tracksCombinable(): boolean | undefined;
        get videoByteRate(): number;
        get videoPerSecond(): number;
        computeStats(): PlayerStats;
        off(
            name:
                | "BufferState"
                | "BufferChange"
                | "Stall"
                | "AudioSkipping"
                | "VideoSkipping"
                | "bufferstate"
                | "bufferchange"
                | "stall"
                | "audioskipping"
                | "videoskipping",
            event: Function,
        ): boolean;
        on(
            name:
                | "BufferState"
                | "BufferChange"
                | "Stall"
                | "AudioSkipping"
                | "VideoSkipping"
                | "bufferstate"
                | "bufferchange"
                | "stall"
                | "audioskipping"
                | "videoskipping",
            event: Function,
            options?: { signal?: AbortSignal },
        ): void;
        onAudioSkipping(holeMs: number): void;
        onBufferChange(): void;
        onBufferState(oldState: BufferState): void;
        once(
            name:
                | "BufferState"
                | "BufferChange"
                | "Stall"
                | "AudioSkipping"
                | "VideoSkipping"
                | "bufferstate"
                | "bufferchange"
                | "stall"
                | "audioskipping"
                | "videoskipping",
            event: Function,
            options?: { signal?: AbortSignal },
        ): void;
        onStall(): void;
        onVideoSkipping(holeMs: number): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    log: ILog

    Start a log

    a Log object with the levels of log to call

    Accessors

    • get audioByteRate(): number

      Gets the audio byte rate in bytes per second, include only the audio payload data.

      Returns number

    • get audioPerSecond(): number

      Get the number of audio sample per second currently decoding

      Returns number

    • get bufferAmount(): number

      Gets the current playback buffer duration in milliseconds

      Returns number

    • get bufferLimitMiddle(): number

      Gets the target (middle) buffer size in milliseconds. Latency control mechanisms will try to drive the buffer toward this value.

      Returns number

    • get dataByteRate(): number

      Gets the data byte rate in bytes per second, include messages and other non-media payload data like container overhead.

      Returns number

    • get passthroughCMAF(): boolean | undefined

      Source is CMAF and passthrough it to MSE, it's a debugging mode activable when you set Connect.Params.mediaExt to 'cmaf'

      Returns boolean | undefined

    • get playbackRate(): number

      Gets the current playback rate. A value of 1.0 represents real-time playback.

      Returns number

    • get playbackSpeed(): number

      Gets the effective playback speed. A value of 1.0 represents real-time playback.

      Returns number

    • get recvByteRate(): number

      Gets the current receive byte rate including audio, video and data channels

      Returns number

    • get reliable(): boolean

      Gets whether playback is reliable By default is false while playback is in an unreliable mode with frame skipping enabled, otherwise can returns true when configured to not tolerate any frame loss

      Returns boolean

    • get signal(): AbortSignal

      Gets an AbortSignal useful for subscribing to playback stop events.

      Returns AbortSignal

    • get tracksCombinable(): boolean | undefined

      Indicates whether tracks can be combined in the same request, by default tracks are combinable to optimize the number of requests

      Returns boolean | undefined

    • get videoByteRate(): number

      Gets the video byte rate in bytes per second, include only the video payload data.

      Returns number

    • get videoPerSecond(): number

      Get the number of video frame per second currently decoding

      Returns number

    Methods

    • Event unsubscription

      Parameters

      • name:
            | "BufferState"
            | "BufferChange"
            | "Stall"
            | "AudioSkipping"
            | "VideoSkipping"
            | "bufferstate"
            | "bufferchange"
            | "stall"
            | "audioskipping"
            | "videoskipping"

        Name of event without the 'on' prefix (ex: 'log' to 'onLog' event declared)

      • event: Function

        Unsubscriber Function, must be the one passed to on or once subscription methods

      Returns boolean

    • Event subscription

      Parameters

      • name:
            | "BufferState"
            | "BufferChange"
            | "Stall"
            | "AudioSkipping"
            | "VideoSkipping"
            | "bufferstate"
            | "bufferchange"
            | "stall"
            | "audioskipping"
            | "videoskipping"

        Name of event without the on prefix (ex: log to onLog event declared)

      • event: Function

        Subscriber Function

      • Optionaloptions: { signal?: AbortSignal }
        • Optionalsignal?: AbortSignal

          Optional AbortSignal to stop this or multiple subscriptions in same time

      Returns void

    • Event subscription only one time, once time fired it's automatically unsubscribe

      Parameters

      • name:
            | "BufferState"
            | "BufferChange"
            | "Stall"
            | "AudioSkipping"
            | "VideoSkipping"
            | "bufferstate"
            | "bufferchange"
            | "stall"
            | "audioskipping"
            | "videoskipping"

        Name of event without the on prefix (ex: log to onLog event declared)

      • event: Function

        Subscriber Function

      • Optionaloptions: { signal?: AbortSignal }
        • Optionalsignal?: AbortSignal

          Optional AbortSignal to stop this or multiple subscriptions in same time

      Returns void

    Events

    • Event fire on audio skipping

      Parameters

      • holeMs: number

      Returns void

    • Event fire when buffer amount changes by a configured threshold

      Returns void

    • Event fire on video skipping

      Parameters

      • holeMs: number

      Returns void