webrtc.interfaces.rtc_rtp_transceiver#

class webrtc.interfaces.rtc_rtp_transceiver.RTCRtpTransceiver(native_obj=None)#

Bases: webrtc.base.WebRTCObject

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

property currentDirection: Optional[webrtc.TransceiverDirection]#

Alias for current_direction

property current_direction: Optional[webrtc.TransceiverDirection]#

A member of webrtc.TransceiverDirection enum, indicating the current directionality of the transceiver.

property direction: webrtc.TransceiverDirection#

A member of webrtc.TransceiverDirection enum, indicating the transceiver’s preferred direction.

Note

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

property mid: Optional[str]#

A str which uniquely identifies the pairing of source and destination of the transceiver’s stream. Its value is taken from the media ID of the SDP m-line. This value is None if negotiation has not completed.

property receiver: webrtc.RTCRtpReceiver#

A webrtc.RTCRtpReceiver object which is responsible for receiving and decoding incoming media data whose media ID is the same as the current value of mid.

property sender: webrtc.RTCRtpSender#

A webrtc.RTCRtpSender object used to encode and send media whose media ID matches the current value of mid.

stop() None#

Permanently stops the transceiver by stopping both the associated webrtc.RTCRtpSender and webrtc.RTCRtpReceiver.

Note

The stopped property was provided to return True if the connection is stopped. That property has been deprecated and will be removed at some point. Instead, check the value of currentDirection. If it’s webrtc.TransceiverDirection.stopped, the transceiver has been stopped.

property stopped: bool#

A bool value which is True if the transceiver’s sender will no longer send data, and its receiver will no longer receive data. If either or both are still at work, the result is False.

Warning

Deprecated: This feature is no longer recommended.