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>
AGENTS.md+6 −0core/src/ops.rs+25 −2core/src/view.rs+23 −2core/tests/scenes.rs+37 −0docs/api.md+47 −0fixtures/assets.test.mjs+21 −1fixtures/clip-card.mjs+65 −0fixtures/clip.mjs+117 −0fixtures/clip.test.mjs+181 −0fixtures/commands.mjs+5 −2fixtures/data/scenes.json+2 −1fixtures/editor-entry.js+16 −0fixtures/head.mjs+5 −2fixtures/inspector-block.mjs+3 −1fixtures/inspector-ops.mjs+15 −1fixtures/ops-apply.mjs+2 −2fixtures/ops-model.mjs+1 −0fixtures/ops-parse.mjs+3 −1fixtures/ops.test.mjs+17 −0fixtures/play-through.mjs+2 −1fixtures/presenter-window.mjs+3 −2fixtures/scene-pages.mjs+5 −1fixtures/slide-window.mjs+3 −1fixtures/talk-draw.mjs+2 −0fixtures/talk-store.mjs+15 −9fixtures/uploads.mjs+127 −27fixtures/uploads.test.mjs+56 −1fixtures/vectors/scenes.view.json+9 −0fixtures/vectors/scenes.yjsbinaryfixtures/view.mjs+7 −1internal/slides/app.go+3 −0internal/slides/assets.go+43 −14internal/slides/assets_video_test.go+66 −0internal/slides/clips.go+373 −0internal/slides/core/testdata/slides_core.wasmbinaryinternal/slides/core/testdata/slides_core.wasm.stamp+2 −2internal/slides/credits/assets.json+5 −5internal/slides/deck/deck.go+40 −7internal/slides/editor.go+8 −0internal/slides/layout/blocks.go+30 −0internal/slides/locales/en.toml+11 −0internal/slides/presenting_talk.go+6 −2internal/slides/render/clips_test.go+108 −0internal/slides/render/render.go+89 −2internal/slides/static/editor.0ab3dbd199db90f3.js+21 −0internal/slides/static/editor.22379396efbcf057.js+0 −21internal/slides/static/editor.css+4 −3internal/slides/static/fontsgate.695d2c3c412d35d4.js+5 −0internal/slides/static/fontsgate.6f2cdcf5b9124d67.js+0 −5internal/slides/static/present.js+5 −3internal/slides/static/presenter.2ea1ee79c6346122.js+5 −0internal/slides/static/presenter.7dd2b59d990627ad.js+0 −5internal/slides/static/slides.css+32 −0internal/slides/templates/editor.html+28 −0internal/slidestest/clips_browser_test.go+453 −0internal/slidestest/clips_test.go+374 −0internal/slidestest/editor_tidy_test.go+1 −1internal/slidestest/scenes_editor_test.go+8 −6
AGENTS.mdLoading diff…
core/src/ops.rsLoading diff…
core/src/view.rsLoading diff…
core/tests/scenes.rsLoading diff…
docs/api.mdLoading diff…
fixtures/assets.test.mjsLoading diff…
fixtures/clip-card.mjsLoading diff…
fixtures/clip.mjsLoading diff…
fixtures/clip.test.mjsLoading diff…
fixtures/commands.mjsLoading diff…
fixtures/data/scenes.jsonLoading diff…
fixtures/editor-entry.jsLoading diff…
fixtures/head.mjsLoading diff…
fixtures/inspector-block.mjsLoading diff…
fixtures/inspector-ops.mjsLoading diff…
fixtures/ops-apply.mjsLoading diff…
fixtures/ops-model.mjsLoading diff…
fixtures/ops-parse.mjsLoading diff…
fixtures/ops.test.mjsLoading diff…
fixtures/play-through.mjsLoading diff…
fixtures/presenter-window.mjsLoading diff…
fixtures/scene-pages.mjsLoading diff…
fixtures/slide-window.mjsLoading diff…
fixtures/talk-draw.mjsLoading diff…
fixtures/talk-store.mjsLoading diff…
fixtures/uploads.mjsLoading diff…
fixtures/uploads.test.mjsLoading diff…
fixtures/vectors/scenes.view.jsonLoading diff…
fixtures/vectors/scenes.yjsLoading diff…
fixtures/view.mjsLoading diff…
internal/slides/app.goLoading diff…
internal/slides/assets.goLoading diff…
internal/slides/assets_video_test.goLoading diff…
internal/slides/clips.goLoading diff…
internal/slides/core/testdata/slides_core.wasmLoading diff…
internal/slides/core/testdata/slides_core.wasm.stampLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/deck/deck.goLoading diff…
internal/slides/editor.goLoading diff…
internal/slides/layout/blocks.goLoading diff…
internal/slides/locales/en.tomlLoading diff…
internal/slides/presenting_talk.goLoading diff…
internal/slides/render/clips_test.goLoading diff…
internal/slides/render/render.goLoading diff…
internal/slides/static/editor.0ab3dbd199db90f3.jsLoading diff…
internal/slides/static/editor.22379396efbcf057.jsLoading diff…
internal/slides/static/editor.cssLoading diff…
internal/slides/static/fontsgate.695d2c3c412d35d4.jsLoading diff…
internal/slides/static/fontsgate.6f2cdcf5b9124d67.jsLoading diff…
internal/slides/static/present.jsLoading diff…
internal/slides/static/presenter.2ea1ee79c6346122.jsLoading diff…
internal/slides/static/presenter.7dd2b59d990627ad.jsLoading diff…
internal/slides/static/slides.cssLoading diff…
internal/slides/templates/editor.htmlLoading diff…
internal/slidestest/clips_browser_test.goLoading diff…
internal/slidestest/clips_test.goLoading diff…
internal/slidestest/editor_tidy_test.goLoading diff…
internal/slidestest/scenes_editor_test.goLoading diff…