RTCRtpTransceiverDirection

The RTCRtpTransceiverDirection type is an enumerated set of strings which are used to describe the directionality of a RTCRtpTransceiver instance. Both the preferred direction and the currentDirection properties are of this type.

Values

The RTCRtpTransceiverDirection type is an enumeration of string values. Each describes how the transceiver's associated RTCRtpSender and RTCRtpReceiver behave as shown in the table below.

Value RTCRtpSender behavior RTCRtpReceiver behavior
"sendrecv" Offers to send RTP data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1. Offers to receive RTP data, and does so if the other peer accepts.
"sendonly" Offers to send RTP data, and will do so if the other peer accepts the connection and at least one of the sender's encodings is active1. Does not offer to receive RTP data and will not do so.
"recvonly" Does not offer to send RTP data, and will not do so. Offers to receive RTP data, and will do so if the other peer offers.
"inactive" Does not offer to send RTP data, and will not do so. Does not offer to receive RTP data and will not do so.

[1] To determine if a sender has at least one active encoding, the user agent gets its parameters using RTCRtpSender.getParameters(), then looks at the parameters' encodings property; if any of the listed encodings has its active property set to true, the sender has an active encoding.

 

Specifications

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

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) 59 (59) No support ? ?
 
Feature Android Chrome Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? (Yes) 59.0 (59) No support ? ?

See also

 

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,