Skip to main content

RTCRtpTransceiver

The WebRTC interface RTCRtpTransceiver describes a permanent pairing of an RTCRtpSender and an RTCRtpReceiver, along with some shared state.

MDN Reference

Methods

setCodecPreferences()

Call Signature

setCodecPreferences(codecs): void;

The setCodecPreferences() method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding received data, in order of decreasing preference.

MDN Reference

Parameters
ParameterType
codecsRTCRtpCodec[]
Returns

void

Call Signature

setCodecPreferences(codecs): void;

The setCodecPreferences() method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding received data, in order of decreasing preference.

MDN Reference

Parameters
ParameterType
codecsIterable<RTCRtpCodec>
Returns

void


stop()

stop(): void;

The stop() method in the RTCRtpTransceiver interface permanently stops the transceiver by stopping both the associated RTCRtpSender and RTCRtpReceiver.

MDN Reference

Returns

void

Properties

currentDirection

readonly currentDirection: RTCRtpTransceiverDirection | null;

The read-only RTCRtpTransceiver property currentDirection is a string which indicates the current negotiated directionality of the transceiver.

MDN Reference


direction

direction: RTCRtpTransceiverDirection;

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

MDN Reference


mid

readonly mid: string | null;

The read-only RTCRtpTransceiver interface's mid property specifies the negotiated media ID (mid) which the local and remote peers have agreed upon to uniquely identify the stream's pairing of sender and receiver.

MDN Reference


receiver

readonly receiver: RTCRtpReceiver;

The read-only receiver property of WebRTC's RTCRtpTransceiver interface indicates the RTCRtpReceiver responsible for receiving and decoding incoming media data for the transceiver's stream.

MDN Reference


sender

readonly sender: RTCRtpSender;

The read-only sender property of WebRTC's RTCRtpTransceiver interface indicates the RTCRtpSender responsible for encoding and sending outgoing media data for the transceiver's stream.

MDN Reference