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

RTCRtpReceiver: jitterBufferTarget property

· 52CE 我爱测

The **`jitterBufferTarget`** property of the RTCRtpReceiver interface is a DOMHighResTimeStamp that indicates the application's preferred duration, in milliseconds, for which the jitter should hold media before playing it out.

WebRTC API

The jitterBufferTarget property of the RTCRtpReceiver interface is a DOMHighResTimeStamp that indicates the application's preferred duration, in milliseconds, for which the jitter should hold media before playing it out.

The application can use it to influence the tradeoff between playout delay and the risk of running out of audio or video frames due to network jitter.

Value

A DOMHighResTimeStamp that indicates the current jitter buffer target hold time, in milliseconds.

The value can be set to a positive value of no greater than 4000 milliseconds.

Exceptions

  • RangeError
    • : Thrown if the target is set to a negative value or a value that is greater than 4000 milliseconds.

Description

The value of the attribute influences the amount of buffering done by the user agent, which in turn affects retransmissions and packet loss recovery.

Note that the attribute "influences" the jitter buffer target of the user agent, but does not directly set it. The actual user agent jitter buffer target will vary between maximum and minimum allowed values that reflects a target range that the user agent can provide based on network conditions and memory constraints, and can change at any time. The value returned by jitterBufferTarget is not affected by the actual target of the user agent.

The average jitter buffer delay can be calculated by dividing the RTCInboundRtpStreamStats.jitterBufferTargetDelay by the RTCInboundRtpStreamStats.jitterBufferEmittedCount . In order to observe the effects of modifying the jitter buffer target you can track the change in the value of this average over time. You can also compare to the RTCInboundRtpStreamStats.jitterBufferTargetDelay (or its average) in order to factor out the intrinsic network factors that affect the delay.

If RTCRtpReceiver audio and video tracks are synchronized, then the larger of the two receivers jitterBufferTarget should be used for both receivers.

Specifications

Browser compatibility

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

资料来源与适用范围

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

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

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