The WebRTC interface RTCRtpTransceiver describes a permanent pairing of an RTCRtpSender and an RTCRtpReceiver, along with some shared state.
Each SDP media section describes one bidirectional SRTP ("Secure Real Time Protocol") stream (excepting the media section for RTCDataChannel, if present). This pairing of send and receive SRTP streams is significant for some applications, so RTCRtpTransceiver is used to represent this pairing, along with other important state from the media section. Each non-disabled SRTP media section is always represented by exactly one transceiver.
A transceiver is uniquely identified using its mid property, which is the same as the media ID (mid) of its corresponding m-line. An RTCRtpTransceiver is associated with an m-line if its mid is non-null; otherwise it's considered disassociated.
currentDirection Read only
RTCRtpTransceiverDirection which indicates the transceiver's current directionality, or null if the transceiver is stopped or has never participated in an exchange of offers and answers.directionRTCRtpTransceiverDirection which is used to set the transceiver's desired direction.mid Read only
null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer.receiver Read only
RTCRtpReceiver object that handles receiving and decoding incoming media.sender Read only
RTCRtpSender object responsible for encoding and sending data to the remote peer.stoppedRTCRtpSender and RTCRtpReceiver has been permanently disabled, either due to SDP offer/answer, or due to a call to stop().setCodecPreferences()RTCRtpCodecParameters objects which override the default preferences used by the user agent for the transceiver's codecs.stop()RTCRtpTransceiver. The associated sender stops sending data, and the associated receiver likewise stops receiving and decoding incoming data.| Specification | Status | Comment |
|---|---|---|
| WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCRtpTransceiver' in that specification. | Candidate Recommendation |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | No | Yes | 59 | No | No | ? |
currentDirection |
No | ? | 59 | No | No | ? |
direction |
No | ? | 59 | No | No | ? |
mid |
No | ? | 59 | No | No | ? |
receiver |
No | ? | 59 | No | No | ? |
sender |
No | ? | 59 | No | No | ? |
stopped |
No | ? | 59 | No | No | ? |
setCodecPreferences |
No | ? | No | No | No | ? |
stop |
No | ? | 59 | No | No | ? |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | No | No | ? | 59 | No | ? | No |
currentDirection |
No | No | ? | 59 | No | ? | No |
direction |
No | No | ? | 59 | No | ? | No |
mid |
No | No | ? | 59 | No | ? | No |
receiver |
No | No | ? | 59 | No | ? | No |
sender |
No | No | ? | 59 | No | ? | No |
stopped |
No | No | ? | 59 | No | ? | No |
setCodecPreferences |
No | No | ? | No | No | ? | No |
stop |
No | No | ? | 59 | No | ? | No |
RTCPeerConnection.addTrack() and RTCPeerConnection.addTransceiver() both create transceiversRTCRtpReceiver and RTCRtpSender
© 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/RTCRtpTransceiver