Struct medea_jason::peer::sender::Sender [−][src]
Representation of a local::Track
that is being sent to some remote peer.
Implementations
impl Sender
[src]
pub fn new(
state: &State,
media_connections: &MediaConnections,
send_constraints: LocalTracksConstraints,
track_events_sender: UnboundedSender<TrackEvent>
) -> Result<Rc<Self>, Traced<MediaConnectionsError>>
[src]
state: &State,
media_connections: &MediaConnections,
send_constraints: LocalTracksConstraints,
track_events_sender: UnboundedSender<TrackEvent>
) -> Result<Rc<Self>, Traced<MediaConnectionsError>>
Creates new Transceiver
if provided mid
is None
, otherwise
retrieves existing Transceiver
via provided mid
from a
provided MediaConnections
. Errors if Transceiver
lookup
fails.
Errors
Errors with MediaConnectionsError::TransceiverNotFound
if State
has Some
mid
, but this mid
isn’t found in the
MediaConnections
.
pub fn caps(&self) -> &TrackConstraints
[src]
Returns TrackConstraints
of this Sender
.
#[must_use]pub fn is_publishing(&self) -> bool
[src]
Indicates whether this Sender
is publishing media traffic.
pub async fn remove_track(&self)
[src]
Drops local::Track
used by this Sender
. Sets track used by
sending side of inner transceiver to None
.
Panics
If replaceTrack() call fails. This might happen if an underlying
RTCRtpSender is stopped. replaceTrack() with null
track
should never fail for any other reason.
#[must_use]pub fn has_track(&self) -> bool
[src]
Indicates whether this Sender
has local::Track
.
#[must_use]pub fn transceiver(&self) -> Transceiver
[src]
Returns Transceiver
of this Sender
.
#[must_use]pub fn mid(&self) -> Option<String>
[src]
pub fn send_media_exchange_state_intention(&self, state: Transition)
[src]
Sends TrackEvent::MediaExchangeIntention
with the provided
media_exchange_state
.
pub fn send_mute_state_intention(&self, state: Transition)
[src]
Sends TrackEvent::MuteUpdateIntention
with the provided
mute_state
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Sender
impl !Send for Sender
impl !Sync for Sender
impl Unpin for Sender
impl !UnwindSafe for Sender
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.