kind 特性为 RTCRtpStreamStats dictionary is a string indicating whether the described RTP stream contains audio or video media. Its value is always either "audio" or "video" .

This property was previously called mediaType . The name was changed in the specification in February, 2018. See 浏览器兼容性 below to determine how this affects the browsers you're targeting.

句法

mediaKind = RTCRtpStreamStats.kind;
					

A DOMString whose value is "audio" if the track whose statistics are given by the RTCRtpStreamStats object contains audio, or "video" if the track contains video media.

This string will always be the same as the one provided by the associated MediaStreamTrack 对象的 kind property. It will also match the statistics object's RTCCodecStats.codec property's media type.

规范

规范 状态 注释
Identifiers for WebRTC's Statistics API
The definition of 'RTCRtpStreamStats.kind' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
kind Chrome No Edge No Firefox 63 IE No Opera No Safari ? WebView Android No Chrome Android No Firefox Android 63 Opera Android No Safari iOS ? Samsung Internet Android No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

元数据

  • 最后修改: