For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface RTCRtpTransceiver

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

MDN Reference

interface RTCRtpTransceiver {
    currentDirection: RTCRtpTransceiverDirection | null;
    direction: RTCRtpTransceiverDirection;
    mid: string | null;
    receiver: RTCRtpReceiver;
    sender: RTCRtpSender;
    setCodecPreferences(codecs: RTCRtpCodec[]): void;
    setCodecPreferences(codecs: Iterable<RTCRtpCodec>): void;
    stop(): void;
}
Index
currentDirection: RTCRtpTransceiverDirection | null

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

MDN Reference

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

MDN Reference

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: 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: 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

  • 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

    Returns 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

    Returns void

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

    MDN Reference

    Returns void

Was this helpful?