diff --git a/crates/in-web/src/files.rs b/crates/in-web/src/files.rs index ddda023..6aa57af 100644 --- a/crates/in-web/src/files.rs +++ b/crates/in-web/src/files.rs @@ -497,29 +497,10 @@ async fn view_file(cx: &Cx) -> Result { Some(ViewerKind::Image) => (file.name.clone()), Some(ViewerKind::Video) =>
-
- - "0:00" - - "0:00" - -
+
(media_controls(cx, language, file.name.clone(), true).await?)
, Some(ViewerKind::Audio) =>
- - "0:00" - - "0:00" + (media_controls(cx, language, file.name.clone(), false).await?)
, Some(ViewerKind::Pdf) => @@ -561,6 +542,35 @@ async fn view_file(cx: &Cx) -> Result { } } +/// The one controls bar both media players draw: play toggle, clock, seek, +/// volume (mute + level), a speed cycle, and fullscreen on video. The script +/// below wires it by class, so the bar stays markup-only. +async fn media_controls(cx: &Cx, language: crate::i18n::Lang, name: String, video: bool) -> Result { + view! { + cx => + + "0:00" + + "0:00" + + + + if video { + + } + } +} + /// The house media player: play toggle, clock, seek bar — and a fullscreen /// button on video — over a controls-less `