MDN self-hosted library · e01.org

RTCInboundRtpStreamStats: totalSamplesDuration property

WebRTC

no runnable cells web-api-instance-property upstream source

WebRTC

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

A positive number, in seconds.

Specifications

Browser compatibility

See also

  • RTCAudioSourceStats.totalSamplesDuration for the audio duration of sent samples.
  • totalSamplesReceived