@blockcast/mmt-container 2.2.0-main.5e3e277b4606 → 2.2.0-main.6491af2cf117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/ad-creative-record.d.ts +16 -0
- package/dist/ad-creative-record.d.ts.map +1 -0
- package/dist/ad-creative-record.js +2173 -0
- package/dist/ad-creative-record.js.map +7 -0
- package/dist/block-policy.d.ts +28 -4
- package/dist/block-policy.d.ts.map +1 -1
- package/dist/block-policy.js +86 -7
- package/dist/block-policy.js.map +2 -2
- package/dist/browser-runtime.js +458 -38
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +1 -0
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +33 -0
- package/dist/carp-catalog.js.map +4 -4
- package/dist/catalog-fec-params.js.map +1 -1
- package/dist/cmaf-block-assembler.d.ts +10 -2
- package/dist/cmaf-block-assembler.d.ts.map +1 -1
- package/dist/cmaf-block-assembler.js +30 -8
- package/dist/cmaf-block-assembler.js.map +3 -3
- package/dist/codec-utils.d.ts.map +1 -1
- package/dist/codec-utils.js +16 -3
- package/dist/codec-utils.js.map +2 -2
- package/dist/conceal-timeline.d.ts +24 -1
- package/dist/conceal-timeline.d.ts.map +1 -1
- package/dist/conceal-timeline.js +201 -4
- package/dist/conceal-timeline.js.map +3 -3
- package/dist/datagram-leg-deadline.d.ts +4 -0
- package/dist/datagram-leg-deadline.d.ts.map +1 -1
- package/dist/datagram-leg-deadline.js.map +2 -2
- package/dist/fec-manager.d.ts +9 -2
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +121 -11
- package/dist/fec-manager.js.map +2 -2
- package/dist/feed-gate.d.ts +114 -0
- package/dist/feed-gate.d.ts.map +1 -0
- package/dist/feed-gate.js +175 -0
- package/dist/feed-gate.js.map +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +2 -2
- package/dist/iso-bmff-timing.d.ts +5 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -1
- package/dist/iso-bmff-timing.js +8 -0
- package/dist/iso-bmff-timing.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts +2 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +26 -1
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +26 -1
- package/dist/mmtp-container-parser.no-modules.js.map +2 -2
- package/dist/mmtp-decode-pipeline.js +26 -1
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-router.d.ts +14 -2
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +98 -20
- package/dist/mmtp-router.js.map +3 -3
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +220 -31
- package/dist/multicast-manager.js.map +3 -3
- package/dist/no-modules.js +26 -1
- package/dist/no-modules.js.map +2 -2
- package/dist/repair-fetch.js.map +1 -1
- package/dist/wasm-mmtp-container-parser.js +26 -1
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +9 -5
- package/schemas/catalog.schema.json +7 -2
- package/src/ad-creative-record.ts +100 -0
- package/src/block-policy.ts +111 -13
- package/src/carp-catalog.ts +9 -0
- package/src/cmaf-block-assembler.ts +17 -0
- package/src/codec-utils.ts +19 -3
- package/src/conceal-timeline.ts +60 -5
- package/src/datagram-leg-deadline.ts +4 -0
- package/src/fec-manager.ts +46 -3
- package/src/feed-gate.ts +295 -0
- package/src/index.ts +20 -0
- package/src/iso-bmff-timing.ts +12 -0
- package/src/mmtp-container-parser.ts +17 -5
- package/src/mmtp-router.ts +91 -4
- package/src/multicast-manager.ts +1 -0
- package/test-vectors/catalog/README.md +1 -0
- package/test-vectors/catalog/negative/event-timeline-empty-event-type.json +41 -0
- package/test-vectors/catalog/positive/event-timeline-ad-creative.json +41 -0
- package/test-vectors/catalog/positive/multicast-event-timeline.json +81 -0
- package/test-vectors/catalog/section-codes.json +1 -0
- package/test-vectors/frame-needs-v1.json +295 -0
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ The package exposes a wide subpath surface so consumers can tree-shake aggressiv
|
|
|
67
67
|
| `./fec-manager` | `FECManager` — per-track FEC decoder lifecycle (sync WASM + Worker variants) |
|
|
68
68
|
| `./block-policy` | Keyframe-protected repair policy — `BlockClassifier`, `repairPriorityForClass`, `decideGap` |
|
|
69
69
|
| `./conceal-timeline` | Sink concealment — `videoConcealModeForCodec`, `HoldLastTimeline`, `AudioGapConcealer` |
|
|
70
|
+
| `./feed-gate` | Per-frame dependency statements — `decodeFrameNeeds`, `decoderTolerance`, `VideoFeedGate` |
|
|
70
71
|
| `./mmtp-router` | `MmtpRouter` — packet routing with two-phase FEC feed |
|
|
71
72
|
| `./multicast-transport` | `MulticastTransport` — `window.multicast` gateway `subscribe({ consume: 'bytes' })` wrapper |
|
|
72
73
|
| `./multicast-manager` | `MulticastManager` — backwards-compat facade composing transport + router + FEC |
|
|
@@ -388,6 +389,22 @@ Every FEC block still gets in-band FEC decode. On top of that:
|
|
|
388
389
|
never stalls. The same object is the manager's `gap` lifecycle event.
|
|
389
390
|
- **Concealment** is hold-last-good-frame (`HoldLastTimeline`) plus exact
|
|
390
391
|
audio sizing (`AudioGapConcealer`). No bitstream is ever synthesised.
|
|
392
|
+
- **The feed gate (`./feed-gate`).** A video frame may state, in the
|
|
393
|
+
`priority` byte of its DU header, the one earlier frame it needs
|
|
394
|
+
(`decodeFrameNeeds`; vectors in `test-vectors/frame-needs-v1.json`). The
|
|
395
|
+
router forwards it as `needs` beside `gapBefore`, on a frame that is the
|
|
396
|
+
one sample of its movie fragment. `VideoFeedGate` feeds a
|
|
397
|
+
frame only if that frame was fed since the last keyframe, so a loss holds
|
|
398
|
+
only the frames it reaches. It answers only inside a GOP whose keyframe
|
|
399
|
+
carried 254 and only for a decoder that does not conceal
|
|
400
|
+
(`decoderTolerance`: every codec but H.264). Everywhere else it answers
|
|
401
|
+
`unread` and the sink runs its own stall and hold. A WebCodecs sink calls
|
|
402
|
+
`admit`, `fed`, `requireKeyframe` and `onDecoderFailure`; an MSE sink passes
|
|
403
|
+
`needs` and `tolerance` to `HoldLastTimeline`, which owns a gate, and
|
|
404
|
+
reports a decoder failure with the timeline's `onDecoderFailure()`. After
|
|
405
|
+
that report the gate withholds the rest of a GOP in which it had withheld a
|
|
406
|
+
frame or fed one across a gap, up to the next keyframe. The gate's counters
|
|
407
|
+
are the timeline's `gateStats`.
|
|
391
408
|
|
|
392
409
|
Typed evidence is `RepairLifecycleEvent` version 2 and
|
|
393
410
|
`MulticastManager.getBlockPolicyStats()`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** kid -> raw 32-byte Ed25519 public key: one channel's JWK Set (riedl 4.5). */
|
|
2
|
+
export type AdCreativeKeys = ReadonlyMap<string, Uint8Array>;
|
|
3
|
+
export type AdSigVerdict = 'verified' | 'unsigned' | 'sig' | 'alg' | 'kid' | 'signature';
|
|
4
|
+
/**
|
|
5
|
+
* The host-provisioned JWK Set (RFC 7517): OKP/Ed25519 public keys by kid (RFC 8037). This set is
|
|
6
|
+
* the only key source; jku, jwk, x5u and x5c in a header are never read (riedl 4.5). Never throws:
|
|
7
|
+
* a private, malformed or repeated-kid entry is left out, so records under it fail with 'kid'.
|
|
8
|
+
* `kids` is the channel's kid allowlist: given, only those kids are imported, so a validly signed
|
|
9
|
+
* record substituted from another channel fails with 'kid' too (riedl 4.5).
|
|
10
|
+
*/
|
|
11
|
+
export declare function importAdCreativeJwks(jwks: unknown, kids?: readonly string[]): AdCreativeKeys;
|
|
12
|
+
/** RFC 8785 for JSON.parse output: riedl's reference canonicalize() (scripts/sign-record.mjs at 443f90b2). */
|
|
13
|
+
export declare function canonicalJson(value: unknown): string;
|
|
14
|
+
/** riedl 4.5 for one record as parsed from JSON: the verification entry point. */
|
|
15
|
+
export declare function verifyAdCreativeSig(record: Readonly<Record<string, unknown>>, keys: AdCreativeKeys): AdSigVerdict;
|
|
16
|
+
//# sourceMappingURL=ad-creative-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ad-creative-record.d.ts","sourceRoot":"","sources":["../src/ad-creative-record.ts"],"names":[],"mappings":"AASA,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAC5D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,WAAW,CAAA;AASxF;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAsB5F;AAED,8GAA8G;AAC9G,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOpD;AAmCD,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,YAAY,CAIjH"}
|