RTCInboundRtpStreamStats: totalSamplesDuration property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since October 2022.
The totalSamplesDuration
property of the RTCRemoteInboundRtpStreamStats
dictionary indicates the total duration of all audio samples that have been received.
In other words, the current duration of the track.
This can be used with totalAudioEnergy
to compute an average audio level over different intervals.
Note: The value is undefined for video streams.
Value
An positive number, in seconds.
Specifications
Specification |
---|
Identifiers for WebRTC's Statistics API> # dom-rtcinboundrtpstreamstats-totalsamplesduration> |
Browser compatibility
Loading…
See also
RTCAudioSourceStats.totalSamplesDuration
for the audio duration of sent samples.totalSamplesReceived