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

View in English Always switch to English

RTCRemoteOutboundRtpStreamStats:codecId 属性

基线
广泛可用

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

RTCRemoteOutboundRtpStreamStats 字典的 codecId 属性是一个字符串,可用于唯一标识被检查以生成此 RTP 流对应的 RTCCodecStats 数据的对象。

通过遍历 RTCStatsReport 中满足 RTCRemoteOutboundRtpStreamStats.codecId 等于 RTCCodecStats.id 的元素来查找统计对象,进而可以将 RTCRemoteOutboundRtpStreamStats 和 RTCCodecStats 对象关联起来。

值

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

规范

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

浏览器兼容性