files/en-us/web/api/rtcrtpreceiver/getparameters/index.md
{{APIRef("WebRTC API")}}
The getParameters() method of the {{domxref("RTCRtpReceiver")}} interface returns an object describing the current configuration for how the receiver's {{domxref("RTCRtpReceiver.track", "track")}} is decoded.
getParameters()
None.
An object indicating the current configuration of the receiver.
<!-- Spec defines as RTCRtpReceiveParameters, which is just a RTCRtpParameters -->codecs
: An array of objects describing the media codecs that the receiver is ready to use. This is the subset of codecs that the receiver has indicated it prefers and that the remote endpoint has indicated it is prepared to send. This parameter cannot be changed once initially set.
Each codec object in the array may have the following properties: <!-- RTCRtpCodecParameters -->
channels {{optional_inline}}
clockRate
mimeType
"type/subtype".
The MIME type strings used by RTP differ from those used elsewhere.
IANA maintains a registry of valid MIME types.
Also see Codecs used by WebRTC for details about potential codecs that might be referenced here.payloadType
sdpFmtpLine {{optional_inline}}
a=fmtp line in the {{Glossary("SDP")}} which corresponds to the codec {{Glossary("SDP")}} from the remote peer, if the field is present.
If there is no parameters field, this property is left out.
See section 5.8 of the IETF specification for JSEP for more information.headerExtensions
rtcp
This example obtains the canonical name (CNAME) being used for {{Glossary("RTCP")}} on an {{domxref("RTCRtpReceiver")}}.
function getRtcpCNAME(receiver) {
let parameters = receiver.getParameters();
return parameters.rtcp.cname;
}
{{Specifications}}
{{Compat}}