Struct VideoPlayerProps
pub struct VideoPlayerProps {Show 13 fields
pub title: Option<String>,
pub poster: Option<String>,
pub playing: bool,
pub position: Option<f64>,
pub duration: Option<f64>,
pub source: Option<String>,
pub volume: Option<f64>,
pub muted: bool,
pub set_playing: Event,
pub seek: Event,
pub set_volume: Event,
pub fail: Event,
pub engine: Option<MediaEngine>,
}Expand description
A video with its playback controls over it: play/pause, the scrubber, the volume, mute and fullscreen. The app’s player is the one truth; what the person does reaches the view as its events.
The video’s bytes are a camera, a capture, or the medium it names (a file or a stream), which the toolkit opens on the engine its app hands in.
Fields§
§title: Option<String>The video’s title, for assistive technology.
poster: Option<String>A still shown before the first frame: a picture by its address.
playing: boolWhether it plays.
position: Option<f64>Where it is, in seconds.
duration: Option<f64>How long it is, in seconds.
source: Option<String>Where it is stored, as a file:// address or a URL the engine fetches.
volume: Option<f64>The volume, 0..=1.
muted: boolWhether it is muted.
set_playing: EventPlay or pause was pressed: carries true when it plays.
seek: EventIt was moved to a place in the video: carries 0..=1.
set_volume: EventThe volume was set: carries 0..=1.
fail: EventThe player could not show its video: carries what the engine said.
engine: Option<MediaEngine>The engine the player runs the video on, which its app builds.
Trait Implementations§
§impl Component for VideoPlayerProps
impl Component for VideoPlayerProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<VideoPlayerProps, Error>
fn from_source(source: &mut dyn Source) -> Result<VideoPlayerProps, Error>
source gives. Read more§impl Default for VideoPlayerProps
impl Default for VideoPlayerProps
§fn default() -> VideoPlayerProps
fn default() -> VideoPlayerProps
Auto Trait Implementations§
impl Freeze for VideoPlayerProps
impl !RefUnwindSafe for VideoPlayerProps
impl !Send for VideoPlayerProps
impl !Sync for VideoPlayerProps
impl Unpin for VideoPlayerProps
impl UnsafeUnpin for VideoPlayerProps
impl !UnwindSafe for VideoPlayerProps
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more