RTCRtpStreamStats.kind
The kind
property of the 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 Browser compatibility below to determine how this affects the browsers you're targeting.
Syntax
mediaKind = RTCRtpStreamStats.kind;
Value
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
object's kind
property. It will also match the statistics object's RTCCodecStats.codec
property's media type.
Specifications
Specification |
---|
Identifiers for WebRTC's Statistics API (WebRTC Statistics) # dom-rtcrtpstreamstats-kind |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
kind |
No |
No |
63 |
No |
No |
14 |
No |
No |
63 |
No |
14 |
No |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpStreamStats/kind