pub struct LocalTracksConstraints(/* private fields */);Expand description
Local media stream for injecting into new created PeerConnections.
Implementations§
Source§impl LocalTracksConstraints
impl LocalTracksConstraints
Sourcepub fn calculate_kinds_diff(
&self,
settings: &MediaStreamSettings,
) -> LocalStreamUpdateCriteria
pub fn calculate_kinds_diff( &self, settings: &MediaStreamSettings, ) -> LocalStreamUpdateCriteria
Returns LocalStreamUpdateCriteria with MediaKind and
MediaSourceKind which are different in the provided
MediaStreamSettings.
Sourcepub fn constrain(&self, other: MediaStreamSettings)
pub fn constrain(&self, other: MediaStreamSettings)
Constrains the underlying MediaStreamSettings with the given other
MediaStreamSettings.
Sourcepub fn inner(&self) -> MediaStreamSettings
pub fn inner(&self) -> MediaStreamSettings
Clones the underlying MediaStreamSettings.
Sourcepub fn set_media_state(
&self,
state: MediaState,
kind: MediaKind,
source_kind: Option<MediaSourceKind>,
)
pub fn set_media_state( &self, state: MediaState, kind: MediaKind, source_kind: Option<MediaSourceKind>, )
Changes the underlying MediaStreamSettings basing on the provided
MediaState.
Sourcepub fn set_media_exchange_state_by_kinds(
&self,
state: Stable,
kinds: LocalStreamUpdateCriteria,
)
pub fn set_media_exchange_state_by_kinds( &self, state: Stable, kinds: LocalStreamUpdateCriteria, )
Enables/disables provided LocalStreamUpdateCriteria based on
provided media_exchange_state.
Sourcepub fn enabled(&self, kind: &MediaType) -> bool
pub fn enabled(&self, kind: &MediaType) -> bool
Indicates whether provided MediaType is enabled in the underlying
MediaStreamSettings.
Sourcepub fn muted(&self, kind: &MediaType) -> bool
pub fn muted(&self, kind: &MediaType) -> bool
Indicates whether provided MediaType is muted in the underlying
MediaStreamSettings.
Sourcepub fn is_track_enabled_and_constrained(
&self,
kind: MediaKind,
source: Option<MediaSourceKind>,
) -> bool
pub fn is_track_enabled_and_constrained( &self, kind: MediaKind, source: Option<MediaSourceKind>, ) -> bool
Indicates whether the provided MediaKind and MediaSourceKind are
enabled and constrained in this LocalTracksConstraints.
Sourcepub fn is_track_enabled(
&self,
kind: MediaKind,
source: Option<MediaSourceKind>,
) -> bool
pub fn is_track_enabled( &self, kind: MediaKind, source: Option<MediaSourceKind>, ) -> bool
Indicates whether the provided MediaKind and MediaSourceKind are
enabled in this LocalTracksConstraints.
Trait Implementations§
Source§impl Clone for LocalTracksConstraints
impl Clone for LocalTracksConstraints
Source§fn clone(&self) -> LocalTracksConstraints
fn clone(&self) -> LocalTracksConstraints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more