@blockcast/mmt-container 0.4.0-main.91fe086edd12 → 0.4.0-main.94b7ef7dcd8d
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 +16 -5
- package/dist/browser-runtime.js +442 -26
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +5 -0
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +18 -4
- package/dist/carp-catalog.js.map +2 -2
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +6 -3
- package/dist/catalog-fec-params.js.map +2 -2
- package/dist/catalog-network-source.js.map +1 -1
- package/dist/delivery-catalog.js +2 -10
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/fec-manager.js.map +1 -1
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +14 -2
- package/dist/fec-state.js.map +3 -3
- package/dist/fec-worker-setup.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.js.map +1 -1
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +535 -17
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-fec-session.d.ts +156 -0
- package/dist/mmtp-fec-session.d.ts.map +1 -0
- package/dist/mmtp-fec-session.js +522 -0
- package/dist/mmtp-fec-session.js.map +7 -0
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +17 -0
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-input.js.map +1 -1
- package/dist/multicast-manager.d.ts +21 -2
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +52 -9
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.js +0 -8
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.d.ts +2 -0
- package/dist/no-modules.d.ts.map +1 -1
- package/dist/no-modules.js +487 -6
- package/dist/no-modules.js.map +4 -4
- package/dist/repair-fetch.d.ts +23 -1
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +35 -10
- package/dist/repair-fetch.js.map +2 -2
- package/dist/repair-layers.js.map +1 -1
- package/dist/signaling.d.ts +2 -2
- package/dist/signaling.d.ts.map +1 -1
- package/dist/signaling.js +3 -3
- package/dist/signaling.js.map +2 -2
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +1 -1
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +5 -5
- package/schemas/catalog.schema.json +7 -1
- package/src/carp-catalog.ts +44 -6
- package/src/catalog-fec-params.ts +4 -1
- package/src/fec-state.ts +3 -2
- package/src/index.ts +16 -0
- package/src/mmtp-fec-session.ts +514 -0
- package/src/mmtp-router.ts +25 -0
- package/src/multicast-manager.ts +80 -2
- package/src/no-modules.ts +2 -0
- package/src/repair-fetch.ts +79 -14
- package/src/signaling.ts +2 -2
- package/test-vectors/catalog/README.md +13 -1
- package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
- package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
- package/test-vectors/catalog/section-codes.json +6 -0
- package/test-vectors/catalog-validation.json +95 -0
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ function parseAlFecMessage(buf: Uint8Array): AlFecMessage | null // every FEC
|
|
|
121
121
|
function parseMoqRepairFrame(buf: Uint8Array): MoqRepairFrame
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Constants worth knowing: `MMTP_HEADER_SIZE = 12`, `MPU_HEADER_SIZE = 8`, `MFU_DU_HEADER_SIZE_TIMED = 14`, `PACKET_TYPE_MPU = 0x00`, `PACKET_TYPE_REPAIR = 0x03`, `ALFEC_MESSAGE_ID = 0x0203`, `FEC_CODE_RAPTORQ =
|
|
124
|
+
Constants worth knowing: `MMTP_HEADER_SIZE = 12`, `MPU_HEADER_SIZE = 8`, `MFU_DU_HEADER_SIZE_TIMED = 14`, `PACKET_TYPE_MPU = 0x00`, `PACKET_TYPE_REPAIR = 0x03`, `ALFEC_MESSAGE_ID = 0x0203`, `FEC_CODE_RAPTORQ = 3`, `FEC_CODE_REED_SOLOMON = 1`.
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
127
|
import { parseMMTPHeader, extractMFUPayload } from "@blockcast/mmt-base"
|
|
@@ -248,7 +248,9 @@ non-DRIAD AMT entry, so the manual one carries the relay while the DRIAD one
|
|
|
248
248
|
keeps the discovery request. An `atsc3` endpoint now
|
|
249
249
|
requires a `{type: "atsc3", …}` entry and throws `atsc3_requires_tuning`
|
|
250
250
|
without one: that entry carries the frequency, PLP, service id and SLS URI,
|
|
251
|
-
which is the only tuning information an ATSC3 receiver has
|
|
251
|
+
which is the only tuning information an ATSC3 receiver has (the SLS behind
|
|
252
|
+
`slsUri` describes the MMTP session, MP table included, per A/331:2026-04 7.2,
|
|
253
|
+
and nothing of this profile, so `manifestPort` and keys come from provisioning), and the schema
|
|
252
254
|
cannot enforce it because `networkSource` is optional there (a native join has
|
|
253
255
|
none). `version`, `validUntil` and `enabled` are still emitted and still
|
|
254
256
|
outside `$defs/multicast` (the BLO-3323 freshness model, tracked separately).
|
|
@@ -446,7 +448,7 @@ All string values pass through `sanitize()` (T-06-01) — commas, `\r`, `\n` are
|
|
|
446
448
|
|
|
447
449
|
### Multicast transport (`./multicast-transport`)
|
|
448
450
|
|
|
449
|
-
Thin wrapper around the lowercase `window.multicast` gateway. Calls `globalThis.multicast.subscribe({ group, source, port, consume: 'bytes' })`, listens for `"bytes"` events (`CustomEvent<ArrayBuffer>`) on the returned `EventTarget` subscription, pumps packets to a callback, runs a
|
|
451
|
+
Thin wrapper around the lowercase `window.multicast` gateway. Calls `globalThis.multicast.subscribe({ group, source, port, consume: 'bytes' })`, listens for `"bytes"` events (`CustomEvent<ArrayBuffer>`) on the returned `EventTarget` subscription, pumps packets to a callback, runs a silence watchdog over the catalog-derived failback window (`setFailbackWindowMs`), and fires `onTakeover` once both video and audio are confirmed receiving.
|
|
450
452
|
|
|
451
453
|
```ts
|
|
452
454
|
class MulticastTransport {
|
|
@@ -457,12 +459,21 @@ class MulticastTransport {
|
|
|
457
459
|
confirmVideo(): void
|
|
458
460
|
confirmAudio(): void
|
|
459
461
|
onTakeover(cb: () => void): void
|
|
460
|
-
onFailback(cb: () => void): void
|
|
462
|
+
onFailback(cb: (reason: MulticastFailbackReason) => void): void
|
|
463
|
+
setFailbackWindowMs(windowMs: number | null): void
|
|
461
464
|
dispose(): void
|
|
462
465
|
readonly stats: { packetsReceived: number; bytesReceived: number }
|
|
463
466
|
}
|
|
464
467
|
```
|
|
465
468
|
|
|
469
|
+
**Failover vocabulary.** draft-multicast-01 Section 6 "failover" (multicast to
|
|
470
|
+
unicast) is libmmt's *failback*: `onFailback`, `MulticastManager.onFailback`,
|
|
471
|
+
`failbackAll`, `MediaRouter.failbackToMoq`, `MulticastFailbackReason`, and CMCD
|
|
472
|
+
`x-bc-ct` `mc-to-uc`. libmmt's in-code *failover* (`track-session.ts`) is the
|
|
473
|
+
per-track hop along a track's transport chain. The return to multicast is the
|
|
474
|
+
draft's switch to multicast / join / switch back; CMCD `mc-start` is fired
|
|
475
|
+
host-side.
|
|
476
|
+
|
|
466
477
|
Direct Sockets is Chrome-IWA-only. Outside an IWA context `isAvailable()` returns false and join() warns + returns false. AMT tunneling and unicast fallback are handled by `@blockcast/mmt-transport`, not by this transport class.
|
|
467
478
|
|
|
468
479
|
## Track-role convention summary (Phase 14)
|
|
@@ -507,7 +518,7 @@ Roles are required by:
|
|
|
507
518
|
- **draft-ramadan-moq-fec** — AL-FEC over MoQ (§5.3 FEC Source Info object extension 0x11: SS_ID(32), fixed 4 bytes)
|
|
508
519
|
- **RFC 6330** — RaptorQ Forward Error Correction (strict OTI codec in `@blockcast/mmt-fec`)
|
|
509
520
|
- **RFC 9559** — CMCD (used by `CmcdProducer`)
|
|
510
|
-
- **ATSC A/331** — Signaling, Delivery, Synchronization, Error Protection
|
|
521
|
+
- **ATSC A/331:2026-02 (informative for draft-fec-01 / draft-mmt-01; 7.2 SLS/MP table, 8.1.2.1 MMTP session, 8.1.2.5 AL-FEC) and A/331:2026-04 (normative for draft-multicast-01)** — Signaling, Delivery, Synchronization, Error Protection
|
|
511
522
|
|
|
512
523
|
## Related packages
|
|
513
524
|
|