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 | Status | Comment |
Identifiers for WebRTC's Statistics APIThe definition of 'RTCRtpStreamStats.kind' in that specification. | Candidate Recommendation | Initial definition. |
Browser compatibility
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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
kind
|
Chrome
No support No |
Edge
No support No |
Firefox
Full support 63 |
IE
No support No |
Opera
No support No |
Safari
? |
WebView Android
No support No |
Chrome Android
No support No |
Firefox Android
Full support 63 |
Opera Android
No support No |
Safari iOS
? |
Samsung Internet Android
No support No |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
RTCRtpStreamStats.kind by Mozilla Contributors is licensed under CC-BY-SA 2.5.