diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 5c64bba600f9798..5716a012b2e9a07 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -8431,6 +8431,7 @@ /en-US/docs/Web/API/RTCRtpSender/getCapabilities() /en-US/docs/Web/API/RTCRtpSender/getCapabilities /en-US/docs/Web/API/RTCRtpSynchronizationSource /en-US/docs/Web/API/RTCRtpReceiver/getSynchronizationSources /en-US/docs/Web/API/RTCRtpSynchronizationSource/voiceActivityFlag /en-US/docs/Web/API/RTCRtpReceiver/getSynchronizationSources +/en-US/docs/Web/API/RTCRtpTransceiverDirection /en-US/docs/Web/API/RTCRtpTransceiver/direction /en-US/docs/Web/API/RTCRtpTransceiverInit /en-US/docs/Web/API/RTCPeerConnection/addTransceiver /en-US/docs/Web/API/RTCSctpTransportState /en-US/docs/Web/API/RTCSctpTransport/state /en-US/docs/Web/API/RTCSdpType /en-US/docs/Web/API/RTCSessionDescription/type diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 216ff10d161d80c..d720a6464aa576c 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -71617,13 +71617,6 @@ "fscholz" ] }, - "Web/API/RTCRtpTransceiverDirection": { - "modified": "2020-10-15T22:01:44.116Z", - "contributors": [ - "fscholz", - "Sheppy" - ] - }, "Web/API/RTCSctpTransport": { "modified": "2020-10-15T21:46:42.744Z", "contributors": [ diff --git a/files/en-us/web/api/rtcrtptransceiver/currentdirection/index.md b/files/en-us/web/api/rtcrtptransceiver/currentdirection/index.md index 4055988ab268308..461bd8947e1bbfd 100644 --- a/files/en-us/web/api/rtcrtptransceiver/currentdirection/index.md +++ b/files/en-us/web/api/rtcrtptransceiver/currentdirection/index.md @@ -20,8 +20,7 @@ The read-only {{domxref("RTCRtpTransceiver")}} property **`currentDirection`** is a string which indicates the current directionality of the transceiver. -Its value is one of the strings defined by -the {{domxref("RTCRtpTransceiverDirection")}} enumeration. +Its value is one of the strings defined in the table below. You can examine and set the transceiver's preferred directionality using {{domxref("RTCRtpTransceiver.direction", "direction")}} property. @@ -34,9 +33,50 @@ var direction = RTCRtpTransceiver.currentDirection ### Value -A {{domxref("DOMString")}} whose value is one of the strings which are a member of the -`RTCRtpTransceiverDirection` enumerated type. -{{page("/en-US/docs/Web/API/RTCRtpTransceiverDirection", "Values")}} +A {{domxref("DOMString")}} whose value is one of the strings which are a member of the following values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueRTCRtpSender behaviorRTCRtpReceiver behavior
"sendrecv" + Offers to send {{Glossary("RTP")}} data, and will do so if the + other peer accepts the connection and at least one of the sender's + encodings is active. + + 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 active. + 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.
## Specifications diff --git a/files/en-us/web/api/rtcrtptransceiver/direction/index.md b/files/en-us/web/api/rtcrtptransceiver/direction/index.md index 59751af965ade0e..f3c08d8578d31eb 100644 --- a/files/en-us/web/api/rtcrtptransceiver/direction/index.md +++ b/files/en-us/web/api/rtcrtptransceiver/direction/index.md @@ -20,8 +20,7 @@ The {{domxref("RTCRtpTransceiver")}} property **`direction`** is a string which indicates the transceiver's preferred directionality. -Its value must be one of the strings defined by the -{{domxref("RTCRtpTransceiverDirection")}} enumeration. +Its value must be one of the strings defined in the table below. The transceiver's _current_ direction is indicated by the {{domxref("RTCRtpTransceiver.currentDirection", "currentDirection")}} property. @@ -34,10 +33,50 @@ var direction = RTCRtpTransceiver.direction ### Value -A {{domxref("DOMString")}} whose value is one of the strings which are a member of the -`RTCRtpTransceiverDirection` enumerated type, indicating the transceiver's -preferred direction. {{page("/en-US/docs/Web/API/RTCRtpTransceiverDirection", - "Values")}} +A {{domxref("DOMString")}} whose value is one of the strings which are a member of the following values, indicating the transceiver's preferred direction. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueRTCRtpSender behaviorRTCRtpReceiver behavior
"sendrecv" + Offers to send {{Glossary("RTP")}} data, and will do so if the + other peer accepts the connection and at least one of the sender's + encodings is active. + + 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 active. + 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.
### Exceptions diff --git a/files/en-us/web/api/rtcrtptransceiver/index.md b/files/en-us/web/api/rtcrtptransceiver/index.md index bb9ac3221938130..c52b350d5e9609f 100644 --- a/files/en-us/web/api/rtcrtptransceiver/index.md +++ b/files/en-us/web/api/rtcrtptransceiver/index.md @@ -25,9 +25,9 @@ A transceiver is uniquely identified using its {{domxref("RTCRtpTransceiver.mid" ## Properties - {{domxref("RTCRtpTransceiver.currentDirection", "currentDirection")}} {{ReadOnlyInline}} - - : A read-only string from the enum {{domxref("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. To change the transceiver's directionality, set the value of the {{domxref("RTCRtpTransceiver.direction", "direction")}} property. + - : A read-only string 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. To change the transceiver's directionality, set the value of the {{domxref("RTCRtpTransceiver.direction", "direction")}} property. - {{domxref("RTCRtpTransceiver.direction", "direction")}} - - : A string from the enum {{domxref("RTCRtpTransceiverDirection")}} which is used to set the transceiver's desired direction. + - : A string which is used to set the transceiver's desired direction. - {{domxref("RTCRtpTransceiver.mid", "mid")}} {{ReadOnlyInline}} - : The media ID of the m-line associated with this transceiver. This association is established, when possible, whenever either a local or remote description is applied. This field is `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. - {{domxref("RTCRtpTransceiver.receiver", "receiver")}} {{ReadOnlyInline}} diff --git a/files/en-us/web/api/rtcrtptransceiverdirection/index.md b/files/en-us/web/api/rtcrtptransceiverdirection/index.md deleted file mode 100644 index 143d327357d118b..000000000000000 --- a/files/en-us/web/api/rtcrtptransceiverdirection/index.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: RTCRtpTransceiverDirection -slug: Web/API/RTCRtpTransceiverDirection -tags: - - API - - Audio - - Media - - RTCRtpTransceiver - - RTCRtpTransceiverDirection - - RTP - - Reference - - Transceiver - - Transceiver Directionality - - Video - - WebRTC - - inactive - - recvonly - - sendonly - - sendrecv -browser-compat: api.RTCRtpTransceiverDirection ---- -{{APIRef("WebRTC")}} - -The **`RTCRtpTransceiverDirection`** type is an enumerated set of strings which are used to describe the directionality of a {{domxref("RTCRtpTransceiver")}} instance. - -Both the preferred {{domxref("RTCRtpTransceiver.direction", "direction")}} and the {{domxref("RTCRtpTransceiver.currentDirection", "currentDirection")}} properties are of this type. - -## Values - -The `RTCRtpTransceiverDirection` type is an enumeration of string values. Each describes how the transceiver's associated {{domxref("RTCRtpSender")}} and {{domxref("RTCRtpReceiver")}} behave as shown in the table below. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueRTCRtpSender behaviorRTCRtpReceiver behavior
"sendrecv" - Offers to send {{Glossary("RTP")}} data, and will do so if the - other peer accepts the connection and at least one of the sender's - encodings is active. - - 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 active. - 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.
- -To determine if a sender has at least one active encoding, the {{Glossary("user agent")}} gets its parameters using {{domxref("RTCRtpSender.getParameters()")}}, then looks at the parameters' {{domxref("RTCRtpParameters.encodings", "encodings")}} property; if any of the listed encodings has its {{domxref("RTCRtpEncodingParameters.active", "active")}} property set to `true`, the sender has an active encoding. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- [WebRTC API](/en-US/docs/Web/API/WebRTC_API) -- [Introduction to the Real-time Transport Protocol (RTP)](/en-US/docs/Web/API/WebRTC_API/Intro_to_RTP) -- {{domxref("RTCRtpTransceiver.direction")}} and {{domxref("RTCRtpTransceiver.currentDirection")}} -- {{domxref("RTCRtpReceiver")}} and {{domxref("RTCRtpSender")}}