RTCCodecStats: payloadType property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2022.
ThepayloadType property of theRTCCodecStats dictionary is a positive integer in the range from 0 to 127 that describes the format of theRTP payload used in RTP encoding or decoding.
In this article
Value
A positive integer between 0 and 127.
The mappings of values to formats is defined in RFC3550, and more specifically inSection 6: Payload Type Definitions of RFC3551.
Specifications
| Specification |
|---|
| Identifiers for WebRTC's Statistics API> # dom-rtccodecstats-payloadtype> |
Browser compatibility
See also
payloadTypereturned byRTCEncodedAudioFrame.getMetadata()payloadTypereturned byRTCEncodedVideoFrame.getMetadata()codecs.payloadTypeoption in parameter passed toRTCRtpSender.setParameters().codecs.payloadTypein object returned byRTCRtpSender.getParameters()andRTCRtpReceiver.getParameters().