@blockcast/mmt-container 2.2.0-main.da2e7cd1dd5d → 2.2.0-main.e1bebe787bc9

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.
Files changed (97) hide show
  1. package/README.md +5 -2
  2. package/dist/block-policy.d.ts +55 -13
  3. package/dist/block-policy.d.ts.map +1 -1
  4. package/dist/block-policy.js +104 -32
  5. package/dist/block-policy.js.map +2 -2
  6. package/dist/browser-runtime.js +1573 -214
  7. package/dist/browser-runtime.js.map +3 -3
  8. package/dist/carp-catalog.js.map +2 -2
  9. package/dist/catalog-fec-params.d.ts +1 -1
  10. package/dist/catalog-fec-params.d.ts.map +1 -1
  11. package/dist/catalog-fec-params.js +14 -1
  12. package/dist/catalog-fec-params.js.map +2 -2
  13. package/dist/catalog-network-source.js.map +2 -2
  14. package/dist/cmaf-block-assembler.js +92 -1
  15. package/dist/cmaf-block-assembler.js.map +2 -2
  16. package/dist/codec-utils.d.ts.map +1 -1
  17. package/dist/codec-utils.js +92 -1
  18. package/dist/codec-utils.js.map +2 -2
  19. package/dist/delivery-catalog.js +2 -1
  20. package/dist/delivery-catalog.js.map +2 -2
  21. package/dist/delta-fallback-config.js +5 -1
  22. package/dist/delta-fallback-config.js.map +3 -3
  23. package/dist/fec-manager.d.ts +111 -14
  24. package/dist/fec-manager.d.ts.map +1 -1
  25. package/dist/fec-manager.js +613 -91
  26. package/dist/fec-manager.js.map +2 -2
  27. package/dist/fec-state.js +5 -1
  28. package/dist/fec-state.js.map +2 -2
  29. package/dist/fec-worker-setup.js.map +2 -2
  30. package/dist/held-layer-admission.js.map +2 -2
  31. package/dist/index.d.ts +3 -3
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +3 -1
  34. package/dist/index.js.map +2 -2
  35. package/dist/iso-block-locator.d.ts +48 -13
  36. package/dist/iso-block-locator.d.ts.map +1 -1
  37. package/dist/iso-block-locator.js +97 -25
  38. package/dist/iso-block-locator.js.map +2 -2
  39. package/dist/iso-bmff-timing.d.ts +10 -1
  40. package/dist/iso-bmff-timing.d.ts.map +1 -1
  41. package/dist/iso-bmff-timing.js +36 -2
  42. package/dist/iso-bmff-timing.js.map +2 -2
  43. package/dist/media-router.js.map +1 -1
  44. package/dist/mfu-reassembler.js.map +2 -2
  45. package/dist/mmtp-container-parser.d.ts +104 -12
  46. package/dist/mmtp-container-parser.d.ts.map +1 -1
  47. package/dist/mmtp-container-parser.js +308 -27
  48. package/dist/mmtp-container-parser.js.map +2 -2
  49. package/dist/mmtp-container-parser.no-modules.js +329 -32
  50. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  51. package/dist/mmtp-decode-pipeline.js +307 -27
  52. package/dist/mmtp-decode-pipeline.js.map +2 -2
  53. package/dist/mmtp-fec-session.js.map +2 -2
  54. package/dist/mmtp-router.d.ts +36 -8
  55. package/dist/mmtp-router.d.ts.map +1 -1
  56. package/dist/mmtp-router.js +676 -76
  57. package/dist/mmtp-router.js.map +3 -3
  58. package/dist/multicast-auth-catalog.js.map +2 -2
  59. package/dist/multicast-input.js.map +2 -2
  60. package/dist/multicast-manager.d.ts +26 -3
  61. package/dist/multicast-manager.d.ts.map +1 -1
  62. package/dist/multicast-manager.js +1384 -187
  63. package/dist/multicast-manager.js.map +3 -3
  64. package/dist/multicast-transport.js +4 -3
  65. package/dist/multicast-transport.js.map +2 -2
  66. package/dist/multicast-unwrap.js.map +2 -2
  67. package/dist/no-modules.d.ts +1 -0
  68. package/dist/no-modules.d.ts.map +1 -1
  69. package/dist/no-modules.js +329 -31
  70. package/dist/no-modules.js.map +4 -4
  71. package/dist/repair-fetch.d.ts +38 -8
  72. package/dist/repair-fetch.d.ts.map +1 -1
  73. package/dist/repair-fetch.js +286 -27
  74. package/dist/repair-fetch.js.map +3 -3
  75. package/dist/repair-layer-subscriptions.js.map +2 -2
  76. package/dist/signaling.js.map +2 -2
  77. package/dist/timestamp-codec.js.map +2 -2
  78. package/dist/track-session.d.ts.map +1 -1
  79. package/dist/track-session.js +1 -0
  80. package/dist/track-session.js.map +2 -2
  81. package/dist/wasm-mfu-reassembler.js.map +2 -2
  82. package/dist/wasm-mmtp-container-parser.js +307 -27
  83. package/dist/wasm-mmtp-container-parser.js.map +2 -2
  84. package/package.json +5 -5
  85. package/src/block-policy.ts +216 -52
  86. package/src/catalog-fec-params.ts +1 -0
  87. package/src/codec-utils.ts +121 -1
  88. package/src/fec-manager.ts +593 -33
  89. package/src/index.ts +5 -0
  90. package/src/iso-block-locator.ts +133 -31
  91. package/src/iso-bmff-timing.ts +40 -1
  92. package/src/mmtp-container-parser.ts +341 -32
  93. package/src/mmtp-router.ts +614 -61
  94. package/src/multicast-manager.ts +136 -16
  95. package/src/no-modules.ts +3 -0
  96. package/src/repair-fetch.ts +366 -50
  97. package/src/track-session.ts +3 -0
@@ -8,7 +8,7 @@
8
8
  * - MulticastTransport — SSM join/socket/watchdog
9
9
  */
10
10
 
11
- import { canonicalIpAddress, parseFecBlockProfile, resolveFecBindings, sameIpAddress, type FecBlockProfile, type FecSourceBinding } from "@blockcast/mmt-base";
11
+ import { canonicalIpAddress, parseFecBlockProfile, resolveFecBindings, sameIpAddress, type FecBlockProfile, type FecInstanceGeometry, type FecSourceBinding } from "@blockcast/mmt-base";
12
12
  import {
13
13
  FECManager,
14
14
  MIN_INTERLEAVE_DEPTH_MS,
@@ -18,8 +18,10 @@ import {
18
18
  type FecFallbackDecoder,
19
19
  type MulticastSymbolDelivery,
20
20
  type RepairVia,
21
+ type ExpiredIsoHole,
21
22
  type UndelimitedIsoLoss,
22
23
  type FecFailClosedEvent,
24
+ type IsoSpanFailure,
23
25
  } from "./fec-manager.js";
24
26
  import {
25
27
  deriveBlockClassifierGeometry,
@@ -108,6 +110,13 @@ export interface MulticastRepairEndpoint {
108
110
  tracks: MmtpIngressContext["tracks"];
109
111
  /** The protected flow (`MmtpRouter.registerProvenanceFlow`) this group's datagrams belong to. */
110
112
  flow?: string;
113
+ /**
114
+ * The group's own protected flow, which joinRepairEndpoints registers and
115
+ * releases itself, as join() does for the media flow. Its (S, G, port) must
116
+ * be the endpoint's. Never beside `flow`, which names a flow the caller
117
+ * registered.
118
+ */
119
+ provenance?: MulticastProvenanceJoin;
111
120
  }
112
121
 
113
122
  /**
@@ -407,6 +416,14 @@ export type RepairLifecycleEvent =
407
416
  readonly block: RepairBlockIdentity;
408
417
  readonly blockClass: BlockClass;
409
418
  readonly symbols: RepairSymbolCounts;
419
+ /**
420
+ * Set when what failed is an iso-ssbg1-v1 repair-less span starting at
421
+ * `block.sbn`: `length` SS_IDs between two stated blocks, `sources` of
422
+ * them received. No repair stated the blocks inside it, so the receiver
423
+ * cannot tell which of them lost a source; it is not the failure of the
424
+ * block at `block.sbn` alone.
425
+ */
426
+ readonly span?: IsoSpanFailure;
410
427
  }
411
428
  | {
412
429
  readonly version: 2;
@@ -791,6 +808,19 @@ function isSymbolCounts(value: unknown): boolean {
791
808
  );
792
809
  }
793
810
 
811
+ /** A failed repair-less span: `sources` of its `length` SS_IDs arrived, never all. */
812
+ function isSpanFailure(value: unknown): boolean {
813
+ if (!isRecord(value) || !hasExactKeys(value, ["length", "sources"])) return false;
814
+ const length = value["length"];
815
+ const sources = value["sources"];
816
+ return (
817
+ Number.isSafeInteger(length) &&
818
+ (length as number) > 0 &&
819
+ isNonNegativeSafeInteger(sources) &&
820
+ (sources as number) < (length as number)
821
+ );
822
+ }
823
+
794
824
  function isNullableNonNegative(value: unknown): boolean {
795
825
  return value === null || (typeof value === "number" && Number.isFinite(value) && value >= 0);
796
826
  }
@@ -833,10 +863,16 @@ export function isRepairLifecycleEvent(
833
863
  );
834
864
  case "failed":
835
865
  return (
836
- hasExactKeys(value, ["version", "type", "block", "blockClass", "symbols"]) &&
866
+ hasExactKeys(
867
+ value,
868
+ "span" in value
869
+ ? ["version", "type", "block", "blockClass", "symbols", "span"]
870
+ : ["version", "type", "block", "blockClass", "symbols"],
871
+ ) &&
837
872
  isRepairBlockIdentity(block) &&
838
873
  BLOCK_CLASSES.has(value["blockClass"]) &&
839
- isSymbolCounts(value["symbols"])
874
+ isSymbolCounts(value["symbols"]) &&
875
+ (!("span" in value) || isSpanFailure(value["span"]))
840
876
  );
841
877
  case "repair-preempted":
842
878
  case "repair-deferred":
@@ -1277,6 +1313,10 @@ interface OverlayBinding {
1277
1313
  k: number;
1278
1314
  symbolSize: number;
1279
1315
  blockProfile: FecBlockProfile;
1316
+ /** The overlay instance's catalog geometry, read for its span and
1317
+ * tolerance (FECManager.keyframeOverlayTiming). No part of its decoder: a
1318
+ * reconfigure that changes it keeps an install. */
1319
+ geometry: FecInstanceGeometry;
1280
1320
  }
1281
1321
 
1282
1322
  type RepairOwnerEntry = MulticastRepairEndpoint["repairOwners"][number] & {
@@ -1296,6 +1336,8 @@ export class MulticastManager {
1296
1336
  /** Live joinRepairEndpoints() releases → the repair owners they registered,
1297
1337
  * re-applied after configureMultiTrack() clears catalog-derived owners. */
1298
1338
  readonly #repairReleases = new Map<() => void, RepairOwnerEntry[]>();
1339
+ /** Protected repair flows owned by each live repair-endpoint release. */
1340
+ readonly #repairProvenanceFlows = new Map<() => void, string[]>();
1299
1341
  /** Each source's catalog keyframe overlay, from its `ok` binding. */
1300
1342
  readonly #overlayBindings = new Map<number, OverlayBinding>();
1301
1343
  /** Installed overlay decoders (`setKeyframeOverlayDecoder`), by source. */
@@ -1366,7 +1408,7 @@ export class MulticastManager {
1366
1408
  onPublisherRestart: (packetId, catalogTrackName) => {
1367
1409
  this.#resetStreamOutsideRouter(packetId, catalogTrackName);
1368
1410
  },
1369
- onBlockFailed: (sbn, packetId, catalogTrackName, blockClass) => {
1411
+ onBlockFailed: (sbn, packetId, catalogTrackName, blockClass, span) => {
1370
1412
  const pathCount = this.#fec.blockPathCount(
1371
1413
  sbn,
1372
1414
  packetId,
@@ -1385,6 +1427,7 @@ export class MulticastManager {
1385
1427
  multicast: pathCount?.multicastSymbols ?? 0,
1386
1428
  moq: pathCount?.moqSymbols ?? 0,
1387
1429
  },
1430
+ ...(span === undefined ? {} : { span }),
1388
1431
  });
1389
1432
  },
1390
1433
  onFrameGap: (decision) => {
@@ -1491,6 +1534,15 @@ export class MulticastManager {
1491
1534
  this.#fec.onBlockVanished = (_sbn, packetId, catalogTrackName) => {
1492
1535
  this.#statsFor(packetId, catalogTrackName).vanishedBlocks++;
1493
1536
  };
1537
+ // An installed keyframe overlay may still rebuild a RAP packet a base
1538
+ // block lost; a block only a late source can complete waits for it.
1539
+ this.#fec.keyframeOverlayTiming = (packetId, catalogTrackName) => {
1540
+ const binding = this.#overlayInstalls.has(packetId) ? this.#overlayBindings.get(packetId) : undefined;
1541
+ if (binding === undefined) return undefined;
1542
+ return catalogTrackName === undefined || catalogTrackName === binding.sourceCatalogTrackName
1543
+ ? binding.geometry
1544
+ : undefined;
1545
+ };
1494
1546
  this.#fec.onDecoderUnavailable = (event) => {
1495
1547
  this.#emitRepairLifecycle({
1496
1548
  version: 2,
@@ -2179,6 +2231,9 @@ export class MulticastManager {
2179
2231
  this.#transport.onFailback((reason) => {
2180
2232
  const joined = this.#provenanceJoin;
2181
2233
  if (joined !== null) this.#router.unprotectProvenanceFlow(joined.flow);
2234
+ for (const flows of this.#repairProvenanceFlows.values()) {
2235
+ for (const flow of flows) this.#router.unprotectProvenanceFlow(flow);
2236
+ }
2182
2237
  this.#onFailback?.(reason);
2183
2238
  });
2184
2239
  }
@@ -2221,6 +2276,12 @@ export class MulticastManager {
2221
2276
  "[MulticastManager] join: provenance flow (S, G, port) must match sourceAddress ?? senderAddress, groupAddress and port",
2222
2277
  );
2223
2278
  }
2279
+ if (provenanceFlow !== undefined) {
2280
+ const flow = multicastProvenanceFlowKey(provenanceFlow);
2281
+ if ([...this.#repairProvenanceFlows.values()].some((flows) => flows.includes(flow))) {
2282
+ throw new TypeError(`[MulticastManager] join: provenance flow already registered by a repair endpoint: ${flow}`);
2283
+ }
2284
+ }
2224
2285
  // A join replaces the admission a staged switch was built on. The new
2225
2286
  // join's config decides what is admitted, so nothing is restored or
2226
2287
  // retired here: the switch just ends.
@@ -2245,8 +2306,8 @@ export class MulticastManager {
2245
2306
  : selectedPacketIds === null
2246
2307
  ? undefined
2247
2308
  : [...selectedPacketIds].map((packetId) => ({ name: "", packetId }));
2248
- this.#releaseProvenanceJoin();
2249
2309
  const provenance = config.provenance;
2310
+ this.#releaseProvenanceJoin();
2250
2311
  const protectedTracks = ingressTracks ?? provenance?.flow.tracks;
2251
2312
  const ingress: MmtpIngressContext | undefined = protectedTracks === undefined
2252
2313
  ? undefined
@@ -2315,8 +2376,14 @@ export class MulticastManager {
2315
2376
  provenance: MulticastProvenanceJoin,
2316
2377
  ingress: MmtpIngressContext & { flow: string },
2317
2378
  ): void {
2379
+ this.#router.registerProvenanceFlow(ingress, this.#provenanceReceiver(provenance));
2380
+ this.#hookFailback();
2381
+ this.#provenanceJoin = { flow: ingress.flow };
2382
+ }
2383
+
2384
+ #provenanceReceiver(provenance: MulticastProvenanceJoin): BcProvenanceV2Receiver {
2318
2385
  const { flow, auth } = provenance;
2319
- const receiver = new BcProvenanceV2Receiver({
2386
+ return new BcProvenanceV2Receiver({
2320
2387
  ...provenance.receiver,
2321
2388
  // The caller's ctx when it passes one, else the catalog's: an explicit
2322
2389
  // `catalogCtx: undefined` must not switch off the 7.2.4 ctx check.
@@ -2333,9 +2400,6 @@ export class MulticastManager {
2333
2400
  maxAuthDelayMs: flow.maxAuthDelayMs,
2334
2401
  manifestTimerMs: flow.manifestTimerMs,
2335
2402
  });
2336
- this.#router.registerProvenanceFlow(ingress, receiver);
2337
- this.#hookFailback();
2338
- this.#provenanceJoin = { flow: ingress.flow };
2339
2403
  }
2340
2404
 
2341
2405
  /** Un-protect: drop the flow's hold queues (no expiry counted). */
@@ -2368,12 +2432,33 @@ export class MulticastManager {
2368
2432
  * callback delivers must come from a subscription opened on
2369
2433
  * `options.gateway`. A callback that also merges another source (a MoQ or
2370
2434
  * WebSocket repair feed) must not name a native provider here.
2435
+ *
2436
+ * An endpoint's `provenance` makes its group a protected flow of its own
2437
+ * (multicast-02 7.2.7), registered here and released with the group; its
2438
+ * records ride in band on the group's port. On the user-agent path a
2439
+ * flow-less repair group of a protected track is set aside, never read, so
2440
+ * a player joining a protected catalog's repair groups passes it.
2371
2441
  */
2372
2442
  joinRepairEndpoints(
2373
2443
  endpoints: readonly MulticastRepairEndpoint[],
2374
2444
  provider?: WindowMulticastGateway | MulticastRepairSubscribe,
2375
2445
  options?: { gateway?: WindowMulticastGateway },
2376
2446
  ): () => void {
2447
+ for (const { provenance, flow, source, group, port } of endpoints) {
2448
+ if (provenance === undefined) continue;
2449
+ if (flow !== undefined) {
2450
+ throw new TypeError("[MulticastManager] joinRepairEndpoints: an endpoint names provenance or flow, never both");
2451
+ }
2452
+ if (
2453
+ !sameIpAddress(source, provenance.flow.source) ||
2454
+ !sameIpAddress(group, provenance.flow.groupAddress) ||
2455
+ port !== provenance.flow.port
2456
+ ) {
2457
+ throw new RangeError(
2458
+ "[MulticastManager] joinRepairEndpoints: provenance flow (S, G, port) must match the endpoint's source, group and port",
2459
+ );
2460
+ }
2461
+ }
2377
2462
  const releases: Array<() => void> = [];
2378
2463
  let released = false;
2379
2464
  const safely = (each: () => void) => {
@@ -2383,6 +2468,21 @@ export class MulticastManager {
2383
2468
  console.warn("[MulticastManager] repair group release failed", error);
2384
2469
  }
2385
2470
  };
2471
+ // Caller-owned flows reserve their keys even though this method does not
2472
+ // own their release; a protected endpoint must not replace one silently.
2473
+ const usedFlows = new Set(endpoints.flatMap(({ flow }) => flow === undefined ? [] : [flow]));
2474
+ const preparedProvenance = endpoints.map((endpoint) => {
2475
+ if (endpoint.provenance === undefined) return undefined;
2476
+ const flow = multicastProvenanceFlowKey(endpoint.provenance.flow);
2477
+ if (usedFlows.has(flow) || this.#provenanceJoin?.flow === flow ||
2478
+ [...this.#repairProvenanceFlows.values()].some((flows) => flows.includes(flow))) {
2479
+ throw new TypeError(`[MulticastManager] joinRepairEndpoints: provenance flow already registered: ${flow}`);
2480
+ }
2481
+ usedFlows.add(flow);
2482
+ // Construct every receiver before registering or joining any endpoint.
2483
+ return { flow, receiver: this.#provenanceReceiver(endpoint.provenance) };
2484
+ });
2485
+ const provenanceFlows: string[] = [];
2386
2486
  // An overlay leg's source and repair track names come from the
2387
2487
  // endpoint's ingress tracks.
2388
2488
  const repairOwners: RepairOwnerEntry[] = endpoints.flatMap((endpoint) =>
@@ -2392,11 +2492,19 @@ export class MulticastManager {
2392
2492
  repairTrackName: endpoint.tracks.find((t) => t.packetId === owner.packetId)?.name,
2393
2493
  }));
2394
2494
  this.#applyRepairOwners(repairOwners);
2395
- for (const endpoint of endpoints) {
2495
+ for (const [index, endpoint] of endpoints.entries()) {
2496
+ const flow = endpoint.provenance === undefined ? endpoint.flow : multicastProvenanceFlowKey(endpoint.provenance.flow);
2396
2497
  const ingress: MmtpIngressContext = {
2397
2498
  tracks: Object.freeze(endpoint.tracks.map(({ name, packetId }) => Object.freeze({ name, packetId }))),
2398
- ...(endpoint.flow === undefined ? {} : { flow: endpoint.flow }),
2499
+ ...(flow === undefined ? {} : { flow }),
2399
2500
  };
2501
+ if (endpoint.provenance !== undefined) {
2502
+ const prepared = preparedProvenance[index];
2503
+ if (prepared === undefined) throw new Error("[MulticastManager] repair provenance preparation missing");
2504
+ this.#router.registerProvenanceFlow(ingress as MmtpIngressContext & { flow: string }, prepared.receiver);
2505
+ provenanceFlows.push(prepared.flow);
2506
+ releases.push(() => this.#router.releaseProvenanceFlow(flow!));
2507
+ }
2400
2508
  let sender: string | undefined;
2401
2509
  const feed = (packet: Uint8Array, sourceAddress: string | undefined, ingressToFeed: MmtpIngressContext) => {
2402
2510
  if (released) return;
@@ -2433,7 +2541,7 @@ export class MulticastManager {
2433
2541
  packetIds: endpoint.packetIds,
2434
2542
  tracks: endpoint.tracks.map(({ name, packetId }) => ({ name, packetId })),
2435
2543
  // A protected repair group's records ride in band on its port (7.2.3).
2436
- ...(endpoint.flow === undefined ? {} : { protected: true }),
2544
+ ...(flow === undefined ? {} : { protected: true }),
2437
2545
  }, ingress).then((joined) => {
2438
2546
  if (!joined && !released) fail(transport.lastJoinOutcome);
2439
2547
  });
@@ -2442,9 +2550,12 @@ export class MulticastManager {
2442
2550
  if (released) return;
2443
2551
  released = true;
2444
2552
  this.#repairReleases.delete(release);
2553
+ this.#repairProvenanceFlows.delete(release);
2445
2554
  for (const each of releases.splice(0)) safely(each);
2446
2555
  };
2447
2556
  this.#repairReleases.set(release, repairOwners);
2557
+ this.#repairProvenanceFlows.set(release, provenanceFlows);
2558
+ if (provenanceFlows.length) this.#hookFailback();
2448
2559
  return release;
2449
2560
  }
2450
2561
 
@@ -3084,6 +3195,7 @@ export class MulticastManager {
3084
3195
  geometry.blockProfile,
3085
3196
  `tracks[${JSON.stringify(track.name)}].fec keyframe overlay blockProfile`,
3086
3197
  ),
3198
+ geometry,
3087
3199
  });
3088
3200
  }
3089
3201
  }
@@ -3129,7 +3241,7 @@ export class MulticastManager {
3129
3241
  const before = this.#overlayBindings.get(sourcePacketId);
3130
3242
  const after = overlayBindings.get(sourcePacketId);
3131
3243
  const same = before !== undefined && after !== undefined &&
3132
- (Object.keys(after) as Array<keyof OverlayBinding>).every((key) => after[key] === before[key]);
3244
+ (Object.keys(after) as Array<keyof OverlayBinding>).every((key) => key === "geometry" || after[key] === before[key]);
3133
3245
  if (!same) install.dispose();
3134
3246
  else if (this.#router.hasKeyframeOverlay(after.repairPacketId)) this.#router.resetKeyframeOverlays(sourcePacketId);
3135
3247
  // A retired packet ID took the router's instance with it.
@@ -3193,10 +3305,15 @@ export class MulticastManager {
3193
3305
  * Register the range repair scheduler (draft-ramadan-moq-fec §7.5): from now
3194
3306
  * on an iso-ssbg1-v1 gap missing a source and every repair is kept as a
3195
3307
  * pending hole and reported here, and `closeIsoHoles` must be called for it
3196
- * once its range FETCH ends (or none is sent).
3308
+ * once its range FETCH ends (or none is sent). `onExpired` is told of a
3309
+ * pending hole the stream runs past the locator's horizon: returning true,
3310
+ * the caller closes it (`closeIsoHoles`); otherwise it is discarded.
3197
3311
  */
3198
- onUndelimitedLoss(cb: (loss: UndelimitedIsoLoss) => void): void {
3199
- this.#fec.setUndelimitedLossHandler(cb);
3312
+ onUndelimitedLoss(
3313
+ cb: (loss: UndelimitedIsoLoss) => void,
3314
+ onExpired?: (hole: ExpiredIsoHole) => boolean,
3315
+ ): void {
3316
+ this.#fec.setUndelimitedLossHandler(cb, onExpired ?? null);
3200
3317
  }
3201
3318
 
3202
3319
  /**
@@ -3515,6 +3632,9 @@ export class MulticastManager {
3515
3632
  ...("symbols" in event
3516
3633
  ? { symbols: Object.freeze({ ...event.symbols }) }
3517
3634
  : {}),
3635
+ ...("span" in event && event.span !== undefined
3636
+ ? { span: Object.freeze({ ...event.span }) }
3637
+ : {}),
3518
3638
  },
3519
3639
  ) as RepairLifecycleEvent);
3520
3640
  // Serialize before invoking observers so a re-entrant observer cannot log
package/src/no-modules.ts CHANGED
@@ -12,6 +12,9 @@ export {
12
12
  } from './carp-catalog.js'
13
13
  export { catalogFecInterleaveMs, fecBlockBudgetMs, fecBlockDeadlineMs } from '@blockcast/mmt-fec'
14
14
  export { FEC_INACTIVE_REASONS, catalogDeclaresFec, resolveFecState } from './fec-state.js'
15
+ // The per-instance report a receiver acts on, for classic-script pages that
16
+ // must publish it (BLO-55242).
17
+ export { runtimeFecCatalogReport, validateFecCatalog } from './catalog-fec-params.js'
15
18
  export { MmtpFecSession } from './mmtp-fec-session.js'
16
19
  export { catalogAmtNetworkSource, catalogAtsc3NetworkSource } from './catalog-network-source.js'
17
20
  export { MmtpToCmaf } from './mmtp-to-cmaf.js'