OptionalaudioOptionalaudioOptionalaudioOptionalaudioOptionalbufferOptionalcurrentOptionaldataOptionaljitterOptionallatencyStart a log
OptionallostOptionalnackOptionalplaybackOptionalplaybackOptionalprotocolOptionalrttOptionalskippedOptionalskippedOptionalstallOptionalvideoOptionalvideoOptionalvideoOptionalvideoOptionalwaitingComputes and updates all player statistics based on the current connection infos, metadata, and playback state. Updates the internal properties of this class including those inherited from utils.PlayerStats.
ConnectionInfos: WebRTC connection and input stats.
Metadata: Stream metadata and track info.
number: Current playback time (media time) in seconds.
OptionalaudioTrackId: numbernumber (optional): Selected audio track ID.
OptionalvideoTrackId: numbernumber (optional): Selected video track ID.
a JSON representation of the player stats, which is the object itself in this case
Converts the current PlayerStats snapshot into a CMCD (Common Media Client Data) payload.
The full URL of the media object.
The track ID for which to generate the CMCD payload.
OptionalprevStats: utils.PlayerStatsOptional previous PlayerStats snapshot to calculate deltas for incremental metrics since their last reset.
A CML.Cmcd object representing the CMCD payload.
IStats is the interface used to implement statistics seralization The serialized object can then be sent to a server for analysis with Telemetry.
Example