pub enum TrackConstraints {
Audio(AudioTrackConstraints),
Video(VideoSource),
}Expand description
Wrapper around MediaTrackConstraints.
Variants§
Implementations§
Source§impl TrackConstraints
impl TrackConstraints
Sourcepub async fn satisfies<T: AsRef<MediaStreamTrack>>(&self, track: T) -> bool
pub async fn satisfies<T: AsRef<MediaStreamTrack>>(&self, track: T) -> bool
Checks whether the provided platform::MediaStreamTrack satisfies
these TrackConstraints.
Sourcepub const fn required(&self) -> bool
pub const fn required(&self) -> bool
Returns an importance of these TrackConstraints.
If these TrackConstraints are important then without them a session
call can’t be started.
Sourcepub const fn media_source_kind(&self) -> MediaSourceKind
pub const fn media_source_kind(&self) -> MediaSourceKind
Returns these TrackConstraints media source kind.
Sourcepub const fn media_kind(&self) -> MediaKind
pub const fn media_kind(&self) -> MediaKind
Returns MediaKind of these TrackConstraints.
Trait Implementations§
Source§impl Clone for TrackConstraints
impl Clone for TrackConstraints
Source§fn clone(&self) -> TrackConstraints
fn clone(&self) -> TrackConstraints
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 TrackConstraints
impl Debug for TrackConstraints
Source§impl From<&TrackConstraints> for MediaKind
impl From<&TrackConstraints> for MediaKind
Source§fn from(media_type: &TrackConstraints) -> Self
fn from(media_type: &TrackConstraints) -> Self
Converts to this type from the input type.
Source§impl From<MediaType> for TrackConstraints
impl From<MediaType> for TrackConstraints
Source§fn from(caps: ProtoTrackConstraints) -> Self
fn from(caps: ProtoTrackConstraints) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TrackConstraints
impl RefUnwindSafe for TrackConstraints
impl Send for TrackConstraints
impl Sync for TrackConstraints
impl Unpin for TrackConstraints
impl UnwindSafe for TrackConstraints
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