oficina / slides Public

Slides: clips, short muted videos played on a press, looped or once

A clip's video is an asset of kind video (MP4 or WebM, sniffed, up to
50 MiB) registered with a poster: the picture of its first frame, drawn
by the uploader's browser from the staged bytes the app serves back
(the page's policy loads no blob: media), registered alongside as a
PNG or WebP. register_asset carries poster and duration in Rust, JS and
Go, with the scenes vector regenerated and the wasm rebuilt.

A clip block renders its poster wherever no video plays (scripts off,
thumbnails, the PDF, the presenter's Next, the remote); with scripts on
fixtures/clip.mjs puts a muted inline <video> over it in the block on
the slide and presenter windows, the viewer and the follow link. A
press clip's press is marked on a child, so back pauses and rewinds; a
video that won't play leaves the poster and its press still counts.
Reduced motion keeps loop and once on the poster. Videos are served in
ranges and fetched with the talk. Insert -> Clip uploads one; the card
has Play: On a press / Loop / Once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4b9620a9534ce34ad437cdbc93e626e44d2f73c9 parent b395839
58 files changed, +2,540 −134
  • AGENTS.md +6 −0
  • core/src/ops.rs +25 −2
  • core/src/view.rs +23 −2
  • core/tests/scenes.rs +37 −0
  • docs/api.md +47 −0
  • fixtures/assets.test.mjs +21 −1
  • fixtures/clip-card.mjs +65 −0
  • fixtures/clip.mjs +117 −0
  • fixtures/clip.test.mjs +181 −0
  • fixtures/commands.mjs +5 −2
  • fixtures/data/scenes.json +2 −1
  • fixtures/editor-entry.js +16 −0
  • fixtures/head.mjs +5 −2
  • fixtures/inspector-block.mjs +3 −1
  • fixtures/inspector-ops.mjs +15 −1
  • fixtures/ops-apply.mjs +2 −2
  • fixtures/ops-model.mjs +1 −0
  • fixtures/ops-parse.mjs +3 −1
  • fixtures/ops.test.mjs +17 −0
  • fixtures/play-through.mjs +2 −1
  • fixtures/presenter-window.mjs +3 −2
  • fixtures/scene-pages.mjs +5 −1
  • fixtures/slide-window.mjs +3 −1
  • fixtures/talk-draw.mjs +2 −0
  • fixtures/talk-store.mjs +15 −9
  • fixtures/uploads.mjs +127 −27
  • fixtures/uploads.test.mjs +56 −1
  • fixtures/vectors/scenes.view.json +9 −0
  • fixtures/vectors/scenes.yjs binary
  • fixtures/view.mjs +7 −1
  • internal/slides/app.go +3 −0
  • internal/slides/assets.go +43 −14
  • internal/slides/assets_video_test.go +66 −0
  • internal/slides/clips.go +373 −0
  • internal/slides/core/testdata/slides_core.wasm binary
  • internal/slides/core/testdata/slides_core.wasm.stamp +2 −2
  • internal/slides/credits/assets.json +5 −5
  • internal/slides/deck/deck.go +40 −7
  • internal/slides/editor.go +8 −0
  • internal/slides/layout/blocks.go +30 −0
  • internal/slides/locales/en.toml +11 −0
  • internal/slides/presenting_talk.go +6 −2
  • internal/slides/render/clips_test.go +108 −0
  • internal/slides/render/render.go +89 −2
  • internal/slides/static/editor.0ab3dbd199db90f3.js +21 −0
  • internal/slides/static/editor.22379396efbcf057.js +0 −21
  • internal/slides/static/editor.css +4 −3
  • internal/slides/static/fontsgate.695d2c3c412d35d4.js +5 −0
  • internal/slides/static/fontsgate.6f2cdcf5b9124d67.js +0 −5
  • internal/slides/static/present.js +5 −3
  • internal/slides/static/presenter.2ea1ee79c6346122.js +5 −0
  • internal/slides/static/presenter.7dd2b59d990627ad.js +0 −5
  • internal/slides/static/slides.css +32 −0
  • internal/slides/templates/editor.html +28 −0
  • internal/slidestest/clips_browser_test.go +453 −0
  • internal/slidestest/clips_test.go +374 −0
  • internal/slidestest/editor_tidy_test.go +1 −1
  • internal/slidestest/scenes_editor_test.go +8 −6
AGENTS.md

Loading diff…

core/src/ops.rs

Loading diff…

core/src/view.rs

Loading diff…

core/tests/scenes.rs

Loading diff…

docs/api.md

Loading diff…

fixtures/assets.test.mjs

Loading diff…

fixtures/clip-card.mjs

Loading diff…

fixtures/clip.mjs

Loading diff…

fixtures/clip.test.mjs

Loading diff…

fixtures/commands.mjs

Loading diff…

fixtures/data/scenes.json

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/head.mjs

Loading diff…

fixtures/inspector-block.mjs

Loading diff…

fixtures/inspector-ops.mjs

Loading diff…

fixtures/ops-apply.mjs

Loading diff…

fixtures/ops-model.mjs

Loading diff…

fixtures/ops-parse.mjs

Loading diff…

fixtures/ops.test.mjs

Loading diff…

fixtures/play-through.mjs

Loading diff…

fixtures/presenter-window.mjs

Loading diff…

fixtures/scene-pages.mjs

Loading diff…

fixtures/slide-window.mjs

Loading diff…

fixtures/talk-draw.mjs

Loading diff…

fixtures/talk-store.mjs

Loading diff…

fixtures/uploads.mjs

Loading diff…

fixtures/uploads.test.mjs

Loading diff…

fixtures/vectors/scenes.view.json

Loading diff…

fixtures/vectors/scenes.yjs

Loading diff…

fixtures/view.mjs

Loading diff…

internal/slides/app.go

Loading diff…

internal/slides/assets.go

Loading diff…

internal/slides/assets_video_test.go

Loading diff…

internal/slides/clips.go

Loading diff…

internal/slides/core/testdata/slides_core.wasm

Loading diff…

internal/slides/core/testdata/slides_core.wasm.stamp

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/deck/deck.go

Loading diff…

internal/slides/editor.go

Loading diff…

internal/slides/layout/blocks.go

Loading diff…

internal/slides/locales/en.toml

Loading diff…

internal/slides/presenting_talk.go

Loading diff…

internal/slides/render/clips_test.go

Loading diff…

internal/slides/render/render.go

Loading diff…

internal/slides/static/editor.0ab3dbd199db90f3.js

Loading diff…

internal/slides/static/editor.22379396efbcf057.js

Loading diff…

internal/slides/static/editor.css

Loading diff…

internal/slides/static/fontsgate.695d2c3c412d35d4.js

Loading diff…

internal/slides/static/fontsgate.6f2cdcf5b9124d67.js

Loading diff…

internal/slides/static/present.js

Loading diff…

internal/slides/static/presenter.2ea1ee79c6346122.js

Loading diff…

internal/slides/static/presenter.7dd2b59d990627ad.js

Loading diff…

internal/slides/static/slides.css

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slidestest/clips_browser_test.go

Loading diff…

internal/slidestest/clips_test.go

Loading diff…

internal/slidestest/editor_tidy_test.go

Loading diff…

internal/slidestest/scenes_editor_test.go

Loading diff…