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.
A positive number, in seconds.
RTCAudioSourceStats.totalSamplesDuration for the audio duration of sent samples.totalSamplesReceived