v0.2.3 — Subtitle Delay, Customization, Premuxed Quality, VS Code Extension
Highlights
- Subtitle Delay / Offset (closes #4) —
subtitledelayattribute, JS API,Z/Xhotkeys (±100ms), OSD readout, and asubtitledelaychangeevent. Sign convention matches VLC/mpv. Auto-prefetch handles negative offsets, and a single offset works for text + image (PGS/DVB) cues without re-decoding. - Subtitle Customization Panel —
subtitlesize,subtitlecolor,subtitlebg,subtitleedgeattributes plus an in-player customize panel (size / color / background / edge) persisted via localStorage. - Subtitle Transcript Browser — full-cover panel with search, click-to-seek, active-cue highlight, italic/bold/entity rendering, delay-aware timestamps. Backed by a native
movi_prefetch_subtitle_cues(usesAVDISCARD_ALL) so a 700 MB scan touches only subtitle packets. - Karaoke Captions for VTT — tag-only-token folding, offscreen min-width anchor, render-key cache to stop the 60fps
innerHTMLrewrite that prevented fade-in during playback. - Premuxed Quality Menu — multiple
<source data-height="...">children give a YouTube-style quality picker for plain MP4/MKV files (no HLS manifest needed). Adopt/release native<audio>across switches preserves the user-activation token so the next switch isn't blocked by autoplay policy. - Multi-Language Audio via
<source kind="audio">— two or more audio sources withsrclang/labelbecome parallel language tracks. Default pick: explicitdefault→ first locale match → first track. - External Subtitles via
<track>— standard<video>-style declarative markup. Readssrclang,label, anddata-format(defaults to VTT, setsrtfor SRT sidecars). - Host Fullscreen Handoff — cancelable
movi-fullscreen-requestevent +setHostFullscreen()so embedders (VS Code webviews, custom shells) can take over fullscreen with their own chrome while keeping the player's UI in sync. - VS Code Extension (Marketplace 0.2.5) — webview-hosted player as a CustomEditor. Single-click opens any MP4/MKV/HEVC/AV1/WebM/MOV/TS file VS Code can't natively play. True streaming via custom
DataSource(memory cost drops from O(filesize) to ~chunk size — multi-GB and 8K HDR no longer hit the 4 GB Blob limit). OS wake lock during fullscreen. - Web App + Chrome Extension Explorer-Style Playlists — folder hierarchy tree, multi-select, live search, keyboard navigation, IndexedDB-cached thumbnails + metadata across sessions. Gradient circle brand mark.
Added
filerevokedCustomEvent — surfaces silently-revokedFilehandles (mobile background / memory pressure) instead of hanging forever.MoviPlayer.hasAudibleSource()— unified audio-presence gate (muxed / split native<audio>/ HLS).- 8K (
4320p) and 16K (8640p) labels in Stats for Nerds — previously bucketed as 4K.
Changed
- HLS volume controls now visible —
hasAudibleSource()covers the HLS path too (volume button +ArrowUp/Down+ OSD). - Audio decode stays running while muted — fixes the "atak atak" judder on unmute (audio clock no longer pivots to the demuxer's lookahead).
- Bluetooth A2DP keepalive — pause now suspends the AudioContext but plays a near-silent loop so BT devices don't drop/re-pair on every pause.
- DPR-scaled canvas backbuffer — capped at 2×, so 4K/8K downsampling stays sharp.
- Encrypted source static import —
EncryptedHttpSourcehoisted to a top-level import (no async boundary on every encrypted load). - FFmpeg bumped to n8.1.1.
- Subtitle default sizing — base size bumped, desktop-era 60px floor on bottom padding replaced with a height-proportional 8% (24px floor) so subtitles don't crowd into small embeds.
- Menu animations — pop-in/out + fade between customize panel and track list. Bottom-controls dropdowns enforce one-at-a-time.
- Hotkeys ignored while typing — no longer fire when an input/textarea inside the shadow DOM is focused.
- Audio menu always shows language code alongside channel layout.
- COOP/COEP hard-required — surfaces a "Security Headers Missing" diagnostic instead of a cryptic timeout. Mentions
coi-serviceworkeras a static-host workaround.
Fixed
- Eliminated ~1s freeze when entering fullscreen.
- Last frame shown as poster during WebGL context-loss recovery (no more black flash).
- Stopped 2–3s jump-ahead on pause→resume; AudioContext stays alive on pause.
- Mobile speaker tap opens the volume slider instead of muting.
- Aspect-ratio change visible in paused state + poster overlay reflows.
- Single-track streams exit pause buffering correctly.
- HLS first-frame black; volume exposed in HLS; pause on blocked autoplay.
- PGS subtitles stay on-canvas + transcript hidden on image subs.
- Subtitle delay + transcript controls gated to file sources.
- Fit animation preserved on HLS + quality badge repaints on ABR switch.
- Robust backgrounding & WebGL context-loss recovery on mobile.
- "Security Headers Missing" diagnostic instead of cryptic timeout.
📦 npm: movi-player@0.2.3