feat(media): @shade/media — seekable sealed media (SMF1), live channels, media routes and live relay
SMF1 seals a film, video, image or song once into a file any Range-capable store can serve; the reader fetches only segments under the playhead and checks each against a digest table pinned by the grant's root digest. Live channels use a sender-key chain with per-frame Ed25519 signatures, sticky init frames and keyframe snapshots for late joiners, and epoch rotation to remove a viewer. Server side: a disk-backed media store with signed owner uploads and a WebSocket relay with bounded backlog. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
packages/shade-media/src/index.ts
Normal file
30
packages/shade-media/src/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
export * from './errors.js';
|
||||
export {
|
||||
MediaSealer,
|
||||
MediaReader,
|
||||
sealMediaStream,
|
||||
sealMediaBytes,
|
||||
validateMeta,
|
||||
decodeFooter,
|
||||
encodeFooter,
|
||||
segmentCountFor,
|
||||
sealedSizeFor,
|
||||
DEFAULT_SEGMENT_SIZE,
|
||||
MIN_SEGMENT_SIZE,
|
||||
MAX_SEGMENT_SIZE,
|
||||
FOOTER_BYTES,
|
||||
} from './sealed.js';
|
||||
export type { MediaMeta, MediaKeys, SealResult, SealOptions, ReaderOptions, Footer } from './sealed.js';
|
||||
export { MemorySource, HttpRangeSource } from './source.js';
|
||||
export type { RangeSource, HttpRangeSourceOptions } from './source.js';
|
||||
export * from './grant.js';
|
||||
export { OwnerKey, verifyOwner, READ_TOKEN_HEADER, READ_HASH_HEADER } from './owner.js';
|
||||
export type { OwnerOp } from './owner.js';
|
||||
export { MediaClient, openGrant, mediaUrl } from './client.js';
|
||||
export type { PutOptions } from './client.js';
|
||||
export { LivePublisher, LiveSubscriber, epochKeys, chainStep, MAX_SKIP, MAX_SKIPPED_KEYS } from './live/channel.js';
|
||||
export type { FrameOptions, PublisherOptions, GrantOptions, ReceivedFrame } from './live/channel.js';
|
||||
export { encodeContent, decodeContent, decodeFrame, FLAG_STICKY, FLAG_KEYFRAME, FLAG_END } from './live/frame.js';
|
||||
export type { LiveContent, FrameHeader } from './live/frame.js';
|
||||
export { LivePublishClient, LiveWatchClient, liveUrl } from './live/client.js';
|
||||
export type { LiveState, PublishOptions, WatchOptions } from './live/client.js';
|
||||
Reference in New Issue
Block a user