AudioPlayer builder
A player for one piece of audio.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::media::AudioPlayer;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
title(title: impl Into<SharedString>) -> Self
subtitle(subtitle: impl Into<SharedString>) -> Self
transport(transport: Rc<dyn MediaTransport>) -> Self
elapsed(elapsed: impl Into<SharedString>) -> Self
remaining(remaining: impl Into<SharedString>) -> Self
peaks(peaks: impl IntoIterator<Item = f32>) -> 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.