@ceeblue/web-utils
    Preparing search index...

    Class PlayerStats

    Collects variable names for player statistics metrics across different projects (e.g., wrts, webrtc). Variables remain undefined if they are not present in the stats for the current project (for example, 'latency' is undefined for webrtc). Includes the toCmcd() method to convert stats into a CMCD payload.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    audioByteRate?: number
    audioPerSecond?: number
    audioTrackBandwidth?: number
    audioTrackId?: number
    bufferAmount?: number
    buffering?: boolean
    currentTime?: number
    dataByteRate?: number
    jitter?: number
    latency?: number
    log: ILog = ...

    Start a log

    a Log object with the levels of log to call

    lostPacketCount?: number
    nackCount?: number
    playbackRate?: number
    playbackSpeed?: number
    protocol?: string
    rtt?: number
    skippedAudio?: number
    skippedVideo?: number
    stallCount?: number
    videoByteRate?: number
    videoPerSecond?: number
    videoTrackBandwidth?: number
    videoTrackId?: number

    Methods

    • Converts the current PlayerStats snapshot into a CMCD (Common Media Client Data) payload.

      Parameters

      • url: URL

        The full URL of the media object.

      • trackIds: number[]

        Track Id to generate the CMCD payload, keep empty to relate an CMCD OTHER object.

      • OptionalprevStats: PlayerStats

        Optional previous PlayerStats snapshot to calculate deltas for incremental metrics since their last reset.

      Returns Cmcd

      A CML.Cmcd object representing the CMCD payload.