#[repr(C)]pub struct VideoWidget {
pub config: VideoConfig,
pub on_frame: OptionOnVideoFrame,
}Expand description
A video-playback widget. create(config).dom() yields an <img> the
decode thread keeps fed.
Fields§
§config: VideoConfigSource URL + autoplay/loop + format.
on_frame: OptionOnVideoFrameOptional per-frame user hook (effects / save / send - azul-meet).
Implementations§
Source§impl VideoWidget
impl VideoWidget
Sourcepub fn create(config: VideoConfig) -> Self
pub fn create(config: VideoConfig) -> Self
Create a video widget for the given config.
Sourcepub fn set_on_frame<C: Into<OnVideoFrameCallback>>(
&mut self,
data: RefAny,
on_frame: C,
)
pub fn set_on_frame<C: Into<OnVideoFrameCallback>>( &mut self, data: RefAny, on_frame: C, )
Set a hook invoked with every decoded frame - for live effects, saving
frames into your data model, or sending them over the network
(azul-meet). The backreference DI pattern (see architecture.md).
Sourcepub fn with_on_frame<C: Into<OnVideoFrameCallback>>(
self,
data: RefAny,
on_frame: C,
) -> Self
pub fn with_on_frame<C: Into<OnVideoFrameCallback>>( self, data: RefAny, on_frame: C, ) -> Self
Builder form of set_on_frame.
Auto Trait Implementations§
impl Freeze for VideoWidget
impl RefUnwindSafe for VideoWidget
impl Send for VideoWidget
impl Sync for VideoWidget
impl Unpin for VideoWidget
impl UnsafeUnpin for VideoWidget
impl UnwindSafe for VideoWidget
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
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>
Converts
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>
Converts
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