Reference
Compatibility
Browsers, codecs and runtimes.
Runtimes
| Package | Runs in | Requirement |
|---|---|---|
@miraiclip/core | Anywhere | Browser, Node ≥ 18, workers, edge. No DOM or media dependencies |
@miraiclip/templates | Anywhere | Node ≥ 18 or a browser. @miraiclip/templates/render is Node only |
@miraiclip/renderer | Browser | WebCodecs + WebGL: Chrome/Edge 94+, Safari 16.4+, Firefox 130+ |
@miraiclip/server-export | Node ≥ 18 | A Chrome or Chromium binary on the machine |
@miraiclip/mcp | Node ≥ 18 | Chrome for frame previews and export |
Check WebCodecs before you mount a player:
import { isWebCodecsSupported } from "@miraiclip/renderer";
if (!isWebCodecsSupported()) {
// show a "use a recent Chrome, Edge, Safari or Firefox" message
}There is no <video>-element fallback. When one asset can't be decoded, that asset fails with UnsupportedMediaError (with assetId and codec); the rest of the project still plays.
Input containers
Demuxing uses mediabunny.
| Family | Containers |
|---|---|
| MP4 | MP4, M4V, M4A (ISOBMFF), QuickTime MOV, segmented MP4 / CMAF |
| Matroska | MKV, WebM |
| Audio-only | MP3, WAV, ADTS AAC, FLAC, Ogg |
| Streaming | MPEG-TS, HLS playlists |
Decode codecs
Decode support is what the container holds and what the browser's WebCodecs can decode. Each asset is probed up front.
| Type | Codecs |
|---|---|
| Video | H.264 / AVC, H.265 / HEVC (where the platform licenses it), VP8, VP9, AV1 |
| Audio | AAC, Opus, MP3, Vorbis, FLAC, PCM |
Export formats
format | Codecs | Needs |
|---|---|---|
"mp4" | H.264 + AAC | A browser with the proprietary encoders: Chrome or Edge. Free Chromium builds don't have them |
"webm" | VP9 + Opus | Any Chromium |
exportProject probes the encoder before it starts. An unsupported format rejects up front, not partway through.
The same rule applies to server export: point it at a real Chrome for MP4. Chromium-only machines export WebM.
Tested in CI
| Suite | Checks |
|---|---|
| Golden-frame playback | Frame-exact seeks, playback tracking the clock |
| Closed-loop export | The exported file decoded again by an independent decoder: frame colors, duration, resolution, audio RMS |
| Server export | Real headless Chromium driven from Node |
Limits and measured numbers: Production readiness.