junkpile

22 · Tauri v2 Image Sequence Player

A two-window Tauri v2 example for playing numbered still-image sequences as time-based media. The controls WebView handles native folder/file selection and transport. The output WebView owns the decode cache, playback clock, WebGL renderer, monitor placement, and PNG capture.

Run

npm install
npm run dev

First test

  1. Launch the app. A generated 180-frame sequence starts automatically.
  2. Test Play/Pause, Reverse, stepping, scrubbing, looping, and adjacent-frame blending.
  3. Choose Choose folder to scan a numbered frame folder, or Choose files to select individual images.
  4. Select a display, press Move to display, then Fullscreen output.

Supported frames

Frames are naturally sorted, so frame_2.png appears before frame_10.png.

Architecture

controls WebView
  ├─ Tauri v2 native folder/file dialog
  ├─ Rust recursive directory scanner
  ├─ native drag-and-drop paths
  ├─ transport + cache controls
  └─ Tauri event bus
          ↓
output WebView
  ├─ Rust binary frame reader
  ├─ origin-clean Blob image decoder
  ├─ bounded decode queue + cache
  ├─ decode-aware playback clock
  ├─ adjacent-frame WebGL blending
  ├─ framing / grade / calibration grid
  └─ monitor placement + native PNG save

Local image paths are never uploaded directly into WebGL. Each requested frame is read by Rust and returned through Tauri binary IPC, then decoded from a temporary Blob URL. This avoids the WKWebView asset-protocol texture security error demonstrated and fixed in Example 16.

Playback behavior

Cache modes

Keyboard shortcuts

Important files

src/app.js                         controls, selection, transport, event routing
src/output.js                      cache, binary frame loading, playback, WebGL
src-tauri/src/main.rs              scanner, binary reads, monitor/output commands
src-tauri/capabilities/default.json explicit Tauri v2 permissions
src-tauri/tauri.conf.json          controls/output windows and CSP

Notes