The RTCRtpSender
interface provides the ability to control and obtain details about how a particular MediaStreamTrack
is encoded and sent to a remote peer. With it, you can configure the encoding used for the corresponding track, get information about the device's media capabilities, and so forth. You can also obtain access to an RTCDTMFSender
which can be used to send DTMF codes to the remote peer.
RTCRtpSender.dtmf
Read only
RTCDTMFSender
which can be used to send DTMF tones using "telephone-event"
payloads on the RTP session represented by the RTCRtpSender
object. If null
, the track and/or the connection doesn't support DTMF. Only audio tracks can support DTMF.RTCRtpSender.rtcpTransport
Read only
null
before the RTCDtlsTransport
object is created. When bundling is in use, more than one RTCRtpSender
can share the same transport, sending all RTP and RTCP information over that one transport.RTCRtpSender.track
Read only
MediaStreamTrack
which is being handled by the RTCRtpSender
. If track
is null
, the RTCRtpSender
doesn't transmit anything.RTCRtpSender.transport
Read only
RTCDtlsTransport
over which media data for the track
is being transmitted. The data is transmitted using RTP packets. Before the transport is established, this value is null
.RTCRtpSender.getParameters()
RTCRtpParameters
object describing the current configuration for the encoding and transmission of media on the track
.RTCRtpSender.getStats()
Promise
which is fulfilled with a RTCStatsReport
which provides statistics data for all outbound streams being sent using this RTCRtpSender
.RTCRtpSender.setParameters()
track
is encoded and transmitted to the remote peer.RTCRtpSender.replaceTrack()
RTCRtpSender
with another track, without performing renegotiation. This method can be used, for example, to toggle between the front- and rear-facing cameras on a device.RTCRtpSender.getCapabilities()
RTCRtpCapabilities
object describing the system's capabilities for sending a specified kind of media data.Specification | Status | Comment |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCRtpSender' in that specification. | Candidate Recommendation |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 34 | No | ? | ? |
dtmf |
Yes | Yes | 52 | No | ? | ? |
getStats |
No | ? | 55 | No | ? | ? |
rtcpTransport |
No | 12 | 34 | No | ? | ? |
track |
Yes | 12 | 34 | No | ? | ? |
transport |
No | 12 | 34 | No | ? | ? |
getCapabilities |
? | 12 | ? | ? | ? | ? |
getParameters |
? | ? | ? | ? | ? | ? |
replaceTrack |
65 | Yes | ? | ? | ? | Yes |
setParameters |
? | ? | ? | ? | ? | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | ? | 34 | ? | ? | Yes |
dtmf |
Yes | Yes | ? | 52 | ? | ? | Yes |
getStats |
No | No | Yes | 55 | ? | ? | No |
rtcpTransport |
No | No | ? | 34 | ? | ? | No |
track |
Yes | Yes | ? | 34 | ? | ? | Yes |
transport |
No | No | ? | 34 | ? | ? | No |
getCapabilities |
? | ? | ? | ? | ? | ? | ? |
getParameters |
? | ? | ? | ? | ? | ? | ? |
replaceTrack |
? | 65 | ? | ? | ? | Yes | ? |
setParameters |
? | ? | ? | ? | ? | ? | ? |
© 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