2026-10-18 20:41:31 +02:00
|
|
|
export { createMediaRoutes, parseRange } from './server/media-routes.js';
|
|
|
|
|
export type { MediaRoutesOptions } from './server/media-routes.js';
|
|
|
|
|
export { FileMediaStore, MemoryMediaStore, MediaExistsError } from './server/file-store.js';
|
|
|
|
|
export type { MediaStore, MediaRecord, MediaUpload } from './server/file-store.js';
|
|
|
|
|
export { createLiveRelay, FileLivePinStore, MemoryLivePinStore } from './server/live-relay.js';
|
|
|
|
|
export type { LiveRelay, LiveRelayOptions, LivePin, LivePinStore } from './server/live-relay.js';
|
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>
2026-10-18 21:01:52 +02:00
|
|
|
export { createWatchRoutes } from './server/watch-routes.js';
|
|
|
|
|
export type { WatchRoutesOptions } from './server/watch-routes.js';
|
fix(media,server): films over 128 MiB were refused; docs/media.md
Bun.serve refuses request bodies over 128 MiB by default, so every film
larger than that got a 413 from both `shade media serve` and the container.
The cap is now raised to the media object limit only when media is
mounted, and every other route gets an explicit 128 MiB bodyLimit — several
read the whole body before checking its size, so Bun's default was their
only guard. Verified on the standalone process: 300 MiB sealed film round
trip identical; a 200 MiB POST to a prekey route still 413.
docs/media.md: formats (SMF1, SLF1, grants) as the cross-language contract,
key schedule, what the relay learns, design notes, limits.
bench/media.ts: throughput, seek latency, live fan-out → media.chart.json.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-18 21:15:13 +02:00
|
|
|
export { createMediaService, parseOwners, mediaMaxRequestBody, MEDIA_BODY_ROUTE } from './server/service.js';
|
2026-10-18 21:10:43 +02:00
|
|
|
export type { MediaService, MediaServiceOptions } from './server/service.js';
|