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

RTCRemoteInboundRtpStreamStats: localId property

· 52CE 我爱测

The RTCRemoteInboundRtpStreamStats dictionary's **`localId`** property is a string that can be used to identify the RTCOutboundRtpStreamStats object whose RTCOutboundRtpStreamStats.remoteId matches this value.

WebRTC

The RTCRemoteInboundRtpStreamStats dictionary's localId property is a string that can be used to identify the RTCOutboundRtpStreamStats object whose RTCOutboundRtpStreamStats.remoteId matches this value.

Together, these two objects provide statistics about the inbound and outbound sides of the same synchronization source (SSRC).

Value

A string which can be compared to the value of an RTCOutboundRtpStreamStats object's RTCOutboundRtpStreamStats.remoteId property to see if the two represent statistics for each of the two sides of the same set of data sent by the local peer.

Usage notes

You can think of the local and remote views of the same RTP stream as pairs, each of which has a reference back to the other one. Thus, if an RTCStatsReport includes a remote-inbound-rtp statistics object (of type RTCRemoteInboundRtpStreamStats), it should also have a corresponding outbound-rtp object.

Both of these provide information about the same batch of packets being sent from the local device to the remote peer. The difference is that outbound-rtp offers statistics about the outgoing data from the local peer's perspective, while remote-inbound-rtp provides statistics about the same data from the perspective of the remote peer, as it is received.

Examples

See the example in RTCRemoteOutboundRtpStreamStats.localId. This shows how to correlate statistics about data sent from the remote peer (from the perspective of the remote peer) with the incoming data from the perspective of the local peer.

The code to correlate send data from the perspective of the local peer and received data from the perspective of the remote peer would be almost the same, and can be inferred from that example.

Specifications

Browser compatibility

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

资料来源与适用范围

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

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

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