RTCRtpTransceiver
The WebRTC interface RTCRtpTransceiver describes a permanent pairing of an RTCRtpSender and an RTCRtpReceiver, along with some shared state.
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.
Parameters
| Parameter | Type |
|---|---|
codecs | RTCRtpCodec[] |
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.
Parameters
| Parameter | Type |
|---|---|
codecs | Iterable<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.
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.
direction
direction: RTCRtpTransceiverDirection;
The RTCRtpTransceiver property direction is a string that indicates the transceiver's preferred directionality.
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.
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.
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.