A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/direction below:

RTCRtpTransceiver: direction property - Web APIs

RTCRtpTransceiver: direction property

Baseline Widely available *

The RTCRtpTransceiver property direction is a string that indicates the transceiver's preferred directionality.

The directionality indicates whether the transceiver will offer to send and/or receive RTP data, or whether it is inactive or stopped (terminated). When setting the transceiver's direction, the value is not applied immediately. The current direction is indicated by the currentDirection property.

Value

A string with one of the following values:

"sendrecv"

Transceiver offers to send and receive RTP data:

"sendonly"

Transceiver offers to send but not receive RTP data:

"recvonly"

Transceiver offers to receive but not set RTP data:

"inactive"

Transceiver is inactive:

"stopped"

This is the terminal state of the transceiver. The transceiver is stopped and will not send or receive RTP data or offer to do so. Setting this value when the transceiver is not already stopped raises a TypeError.

Exceptions

When setting the value of direction, the following exception can occur:

InvalidStateError DOMException

The receiver's RTCPeerConnection is closed or the RTCRtpReceiver is stopped.

TypeError

The value is being set to stopped when the current value is anything other than stopped.

Description

The direction property can be used to set or get the transceiver's preferred directionality.

Updating the directionality does not take effect immediately. If the new value of direction is different from the existing value, renegotiation of the connection is required, so a negotiationneeded event is sent to the RTCPeerConnection. A direction value (other than stopped) is then used by RTCPeerConnection.createOffer() or RTCPeerConnection.createAnswer() in order to generate the SDP message created those methods. For example, if the direction is specified as "sendrecv", the corresponding SDP a-line indicates the directionality:

a=sendrecv

The new directionality takes effect once the negotiation process is completed and the new session description is successfully applied.

The transceiver's current direction is indicated by the currentDirection property.

Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3