pub enum MediaState {
Mute(Stable),
MediaExchange(Stable),
}Expand description
All media states which can be toggled in the MediaStateControllable.
Variants§
Mute(Stable)
Responsible for changing enabled property of
MediaStreamTrack.
MediaExchange(Stable)
Responsible for changing RTCRtpTransceiverDirection to stop traffic flow.
Requires renegotiation for changes to take an effect.
Implementations§
Source§impl MediaState
impl MediaState
Sourcepub fn generate_track_patch(self, track_id: TrackId) -> TrackPatchCommand
pub fn generate_track_patch(self, track_id: TrackId) -> TrackPatchCommand
Generates TrackPatchCommand with a provided TrackId basing on
this MediaState.
If MediaState is MediaState::Mute then
TrackPatchCommand::muted will be Some.
If MediaState is MediaState::MediaExchange then
TrackPatchCommand::enabled will be Some.
Sourcepub const fn opposite(self) -> Self
pub const fn opposite(self) -> Self
Returns the opposite value to this mute_state::Stable.
Trait Implementations§
Source§impl Clone for MediaState
impl Clone for MediaState
Source§fn clone(&self) -> MediaState
fn clone(&self) -> MediaState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MediaState
impl Debug for MediaState
Source§impl Display for MediaState
impl Display for MediaState
Source§impl From<MediaState> for ChangeMediaStateError
impl From<MediaState> for ChangeMediaStateError
Source§fn from(value: MediaState) -> Self
fn from(value: MediaState) -> Self
Converts to this type from the input type.
Source§impl From<MediaState> for ChangeMediaStateError
impl From<MediaState> for ChangeMediaStateError
Source§fn from(value: MediaState) -> Self
fn from(value: MediaState) -> Self
Converts to this type from the input type.
Source§impl From<Stable> for MediaState
impl From<Stable> for MediaState
Source§impl From<Stable> for MediaState
impl From<Stable> for MediaState
impl Copy for MediaState
Auto Trait Implementations§
impl Freeze for MediaState
impl RefUnwindSafe for MediaState
impl Send for MediaState
impl Sync for MediaState
impl Unpin for MediaState
impl UnwindSafe for MediaState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more