pub struct Transceiver(/* private fields */);
Expand description
Wrapper around RTCRtpTransceiver which provides handy methods for direction changes.
Implementations§
Source§impl Transceiver
impl Transceiver
Sourcepub async fn update_send_encodings(
&self,
updated_encodings: &[EncodingParameters],
) -> Result<(), UpdateSendEncodingError>
pub async fn update_send_encodings( &self, updated_encodings: &[EncodingParameters], ) -> Result<(), UpdateSendEncodingError>
Updates parameters of encodings
for the underlying RTCRtpSender of
this Transceiver
.
§Errors
With platform::Error
if the underlying setParameters() call
fails.
Source§impl Transceiver
impl Transceiver
Sourcepub fn set_recv(&self, active: bool) -> LocalBoxFuture<'static, ()>
pub fn set_recv(&self, active: bool) -> LocalBoxFuture<'static, ()>
Changes the receive direction of the specified Transceiver
.
Sourcepub fn set_send(&self, active: bool) -> LocalBoxFuture<'static, ()>
pub fn set_send(&self, active: bool) -> LocalBoxFuture<'static, ()>
Changes the send direction of the specified Transceiver
.
Sourcepub async fn has_direction(&self, direction: TransceiverDirection) -> bool
pub async fn has_direction(&self, direction: TransceiverDirection) -> bool
Indicates whether the provided TransceiverDirection
is enabled for
this Transceiver
.
Sourcepub async fn set_send_track(
&self,
new_track: Option<&Rc<Track>>,
) -> Result<(), Error>
pub async fn set_send_track( &self, new_track: Option<&Rc<Track>>, ) -> Result<(), Error>
Replaces TransceiverDirection::SEND
local::Track
of this
Transceiver
.
§Errors
Errors with platform::Error
if the underlying replaceTrack
call fails.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Indicates whether the underlying RTCRtpTransceiver is stopped.
Sourcepub async fn get_send_parameters(&self) -> SendParameters
pub async fn get_send_parameters(&self) -> SendParameters
Returns SendParameters
of the underlying RTCRtpSender.
Sourcepub async fn set_send_parameters(
&self,
params: SendParameters,
) -> Result<(), Error>
pub async fn set_send_parameters( &self, params: SendParameters, ) -> Result<(), Error>
Sets SendParameters
into the underlying RTCRtpSender.
§Errors
With platform::Error
if the underlying setParameters() call
fails.
Sourcepub fn set_codec_preferences(&self, preferred_codecs: Vec<CodecCapability>)
pub fn set_codec_preferences(&self, preferred_codecs: Vec<CodecCapability>)
Sets preferred CodecCapability
for this Transceiver
.
Trait Implementations§
Source§impl Clone for Transceiver
impl Clone for Transceiver
Source§fn clone(&self) -> Transceiver
fn clone(&self) -> Transceiver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more