VideoPlayer builder
A player for one piece of video.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::media::VideoPlayer;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
title(title: impl Into<SharedString>) -> Self
transport(transport: Rc<dyn MediaTransport>) -> Self
frame(supplier: impl Fn(&mut Window, &mut App) -> Option<AnyElement> + 'static) -> Self
poster(supplier: impl Fn(&mut Window, &mut App) -> Option<AnyElement> + 'static) -> Self
ratio(ratio: f32) -> Self
ratio_of(width: f32, height: f32) -> Self
elapsed(elapsed: impl Into<SharedString>) -> Self
remaining(remaining: impl Into<SharedString>) -> Self
step_seconds(seconds: f32) -> Self
speeds(speeds: impl IntoIterator<Item = f32>) -> Self
on_event(handler: impl Fn(&MediaEvent, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.