pub struct DisplayVideoTrackConstraints {
pub required: bool,
pub device_id: Option<ConstrainString<String>>,
pub height: Option<ConstrainU32>,
pub width: Option<ConstrainU32>,
pub frame_rate: Option<ConstrainU32>,
}Expand description
Constraints applicable to video tracks sourced from a screen capturing.
Fields§
§required: boolImportance of this DisplayVideoTrackConstraints.
If true then without these DisplayVideoTrackConstraints a session
call can’t be started.
device_id: Option<ConstrainString<String>>Identifier of the device generating the content for the media track.
height: Option<ConstrainU32>Height of the video in pixels.
width: Option<ConstrainU32>Width of the video in pixels.
frame_rate: Option<ConstrainU32>Frame rate of the video.
Implementations§
Source§impl DisplayVideoTrackConstraints
impl DisplayVideoTrackConstraints
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates new DisplayVideoTrackConstraints with none constraints
configured.
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
contained DisplayVideoTrackConstraints.
Sourcepub fn merge(&mut self, another: Self)
pub fn merge(&mut self, another: Self)
Merges these DisplayVideoTrackConstraints with another ones,
meaning that if some constraints are not set on these, then they will be
applied from another.
Sourcepub const fn exact_height(&mut self, height: u32)
pub const fn exact_height(&mut self, height: u32)
Sets an exact height constraint.
Sourcepub const fn ideal_height(&mut self, height: u32)
pub const fn ideal_height(&mut self, height: u32)
Sets an ideal height constraint.
Sourcepub const fn exact_width(&mut self, width: u32)
pub const fn exact_width(&mut self, width: u32)
Sets an exact width constraint.
Sourcepub const fn ideal_width(&mut self, width: u32)
pub const fn ideal_width(&mut self, width: u32)
Sets an ideal width constraint.
Sourcepub const fn exact_frame_rate(&mut self, frame_rate: u32)
pub const fn exact_frame_rate(&mut self, frame_rate: u32)
Sets an exact frameRate constraint.
Sourcepub const fn ideal_frame_rate(&mut self, frame_rate: u32)
pub const fn ideal_frame_rate(&mut self, frame_rate: u32)
Sets an ideal frameRate constraint.
Sourcepub const fn required(&self) -> bool
pub const fn required(&self) -> bool
Returns an importance of this DisplayVideoTrackConstraints.
If these DisplayVideoTrackConstraints are important then without
them a session call can’t be started.
Trait Implementations§
Source§impl Clone for DisplayVideoTrackConstraints
impl Clone for DisplayVideoTrackConstraints
Source§fn clone(&self) -> DisplayVideoTrackConstraints
fn clone(&self) -> DisplayVideoTrackConstraints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisplayVideoTrackConstraints
impl Debug for DisplayVideoTrackConstraints
Source§impl Default for DisplayVideoTrackConstraints
impl Default for DisplayVideoTrackConstraints
Source§fn default() -> DisplayVideoTrackConstraints
fn default() -> DisplayVideoTrackConstraints
Source§impl From<ApiDisplayVideoTrackConstraints> for DisplayVideoTrackConstraints
impl From<ApiDisplayVideoTrackConstraints> for DisplayVideoTrackConstraints
Source§fn from(value: ApiDisplayVideoTrackConstraints) -> Self
fn from(value: ApiDisplayVideoTrackConstraints) -> Self
Source§impl From<DisplayVideoTrackConstraints> for MediaTrackConstraints
impl From<DisplayVideoTrackConstraints> for MediaTrackConstraints
Source§fn from(from: DisplayVideoTrackConstraints) -> Self
fn from(from: DisplayVideoTrackConstraints) -> Self
Source§impl PartialEq for DisplayVideoTrackConstraints
impl PartialEq for DisplayVideoTrackConstraints
Source§fn eq(&self, other: &DisplayVideoTrackConstraints) -> bool
fn eq(&self, other: &DisplayVideoTrackConstraints) -> bool
self and other values to be equal, and is used by ==.