W3cubDocs

/DOM

RTCRtpSender.setParameters

The setParameters() method of the RTCRtpSender interface applies changes the configuration of the RTCRtpSender.track property. RTCRtpSender.track is an instance of MediaStreamTrack.

Syntax

var promise = rTCRtpSender.setParameters(parameters)

Parameters

parameters Optional
An object that sets options for the RTCRtpSender.track property. The available options are:
  • transactionId: An unique identifier for the last set of parameters applied. This property ensures that setParameters() can only be called based on a previous RTCRtpSender.getParameters() call, and that there are no intervening changes.
  • encodings: An array of RTCRtpEncodingParameters for RTP encodings of media.
  • degradationPreference: Indicates how the RtpSender should deal with low bandwidth, either degrading resolution or degrading framerate. Valid values are "maintain-framerate", "maintain-resolution", or "balanced" (the default).

Return value

A Promise that resolves when the RTCRtpSender.track property is updated.

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'setParameters()' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.RTCRtpSender.setParameters()" (depth: 1) to the MDN compatibility data repository.

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/setParameters