The getParameters()
method of the RTCRtpSender
interface returns an object describing the current configuration for how the sender's track
will be encoded and transmitted to a remote RTCRtpReceiver
.
The getParameters()
method of the RTCRtpSender
interface returns an object describing the current configuration for how the sender's track
will be encoded and transmitted to a remote RTCRtpReceiver
.
js
getParameters()
None.
An object indicating the current configuration of the sender.
encodings
RTCRtpEncodingParameters
objects, each specifying the parameters and settings for a single codec that could be used to encode the track's media.transactionId
setParameters()
can only be called to modify the parameters returned by a specific previous call to getParameters()
. This parameter cannot be changed by the caller. codecs
RTCRtpCodecParameters
objects describing the set of codecs from which the sender or receiver will choose. This parameter cannot be changed once initially set. headerExtensions
rtcp
RTCRtcpParameters
object providing the configuration parameters used for RTCP on the sender or receiver. This parameter cannot be changed once initially set. degradationPreference
Deprecated Optional maintain-framerate
, maintain-resolution
, or balanced
. The default value is balanced
. This example gets the sender's current transaction ID; the transaction ID uniquely identifies the current set of parameters, to ensure that calls to setParameters()
are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters.
js
function getSenderTransactionID(sender) { let parameters = sender.getParameters(); return parameters.transactionId; }
In the same, way, this code gets the canonical name (CNAME) being used for RTCP on an RTCRtpSender
.
js
function getRtpCNAME(sender) { let parameters = sender.getParameters(); return parameters.rtcp.cname; }
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
getParameters |
68 | ≤79 | 46 | No | 55 | 11 | 68 | 68 | 46 | 48 | 11 | 10.0 |
return_object_property_codecs |
69 | ≤79 | 46The property is defined but not implemented/used. |
No | 56 | 11 | 69 | 69 | 46The property is defined but not implemented/used. |
48 | 11 | 10.0 |
return_object_property_degradationPreference |
No | No | No | No | No | 12.1 | No | No | No | No | 12.2 | No |
return_object_property_encodings |
69 | ≤79 | 46 | No | 56 | 12.1 | 69 | 69 | 46 | 48 | 12.2 | 10.0 |
return_object_property_headerExtensions |
69 | ≤79 | 46The property is defined but not implemented/used. |
No | 56 | 11 | 69 | 69 | 46The property is defined but not implemented/used. |
48 | 11 | 10.0 |
return_object_property_rtcp |
69 | ≤79 | 46The property is defined but not implemented/used. |
No | 56 | 15 | 69 | 69 | 46The property is defined but not implemented/used. |
48 | 15 | 10.0 |
return_object_property_transactionId |
69 | ≤79 | No | No | 56 | 12.1 | 69 | 69 | No | 48 | 12.2 | 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/RTCRtpSender/getParameters