feat(media): browser playback, live WebM and log streaming, shade media/live CLI
- Service Worker plays sealed files in native <video>/<audio>/<img> with Range seeking; watch page served by the relay itself (#shade= fragment links, grant never sent to a server) - MSE live player with keyframe-aware joining, gap detection, latency control - WebM splitter (init + clusters, keyframe detection) that puts blocks in timecode order — Chrome rejects ffmpeg's interleaved Opus/VP8 otherwise - Link mode for live channels: epoch seeds from a channel secret, so a link survives publisher restarts and scheduled rotations - File store streams byte ranges itself (Bun.file().slice() in a Response sent whole files to Range requests) - shade media serve|put|get|ls|rm, shade live text|webm|watch Verified end to end in headless Chromium: VP9/Opus film plays and seeks, live VP8/Opus at 2.9 s latency, live logs, sealed JPEG and Opus audio. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"@shade/core": "workspace:*",
|
||||
"@shade/crypto-web": "workspace:*",
|
||||
"@shade/keychain": "workspace:*",
|
||||
"@shade/media": "workspace:*",
|
||||
"@shade/sdk": "workspace:*",
|
||||
"@shade/storage-encrypted": "workspace:*",
|
||||
"@shade/storage-sqlite": "workspace:*",
|
||||
|
||||
@@ -56,6 +56,8 @@ Commands:
|
||||
rotate-storage-key Re-key the encrypted SQLite store (V3.2)
|
||||
--key-source / --passphrase / … (current key — same flags as migrate)
|
||||
--new-key-source / --new-passphrase / … (target key)
|
||||
media … / live … E2E-encrypted streaming of films, video, images, audio and logs
|
||||
(run \`shade media\` or \`shade live\` for the subcommands)
|
||||
help Show this message
|
||||
|
||||
Config:
|
||||
@@ -127,6 +129,12 @@ async function main(): Promise<void> {
|
||||
await rotateStorageKeyCommand(opts);
|
||||
break;
|
||||
}
|
||||
case 'media':
|
||||
case 'live': {
|
||||
const { runMediaCli } = await import('@shade/media/cli');
|
||||
process.exitCode = await runMediaCli(cmd, args.slice(1));
|
||||
break;
|
||||
}
|
||||
case 'help':
|
||||
case '--help':
|
||||
case '-h':
|
||||
|
||||
Reference in New Issue
Block a user