此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

RTCRemoteInboundRtpStreamStats:codecId 属性

基线 广泛可用

自 2022年3月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

RTCRemoteInboundRtpStreamStats 字典的 codecId 属性是一个用于唯一标识需要获取统计数据的 RTP 流所对应的 RTCCodecStats 对象的字符串。

通过遍历 RTCStatsReport 中满足 RTCRemoteInboundRtpStreamStats.codecIdRTCCodecStats.id 相等的元素,进而将 RTCRemoteInboundRtpStreamStatsRTCCodecStats 对象关联起来。

包含需要检查统计信息的 RTP 流所对应的 RTCCodecStats 对象的 id 字符串。

规范

规范
Identifiers for WebRTC's Statistics API
# dom-rtcrtpstreamstats-codecid

浏览器兼容性