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 RTCInboundRtpStreamStats/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.
- RTCInboundRtpStreamStats/totalSamplesReceived
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
