pub struct VideoPlayerConfig {
pub source: Computed<Url>,
pub volume: Binding<f32>,
pub aspect_ratio: AspectRatio,
pub show_controls: bool,
pub on_event: Box<dyn Fn(Event)>,
}Expand description
Configuration for the VideoPlayer component.
This configuration defines a full-featured video player with native controls.
Fields§
§source: Computed<Url>The URL of the video source.
volume: Binding<f32>The volume of the video player.
aspect_ratio: AspectRatioThe aspect ratio mode for video playback.
show_controls: boolWhether to show native playback controls.
on_event: Box<dyn Fn(Event)>The event handler for the video player.
Trait Implementations§
Source§impl Debug for VideoPlayerConfig
impl Debug for VideoPlayerConfig
Source§impl From<VideoPlayerConfig> for VideoPlayer
impl From<VideoPlayerConfig> for VideoPlayer
Source§fn from(value: VideoPlayerConfig) -> VideoPlayer
fn from(value: VideoPlayerConfig) -> VideoPlayer
Converts to this type from the input type.
Source§impl NativeView for VideoPlayerConfig
impl NativeView for VideoPlayerConfig
Source§fn stretch_axis(&self) -> StretchAxis
fn stretch_axis(&self) -> StretchAxis
Which axis (or axes) this view stretches to fill available space.
Source§impl ViewConfiguration for VideoPlayerConfig
impl ViewConfiguration for VideoPlayerConfig
Source§type View = VideoPlayer
type View = VideoPlayer
The view type that this configuration produces.
Source§fn render(self) -> <VideoPlayerConfig as ViewConfiguration>::View
fn render(self) -> <VideoPlayerConfig as ViewConfiguration>::View
Renders this configuration into a view.
Auto Trait Implementations§
impl Freeze for VideoPlayerConfig
impl !RefUnwindSafe for VideoPlayerConfig
impl !Send for VideoPlayerConfig
impl !Sync for VideoPlayerConfig
impl Unpin for VideoPlayerConfig
impl !UnwindSafe for VideoPlayerConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more