pub struct VideoConfig {
pub source: Computed<Url>,
pub volume: Binding<f32>,
pub aspect_ratio: AspectRatio,
pub loops: bool,
pub on_event: Box<dyn Fn(Event)>,
}Expand description
Configuration for the Video component (raw video view).
This is a raw video view that displays video content without any native controls. Use this when you want to build your own custom video UI.
Fields§
§source: Computed<Url>The URL of the video source.
volume: Binding<f32>The volume of the video.
aspect_ratio: AspectRatioThe aspect ratio mode for video playback.
loops: boolWhether the video should loop when it ends.
on_event: Box<dyn Fn(Event)>The event handler for video events.
Trait Implementations§
Source§impl Debug for VideoConfig
impl Debug for VideoConfig
Source§impl From<VideoConfig> for Video
impl From<VideoConfig> for Video
Source§fn from(value: VideoConfig) -> Video
fn from(value: VideoConfig) -> Video
Converts to this type from the input type.
Source§impl NativeView for VideoConfig
impl NativeView for VideoConfig
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 VideoConfig
impl ViewConfiguration for VideoConfig
Source§fn render(self) -> <VideoConfig as ViewConfiguration>::View
fn render(self) -> <VideoConfig as ViewConfiguration>::View
Renders this configuration into a view.
Auto Trait Implementations§
impl Freeze for VideoConfig
impl !RefUnwindSafe for VideoConfig
impl !Send for VideoConfig
impl !Sync for VideoConfig
impl Unpin for VideoConfig
impl !UnwindSafe for VideoConfig
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