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. |
候选推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
完整支持
不支持
兼容性未知
RTCRtpStreamStats
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent