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

RTCInboundRtpStreamStats: fecPacketsReceived property

· 52CE 我爱测

The **`fecPacketsReceived`** property of the RTCInboundRtpStreamStats dictionary indicates how many Forward Error Correction (FEC) packets have been received by this RTP receiver from the remote peer.

WebRTC

The fecPacketsReceived property of the RTCInboundRtpStreamStats dictionary indicates how many Forward Error Correction (FEC) packets have been received by this RTP receiver from the remote peer.

A FEC packet provides parity information that can be used to attempt to reconstruct RTP data packets which have been corrupted in transit.

Value

A positive integer value.

Description

This property indicates the total number of FEC packets which have been received from the remote peer during this RTP session.

Forward Error Correction uses an exclusive-or method to perform parity checks on the received data. By using the FEC parity information to attempt to reconstruct damaged packets, it is possible to avoid the need to retransmit damaged packets, which in turn helps to reduce lag, or the need to skip damaged frames entirely.

[!NOTE] This counter may also be incremented when FEC packets arrive in-band along with media content; this can happen with Opus, for example.

It's possible that a subset of the FEC packets which have been received were discarded instead of being used. This can happen if the packets covered by the FEC packets have already been received successfully or have already been reconstructed using a previously-received FEC packet. This may also happen if the FEC packet arrives outside the window of time in which the client will attempt to use it.

If you wish to know how many of the received packets were discarded, you can examine the value of RTCInboundRtpStreamStats.fecPacketsDiscarded.

Specifications

Browser compatibility

See also

  • (RTP Payload Format for Generic Forward Error Correction)

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

资料来源与适用范围

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

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

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