@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

    audioPerSecond?: number
    audioTrackBandwidth?: number
    audioTrackId?: number
    bufferAmount?: number
    currentTime?: 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
    recvByteRate?: number
    rtt?: number
    sendByteRate?: number
    skippedAudio?: number
    skippedVideo?: number
    stallCount?: number
    videoPerSecond?: number
    videoTrackBandwidth?: number
    videoTrackId?: number
    waitingData?: boolean

    Methods

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

      Parameters

      • url: URL

        The full URL of the media object.

      • trackId: number

        The track ID for which to generate the CMCD payload.

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