pub struct RTCRtpTransceiver { /* private fields */ }
Expand description

RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.

Implementations§

source§

impl RTCRtpTransceiver

source

pub async fn new( receiver: Arc<RTCRtpReceiver>, sender: Arc<RTCRtpSender>, direction: RTCRtpTransceiverDirection, kind: RTPCodecType, codecs: Vec<RTCRtpCodecParameters>, media_engine: Arc<MediaEngine>, trigger_negotiation_needed: TriggerNegotiationNeededFnOption ) -> Arc<Self>

source

pub async fn set_codec_preferences( &self, codecs: Vec<RTCRtpCodecParameters> ) -> Result<()>

set_codec_preferences sets preferred list of supported codecs if codecs is empty or nil we reset to default from MediaEngine

source

pub async fn sender(&self) -> Arc<RTCRtpSender>

sender returns the RTPTransceiver’s RTPSender if it has one

source

pub async fn set_sender_track( self: &Arc<Self>, sender: Arc<RTCRtpSender>, track: Option<Arc<dyn TrackLocal + Send + Sync>> ) -> Result<()>

set_sender_track sets the RTPSender and Track to current transceiver

source

pub async fn set_sender(self: &Arc<Self>, s: Arc<RTCRtpSender>)

source

pub async fn receiver(&self) -> Arc<RTCRtpReceiver>

receiver returns the RTPTransceiver’s RTPReceiver if it has one

source

pub fn mid(&self) -> Option<SmolStr>

mid gets the Transceiver’s mid value. When not already set, this value will be set in CreateOffer or create_answer.

source

pub fn kind(&self) -> RTPCodecType

kind returns RTPTransceiver’s kind.

source

pub fn direction(&self) -> RTCRtpTransceiverDirection

direction returns the RTPTransceiver’s desired direction.

source

pub async fn set_direction(&self, d: RTCRtpTransceiverDirection)

Set the direction of this transceiver. This might trigger a renegotiation.

source

pub fn current_direction(&self) -> RTCRtpTransceiverDirection

current_direction returns the RTPTransceiver’s current direction as negotiated.

If this transceiver has never been negotiated or if it’s stopped this returns RTCRtpTransceiverDirection::Unspecified.

source

pub async fn stop(&self) -> Result<()>

stop irreversibly stops the RTPTransceiver

Trait Implementations§

source§

impl Debug for RTCRtpTransceiver

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V