RTCInboundRtpStreamStats: totalSamplesDuration 属性
RTCRemoteInboundRtpStreamStats
字典中的 totalSamplesDuration
属性表示已接收到的所有音频样本的总时长。换句话说,就是轨道的当前时长。
可以将其与 totalAudioEnergy
一起使用,以计算不同时间间隔内的平均音频级别。
注意:此值对于视频流是未定义的。
值
一个正数,单位为秒。
规范
规范 |
---|
WebRTC 统计 API 的标识符 # dom-rtcinboundrtpstreamstats-totalsamplesduration |
浏览器兼容性
加载中…
另见
RTCAudioSourceStats.totalSamplesDuration
用于表示已发送样本的音频时长。totalSamplesReceived