大网数据广告活动
Web 标准与前端开发

RTCInboundRtpStreamStats: insertedSamplesForDeceleration property

· 52CE 我爱测

The **`insertedSamplesForDeceleration`** property of the RTCInboundRtpStreamStats dictionary accumulates the difference between the number of samples received and the number of samples played out of the jitter while audio playout is slowed down.

WebRTC

The insertedSamplesForDeceleration property of the RTCInboundRtpStreamStats dictionary accumulates the difference between the number of samples received and the number of samples played out of the jitter while audio playout is slowed down.

The WebRTC jitter buffer sets a target playout delay level such that the inflow and outflow of the jitter buffer should be approximately the same. If the jitter buffer empties too quickly the audio sample that is next in line to be output may be "ahead of schedule", and the jitter buffer may slow down playout. If the jitter buffer slows down the playout of the sample by inserting additional audio samples, this property indicates the accumulated number of such added samples.

Slowing down and/or speeding up the audio (as tracked with RTCInboundRtpStreamStats.removedSamplesForAcceleration) may result in audible warbling or other distortion. The totals at the end of the call also give you some indication of how many samples or seconds were impacted, and insertedSamplesForDeceleration can be correlated with RTCInboundRtpStreamStats/totalSamplesReceived to get a relative measure of deceleration. Logging insertedSamplesForDeceleration and removedSamplesForAcceleration in timeslices can be helpful for isolating the times at which the problem occurred and you can then correlate other metrics in the same timeslice to determine likely causes.

[!NOTE] The value is undefined for video streams.

Value

A positive integer.

Specifications

Browser compatibility

See also

  • RTCInboundRtpStreamStats.removedSamplesForAcceleration
  • The better way in "How WebRTC's NetEQ Jitter Buffer Provides Smooth Audio" (webrtchacks.com, June 2025)

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。