W3cubDocs

/Web APIs

RTCRtpReceiver: getParameters() method

The getParameters() method of the RTCRtpReceiver interface returns an object describing the current configuration for the encoding and transmission of media on the receiver's track.

Syntax

js

getParameters()

Parameters

None.

Return value

An object indicating the current configuration of the receiver.

codecs

An array of RTCRtpCodecParameters objects describing the set of codecs from which the sender or receiver will choose. This parameter cannot be changed once initially set.

headerExtensions

An array of zero or more RTP header extensions, each identifying an extension supported by the sender or receiver. Header extensions are described in RFC 3550, section 5.3.1. This parameter cannot be changed once initially set.

rtcp

An RTCRtcpParameters object providing the configuration parameters used for RTCP on the sender or receiver. This parameter cannot be changed once initially set.

Examples

This example obtains the canonical name (CNAME) being used for RTCP on an RTCRtpReceiver.

js

function getRtcpCNAME(receiver) {
  let parameters = receiver.getParameters();

  return parameters.rtcp.cname;
}

Specifications

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
getParameters 59 ≤79 No No 46 11 59 59 No 43 11 7.0
return_object_property_codecs 69 ≤79 No No 56 11 69 69 No 48 11 10.0
return_object_property_headerExtensions 69 ≤79 No No 56 11 69 69 No 48 11 10.0
return_object_property_rtcp 69 ≤79 No No 56 15 69 69 No 48 15 10.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/getParameters