@blockcast/mmt-container 0.1.0 → 0.3.0-main.ef68de90edb3
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 +524 -0
- package/dist/.build-stamp +0 -0
- package/dist/__tests__/test-utils.d.ts +71 -0
- package/dist/__tests__/test-utils.d.ts.map +1 -0
- package/dist/align.d.ts +152 -0
- package/dist/align.d.ts.map +1 -0
- package/dist/align.js +88 -0
- package/dist/align.js.map +7 -0
- package/dist/audio-init-parser.d.ts +66 -0
- package/dist/audio-init-parser.d.ts.map +1 -0
- package/dist/audio-init-parser.js +118 -0
- package/dist/audio-init-parser.js.map +7 -0
- package/dist/audio-ring-buffer.d.ts +50 -0
- package/dist/audio-ring-buffer.d.ts.map +1 -0
- package/dist/audio-ring-buffer.js +80 -0
- package/dist/audio-ring-buffer.js.map +7 -0
- package/dist/authored-timing.d.ts +32 -0
- package/dist/authored-timing.d.ts.map +1 -0
- package/dist/authored-timing.js +32 -0
- package/dist/authored-timing.js.map +7 -0
- package/dist/block-policy.d.ts +314 -0
- package/dist/block-policy.d.ts.map +1 -0
- package/dist/block-policy.js +466 -0
- package/dist/block-policy.js.map +7 -0
- package/dist/browser-runtime.js +26549 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +429 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +985 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +275 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +702 -0
- package/dist/catalog-fec-params.js.map +7 -0
- package/dist/catalog-network-source.d.ts +42 -0
- package/dist/catalog-network-source.d.ts.map +1 -0
- package/dist/catalog-network-source.js +47 -0
- package/dist/catalog-network-source.js.map +7 -0
- package/dist/catalog-validator.d.ts +18 -0
- package/dist/catalog-validator.d.ts.map +1 -0
- package/dist/catalog-validator.js +7747 -0
- package/dist/catalog-validator.js.map +7 -0
- package/dist/cmaf-block-assembler.d.ts +285 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1966 -0
- package/dist/cmaf-block-assembler.js.map +7 -0
- package/dist/cmaf-group-batcher.d.ts +38 -0
- package/dist/cmaf-group-batcher.d.ts.map +1 -0
- package/dist/cmaf-group-batcher.js +176 -0
- package/dist/cmaf-group-batcher.js.map +7 -0
- package/dist/cmcd-producer.d.ts +104 -0
- package/dist/cmcd-producer.d.ts.map +1 -0
- package/dist/cmcd-producer.js +183 -0
- package/dist/cmcd-producer.js.map +7 -0
- package/dist/codec-utils.d.ts +384 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1546 -0
- package/dist/codec-utils.js.map +7 -0
- package/dist/conceal-timeline.d.ts +146 -0
- package/dist/conceal-timeline.d.ts.map +1 -0
- package/dist/conceal-timeline.js +137 -0
- package/dist/conceal-timeline.js.map +7 -0
- package/dist/delivery-gap.d.ts +75 -0
- package/dist/delivery-gap.d.ts.map +1 -0
- package/dist/delivery-gap.js +88 -0
- package/dist/delivery-gap.js.map +7 -0
- package/dist/duplicate-ledger.d.ts +197 -0
- package/dist/duplicate-ledger.d.ts.map +1 -0
- package/dist/duplicate-ledger.js +226 -0
- package/dist/duplicate-ledger.js.map +7 -0
- package/dist/fec-codec.d.ts +32 -0
- package/dist/fec-codec.d.ts.map +1 -0
- package/dist/fec-codec.js +47 -0
- package/dist/fec-codec.js.map +7 -0
- package/dist/fec-manager.d.ts +583 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +3899 -0
- package/dist/fec-manager.js.map +7 -0
- package/dist/fec-starvation-detector.d.ts +59 -0
- package/dist/fec-starvation-detector.d.ts.map +1 -0
- package/dist/fec-starvation-detector.js +60 -0
- package/dist/fec-starvation-detector.js.map +7 -0
- package/dist/fec-state.d.ts +131 -0
- package/dist/fec-state.d.ts.map +1 -0
- package/dist/fec-state.js +87 -0
- package/dist/fec-state.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +94 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +673 -0
- package/dist/fec-worker-setup.js.map +7 -0
- package/dist/fmp4-completion.d.ts +30 -0
- package/dist/fmp4-completion.d.ts.map +1 -0
- package/dist/fmp4-completion.js +21 -0
- package/dist/fmp4-completion.js.map +7 -0
- package/dist/fmp4-reader.d.ts +37 -0
- package/dist/fmp4-reader.d.ts.map +1 -0
- package/dist/fmp4-reader.js +100 -0
- package/dist/fmp4-reader.js.map +7 -0
- package/dist/index.d.ts +44 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +460 -14
- package/dist/index.js.map +7 -1
- package/dist/iso-block-locator.d.ts +118 -0
- package/dist/iso-block-locator.d.ts.map +1 -0
- package/dist/iso-block-locator.js +289 -0
- package/dist/iso-block-locator.js.map +7 -0
- package/dist/iso-bmff-timing.d.ts +78 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -0
- package/dist/iso-bmff-timing.js +593 -0
- package/dist/iso-bmff-timing.js.map +7 -0
- package/dist/loc.d.ts +70 -75
- package/dist/loc.d.ts.map +1 -1
- package/dist/loc.js +106 -192
- package/dist/loc.js.map +7 -1
- package/dist/manifest-auth-plan.d.ts +30 -0
- package/dist/manifest-auth-plan.d.ts.map +1 -0
- package/dist/manifest-auth-plan.js +1266 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +262 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +584 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +313 -9
- package/dist/mfu-reassembler.d.ts.map +1 -1
- package/dist/mfu-reassembler.js +3051 -285
- package/dist/mfu-reassembler.js.map +7 -1
- package/dist/mfu-reassembly-policy.d.ts +24 -0
- package/dist/mfu-reassembly-policy.d.ts.map +1 -0
- package/dist/mfu-reassembly-policy.js +99 -0
- package/dist/mfu-reassembly-policy.js.map +7 -0
- package/dist/mmtp-container-parser.d.ts +568 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +6580 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +9616 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +138 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +6814 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +679 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +11278 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +187 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +716 -0
- package/dist/mmtp-to-cmaf.js.map +7 -0
- package/dist/multicast-auth-catalog.d.ts +115 -0
- package/dist/multicast-auth-catalog.d.ts.map +1 -0
- package/dist/multicast-auth-catalog.js +202 -0
- package/dist/multicast-auth-catalog.js.map +7 -0
- package/dist/multicast-input.d.ts +141 -0
- package/dist/multicast-input.d.ts.map +1 -0
- package/dist/multicast-input.js +390 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +669 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +19101 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +271 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +2264 -0
- package/dist/multicast-transport.js.map +7 -0
- package/dist/multicast-unwrap.d.ts +57 -0
- package/dist/multicast-unwrap.d.ts.map +1 -0
- package/dist/multicast-unwrap.js +418 -0
- package/dist/multicast-unwrap.js.map +7 -0
- package/dist/no-modules.d.ts +10 -0
- package/dist/no-modules.d.ts.map +1 -0
- package/dist/no-modules.js +9491 -0
- package/dist/no-modules.js.map +7 -0
- package/dist/phase14-catalog-override.d.ts +126 -0
- package/dist/phase14-catalog-override.d.ts.map +1 -0
- package/dist/phase14-catalog-override.js +155 -0
- package/dist/phase14-catalog-override.js.map +7 -0
- package/dist/repair-fetch.d.ts +270 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +381 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/repair-layers.d.ts +158 -0
- package/dist/repair-layers.d.ts.map +1 -0
- package/dist/repair-layers.js +344 -0
- package/dist/repair-layers.js.map +7 -0
- package/dist/sample-combiner.d.ts +212 -0
- package/dist/sample-combiner.d.ts.map +1 -0
- package/dist/sample-combiner.js +595 -0
- package/dist/sample-combiner.js.map +7 -0
- package/dist/signaling.d.ts +29 -0
- package/dist/signaling.d.ts.map +1 -0
- package/dist/signaling.js +572 -0
- package/dist/signaling.js.map +7 -0
- package/dist/source-auth.d.ts +2 -0
- package/dist/source-auth.d.ts.map +1 -0
- package/dist/source-auth.js +1209 -0
- package/dist/source-auth.js.map +7 -0
- package/dist/switching-set-alignment.d.ts +61 -0
- package/dist/switching-set-alignment.d.ts.map +1 -0
- package/dist/switching-set-alignment.js +70 -0
- package/dist/switching-set-alignment.js.map +7 -0
- package/dist/timestamp-codec.d.ts +34 -0
- package/dist/timestamp-codec.d.ts.map +1 -0
- package/dist/timestamp-codec.js +473 -0
- package/dist/timestamp-codec.js.map +7 -0
- package/dist/track-pipeline-setup.d.ts +83 -0
- package/dist/track-pipeline-setup.d.ts.map +1 -0
- package/dist/track-pipeline-setup.js +291 -0
- package/dist/track-pipeline-setup.js.map +7 -0
- package/dist/track-pipeline.d.ts +121 -0
- package/dist/track-pipeline.d.ts.map +1 -0
- package/dist/track-pipeline.js +209 -0
- package/dist/track-pipeline.js.map +7 -0
- package/dist/track-session.d.ts +414 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +754 -0
- package/dist/track-session.js.map +7 -0
- package/dist/transport-pool.d.ts +69 -0
- package/dist/transport-pool.d.ts.map +1 -0
- package/dist/transport-pool.js +74 -0
- package/dist/transport-pool.js.map +7 -0
- package/dist/wasm-mfu-reassembler.d.ts +97 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +2133 -0
- package/dist/wasm-mfu-reassembler.js.map +7 -0
- package/dist/wasm-mmtp-container-parser.d.ts +10 -0
- package/dist/wasm-mmtp-container-parser.d.ts.map +1 -0
- package/dist/wasm-mmtp-container-parser.js +6834 -0
- package/dist/wasm-mmtp-container-parser.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/README.md +223 -0
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +38 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +78 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +93 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +346 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +380 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +11 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +14 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +859 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts +10 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js +8 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +20 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +370 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +104 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +181 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +194 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +62 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +9 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js +13 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/package.json +59 -0
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +93 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +392 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +399 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1502 -0
- package/node_modules/@blockcast/fec-worker/src/index.ts +35 -0
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +589 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +222 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +209 -0
- package/node_modules/@blockcast/fec-worker/src/transfer.ts +12 -0
- package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-base/README.md +134 -0
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/README.md +271 -0
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +296 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +106 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +288 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +46 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +96 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +33 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +57 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +205 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +240 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +20 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +258 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +382 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +41 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +81 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +170 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +134 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/package.json +79 -0
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +371 -0
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +439 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +127 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +68 -0
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +310 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +94 -0
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +463 -0
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -0
- package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +195 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +28 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +128 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +37 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +179 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +99 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +492 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/package.json +45 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +171 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +3 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +230 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +669 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +521 -0
- package/node_modules/@noble/hashes/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_assert.js +18 -0
- package/node_modules/@noble/hashes/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_blake.js +50 -0
- package/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_md.js +162 -0
- package/node_modules/@noble/hashes/_md.js.map +1 -0
- package/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_u64.js +90 -0
- package/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/argon2.js +401 -0
- package/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake1.js +459 -0
- package/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +420 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2b.js +14 -0
- package/node_modules/@noble/hashes/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2s.js +24 -0
- package/node_modules/@noble/hashes/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake3.js +255 -0
- package/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/crypto.js +5 -0
- package/node_modules/@noble/hashes/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.js +18 -0
- package/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/eskdf.js +166 -0
- package/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.js +15 -0
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.js +45 -0
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.js +155 -0
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.js +67 -0
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.js +392 -0
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.js +452 -0
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.js +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.js +21 -0
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.js +251 -0
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.js +160 -0
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.js +82 -0
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.js +86 -0
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/esm/index.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/index.js +33 -0
- package/node_modules/@noble/hashes/esm/index.js.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/esm/package.json +10 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.js +228 -0
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.js +11 -0
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.js +375 -0
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.js +20 -0
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js +393 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.js +234 -0
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.js +26 -0
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.js +281 -0
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hkdf.js +88 -0
- package/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hmac.js +91 -0
- package/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/index.d.ts +1 -0
- package/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/index.js +33 -0
- package/node_modules/@noble/hashes/index.js.map +1 -0
- package/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/legacy.js +287 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +266 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/pbkdf2.js +101 -0
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.js +16 -0
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/scrypt.js +232 -0
- package/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha1.js +14 -0
- package/node_modules/@noble/hashes/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha2.js +384 -0
- package/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha256.js +23 -0
- package/node_modules/@noble/hashes/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.js +402 -0
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3.js +239 -0
- package/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha512.js +29 -0
- package/node_modules/@noble/hashes/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/src/_assert.ts +22 -0
- package/node_modules/@noble/hashes/src/_blake.ts +50 -0
- package/node_modules/@noble/hashes/src/_md.ts +176 -0
- package/node_modules/@noble/hashes/src/_u64.ts +91 -0
- package/node_modules/@noble/hashes/src/argon2.ts +497 -0
- package/node_modules/@noble/hashes/src/blake1.ts +534 -0
- package/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +10 -0
- package/node_modules/@noble/hashes/src/blake2s.ts +20 -0
- package/node_modules/@noble/hashes/src/blake3.ts +272 -0
- package/node_modules/@noble/hashes/src/crypto.ts +9 -0
- package/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +187 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +88 -0
- package/node_modules/@noble/hashes/src/hmac.ts +94 -0
- package/node_modules/@noble/hashes/src/index.ts +31 -0
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +122 -0
- package/node_modules/@noble/hashes/src/ripemd160.ts +12 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +257 -0
- package/node_modules/@noble/hashes/src/sha1.ts +10 -0
- package/node_modules/@noble/hashes/src/sha2.ts +402 -0
- package/node_modules/@noble/hashes/src/sha256.ts +24 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +499 -0
- package/node_modules/@noble/hashes/src/sha3.ts +258 -0
- package/node_modules/@noble/hashes/src/sha512.ts +34 -0
- package/node_modules/@noble/hashes/src/utils.ts +395 -0
- package/node_modules/@noble/hashes/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/utils.js +313 -0
- package/node_modules/@noble/hashes/utils.js.map +1 -0
- package/package.json +179 -8
- package/schemas/catalog.schema.json +357 -0
- package/src/align.ts +239 -0
- package/src/audio-init-parser.ts +189 -0
- package/src/audio-ring-buffer.ts +120 -0
- package/src/authored-timing.ts +63 -0
- package/src/block-policy.ts +903 -0
- package/src/carp-catalog.ts +1065 -0
- package/src/catalog-fec-params.ts +729 -0
- package/src/catalog-network-source.ts +74 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1255 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +329 -0
- package/src/codec-utils.ts +1984 -0
- package/src/conceal-timeline.ts +293 -0
- package/src/delivery-gap.ts +147 -0
- package/src/duplicate-ledger.ts +372 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +4298 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-state.ts +219 -0
- package/src/fec-worker-setup.ts +283 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +590 -21
- package/src/iso-block-locator.ts +329 -0
- package/src/iso-bmff-timing.ts +813 -0
- package/src/loc.ts +128 -154
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +841 -0
- package/src/mfu-reassembler.ts +3480 -155
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +2380 -0
- package/src/mmtp-decode-pipeline.ts +406 -0
- package/src/mmtp-router.ts +4860 -0
- package/src/mmtp-to-cmaf.ts +977 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +793 -0
- package/src/multicast-manager.ts +2783 -0
- package/src/multicast-transport.ts +1058 -0
- package/src/multicast-unwrap.ts +132 -0
- package/src/no-modules.ts +21 -0
- package/src/phase14-catalog-override.ts +336 -0
- package/src/repair-fetch.ts +772 -0
- package/src/repair-layers.ts +533 -0
- package/src/sample-combiner.ts +938 -0
- package/src/signaling.ts +78 -0
- package/src/source-auth.ts +1 -0
- package/src/switching-set-alignment.ts +109 -0
- package/src/timestamp-codec.ts +265 -0
- package/src/track-pipeline-setup.ts +205 -0
- package/src/track-pipeline.ts +332 -0
- package/src/track-session.ts +1010 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +405 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +106 -0
- package/test-vectors/catalog/negative/archive-origin-with-path.json +33 -0
- package/test-vectors/catalog/negative/archive-unknown-field.json +34 -0
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +51 -0
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +52 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +28 -0
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +33 -0
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +31 -0
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +32 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +34 -0
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +24 -0
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +33 -0
- package/test-vectors/catalog/negative/legacy-selection-params.json +15 -0
- package/test-vectors/catalog/negative/media-track-repair-layer.json +16 -0
- package/test-vectors/catalog/negative/missing-mmtp-fields.json +12 -0
- package/test-vectors/catalog/negative/multicast-auth-padded-key.json +37 -0
- package/test-vectors/catalog/negative/multicast-auth-reused-track-format.json +53 -0
- package/test-vectors/catalog/negative/multicast-auth-trailing-pad-bits.json +37 -0
- package/test-vectors/catalog/negative/multicast-endpoint-missing-protocol-and-source.json +24 -0
- package/test-vectors/catalog/negative/multicast-network-source-empty.json +44 -0
- package/test-vectors/catalog/negative/multicast-packet-id-signaling.json +26 -0
- package/test-vectors/catalog/negative/network-source-object.json +25 -0
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +24 -0
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +27 -0
- package/test-vectors/catalog/negative/repair-track-legacy-shape.json +19 -0
- package/test-vectors/catalog/negative/track-role-empty.json +16 -0
- package/test-vectors/catalog/negative/track-role-non-string.json +16 -0
- package/test-vectors/catalog/positive/archive-origin.json +34 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +52 -0
- package/test-vectors/catalog/positive/fec-layered-repair.json +106 -0
- package/test-vectors/catalog/positive/fec-multicast.json +52 -0
- package/test-vectors/catalog/positive/flat-av.json +30 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +55 -0
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +43 -0
- package/test-vectors/catalog/positive/ticks-and-mixed-timescales.json +39 -0
- package/test-vectors/catalog/positive/track-role.json +49 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1/catalog.json +65 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1.archive.sha256 +1 -0
- package/test-vectors/catalog-multicast-auth-v1.json +26 -0
- package/test-vectors/catalog-validation.json +732 -0
- package/test-vectors/catalog-validator-public-api.mjs +25 -0
- package/test-vectors/generate-source-auth-fixture.mjs +114 -0
- package/test-vectors/hevc-x265-repeat-headers-v1.json +40 -0
- package/test-vectors/source-auth-v1.json +61 -0
- package/test-vectors/source-contiguity-v1.json +131 -0
- package/test-vectors/subsample-placement-v1.json +230 -0
- package/dist/mmtp.d.ts +0 -73
- package/dist/mmtp.d.ts.map +0 -1
- package/dist/mmtp.js +0 -210
- package/dist/mmtp.js.map +0 -1
- package/src/mmtp.ts +0 -277
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 14 catalog-override hook (test harness only).
|
|
3
|
+
*
|
|
4
|
+
* When `globalThis.__PHASE14_CATALOG_OVERRIDE` is set (injected by the
|
|
5
|
+
* 7point test via `page.addInitScript` — see
|
|
6
|
+
* packages/moq-server/tests/7point-validation.test.mjs `applyPhase14CatalogOverride`)
|
|
7
|
+
* the override's `tracks[]` are merged into whatever catalog the MoQ-delivered
|
|
8
|
+
* JSON produced:
|
|
9
|
+
*
|
|
10
|
+
* - Dedupe by `track.name`.
|
|
11
|
+
* - When both sides carry a track with the same name, the override's
|
|
12
|
+
* `fec` config wins — this is how the 7point harness steers multi-track
|
|
13
|
+
* tests onto the Phase 14 `video/base` + `video/delta` + `video/repair`
|
|
14
|
+
* switching set without asking the publisher to change its catalog.
|
|
15
|
+
* - Tracks present only in the override are appended as-is.
|
|
16
|
+
* - Tracks present only in the MoQ catalog are preserved unchanged.
|
|
17
|
+
*
|
|
18
|
+
* This module is deliberately player-agnostic. It exposes:
|
|
19
|
+
*
|
|
20
|
+
* getPhase14CatalogOverride() — read + shape-check the global.
|
|
21
|
+
* mergeOverrideIntoHangRenditions() — merge into a `@moq/hang`
|
|
22
|
+
* Catalog.Root `video.renditions` /
|
|
23
|
+
* `audio.renditions` dict. Used by
|
|
24
|
+
* hang-mmt-fec/js/watch/src/broadcast.ts.
|
|
25
|
+
* mergeOverrideIntoCmsfTracks() — merge into moqtail's CMSF-flat
|
|
26
|
+
* `tracks[]` array. Used by
|
|
27
|
+
* moqtail-private CMSFCatalog.from().
|
|
28
|
+
*
|
|
29
|
+
* Production builds never set the global, so all three helpers are no-ops at
|
|
30
|
+
* runtime unless the test harness opts in.
|
|
31
|
+
*/
|
|
32
|
+
import type { FecAlgorithm, FecCatalogConfig } from "./carp-catalog.js";
|
|
33
|
+
/**
|
|
34
|
+
* A single override track entry — mirrors the fixture at
|
|
35
|
+
* `packages/moq-server/tests/fixtures/multi-track-catalog.json`.
|
|
36
|
+
*
|
|
37
|
+
* Kept intentionally permissive: the canonical fixture carries `name`,
|
|
38
|
+
* `altGroup`, `framerate`, and `fec`, but future 7point scenarios may extend
|
|
39
|
+
* with additional hints without wanting this module to gate-keep them.
|
|
40
|
+
*/
|
|
41
|
+
export interface Phase14OverrideTrack {
|
|
42
|
+
name: string;
|
|
43
|
+
/** CMSF packaging kind. Optional per track — when absent, the merge
|
|
44
|
+
* derives it from the override's top-level `streamingFormat`. */
|
|
45
|
+
packaging?: "mmtp" | "cmaf" | "loc" | "timeline";
|
|
46
|
+
/** Required when packaging is `mmtp`; the current publisher emits MFU mode. */
|
|
47
|
+
mmtpMode?: "mpu" | "mfu";
|
|
48
|
+
/** Required when packaging is `mmtp`; copied into synthesized CMSF tracks. */
|
|
49
|
+
timescale?: number;
|
|
50
|
+
/** Required when packaging is `mmtp`; copied into synthesized CMSF tracks. */
|
|
51
|
+
groupDurationMs?: number;
|
|
52
|
+
/** Codec string. Optional per track — when absent, the merge inherits
|
|
53
|
+
* from the existing video/audio rendition in the MoQ catalog (the
|
|
54
|
+
* publisher's declaration). Throws only when neither the override nor
|
|
55
|
+
* any existing rendition supplies one. */
|
|
56
|
+
codec?: string;
|
|
57
|
+
role?: "video" | "audio" | "timeline";
|
|
58
|
+
altGroup?: number;
|
|
59
|
+
framerate?: number;
|
|
60
|
+
fec?: Partial<FecCatalogConfig> & {
|
|
61
|
+
algorithm: FecAlgorithm;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The shape the 7point harness writes to `globalThis.__PHASE14_CATALOG_OVERRIDE`.
|
|
66
|
+
* Extra top-level fields (`version`, `streamingFormat`, ...) are ignored —
|
|
67
|
+
* the merge only consumes `tracks[]`.
|
|
68
|
+
*/
|
|
69
|
+
export interface Phase14CatalogOverride {
|
|
70
|
+
version?: string;
|
|
71
|
+
streamingFormat?: string;
|
|
72
|
+
tracks: Phase14OverrideTrack[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Read `globalThis.__PHASE14_CATALOG_OVERRIDE` and return it only when it has
|
|
76
|
+
* a well-formed `tracks[]` array. Malformed values log + return `null` rather
|
|
77
|
+
* than throw so a broken fixture never kills the MoQ path for a real stream.
|
|
78
|
+
*/
|
|
79
|
+
export declare function getPhase14CatalogOverride(): Phase14CatalogOverride | null;
|
|
80
|
+
/**
|
|
81
|
+
* Merge override tracks into a `@moq/hang` Catalog.Root-like object. The
|
|
82
|
+
* caller passes the already-parsed Catalog.Root (mutates in place and also
|
|
83
|
+
* returns it for convenience). No-op when `override` is null.
|
|
84
|
+
*
|
|
85
|
+
* Dedupe rule: override wins for `fec` config and `framerate`. Everything
|
|
86
|
+
* else (codec, container kind) is preserved from the MoQ-delivered rendition
|
|
87
|
+
* when it exists, or synthesised from the override when it does not.
|
|
88
|
+
*
|
|
89
|
+
* Typed `any` here rather than narrow-matching `Catalog.Root` because the
|
|
90
|
+
* upstream `@moq/hang` schema is branded (u53) and the container `kind` union
|
|
91
|
+
* varies by version (`loc` kind appears in hang-mmt-fec's fork). Matching
|
|
92
|
+
* that surface exactly would over-couple this module to a single upstream
|
|
93
|
+
* revision; the runtime shape we rely on (`.video.renditions` dict mutation)
|
|
94
|
+
* is stable.
|
|
95
|
+
*/
|
|
96
|
+
export declare function mergeOverrideIntoHangRenditions<T extends Record<string, any>>(catalog: T, override: Phase14CatalogOverride | null): T;
|
|
97
|
+
/**
|
|
98
|
+
* Shape-minimal description of a CMSF track input (pre-validation JSON, not
|
|
99
|
+
* the parsed `CMSFTrack`). Keeps this module free of a hard dependency on
|
|
100
|
+
* moqtail-ts.
|
|
101
|
+
*/
|
|
102
|
+
type CmsfTrackJson = {
|
|
103
|
+
name: string;
|
|
104
|
+
packaging?: string;
|
|
105
|
+
mmtpMode?: string;
|
|
106
|
+
timescale?: number;
|
|
107
|
+
groupDurationMs?: number;
|
|
108
|
+
role?: string;
|
|
109
|
+
codec?: string;
|
|
110
|
+
framerate?: number;
|
|
111
|
+
fec?: unknown;
|
|
112
|
+
[k: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Merge override tracks into a raw CMSF `tracks[]` JSON array (as produced
|
|
116
|
+
* by `JSON.parse(catalog.json)` inside `CMSFCatalog.from`).
|
|
117
|
+
*
|
|
118
|
+
* Dedupe by `name`. For name collisions, publisher-emitted `fec` + `framerate`
|
|
119
|
+
* are preserved (the publisher is ground truth for wire parameters). For new
|
|
120
|
+
* track names, missing `packaging` is derived from the override's top-level
|
|
121
|
+
* `streamingFormat`, and missing `codec` is inherited from any existing video
|
|
122
|
+
* track in the catalog. Throws on bad init when neither source supplies them.
|
|
123
|
+
*/
|
|
124
|
+
export declare function mergeOverrideIntoCmsfTracks(tracks: CmsfTrackJson[], override: Phase14CatalogOverride | null): CmsfTrackJson[];
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=phase14-catalog-override.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase14-catalog-override.d.ts","sourceRoot":"","sources":["../src/phase14-catalog-override.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE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C,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACrB,CAAC;AAMF;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAC1C,MAAM,EAAE,aAAa,EAAE,EACvB,QAAQ,EAAE,sBAAsB,GAAG,IAAI,GACrC,aAAa,EAAE,CAuGjB"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// src/phase14-catalog-override.ts
|
|
2
|
+
function getPhase14CatalogOverride() {
|
|
3
|
+
const g = globalThis;
|
|
4
|
+
const raw = g["__PHASE14_CATALOG_OVERRIDE"];
|
|
5
|
+
if (raw === void 0 || raw === null) return null;
|
|
6
|
+
if (typeof raw !== "object") {
|
|
7
|
+
console.warn("[phase14-catalog-override] hook is not an object; ignoring");
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const obj = raw;
|
|
11
|
+
const tracks = obj["tracks"];
|
|
12
|
+
if (!Array.isArray(tracks)) {
|
|
13
|
+
console.warn("[phase14-catalog-override] hook.tracks is not an array; ignoring");
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const filtered = [];
|
|
17
|
+
for (const t of tracks) {
|
|
18
|
+
if (typeof t === "object" && t !== null) {
|
|
19
|
+
const entry = t;
|
|
20
|
+
if (typeof entry["name"] === "string" && entry["name"].length > 0) {
|
|
21
|
+
filtered.push(entry);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (filtered.length === 0) return null;
|
|
26
|
+
return {
|
|
27
|
+
version: typeof obj["version"] === "string" ? obj["version"] : void 0,
|
|
28
|
+
streamingFormat: typeof obj["streamingFormat"] === "string" ? obj["streamingFormat"] : void 0,
|
|
29
|
+
tracks: filtered
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function mergeOverrideIntoHangRenditions(catalog, override) {
|
|
33
|
+
if (!override) return catalog;
|
|
34
|
+
for (const track of override.tracks) {
|
|
35
|
+
const role = track.role === "audio" || track.name.startsWith("audio") ? "audio" : "video";
|
|
36
|
+
const bagKey = role === "audio" ? "audio" : "video";
|
|
37
|
+
const bag = catalog[bagKey] ?? { renditions: {}, priority: 1 };
|
|
38
|
+
const existing = bag.renditions[track.name];
|
|
39
|
+
const merged = {
|
|
40
|
+
...existing ?? {},
|
|
41
|
+
container: existing?.container ?? { kind: "mmtp-fec" },
|
|
42
|
+
codec: existing?.codec ?? ""
|
|
43
|
+
};
|
|
44
|
+
if (existing?.framerate === void 0 && track.framerate !== void 0) {
|
|
45
|
+
merged["framerate"] = track.framerate;
|
|
46
|
+
}
|
|
47
|
+
if (existing?.fec === void 0 && track.fec !== void 0) {
|
|
48
|
+
merged["fec"] = track.fec;
|
|
49
|
+
}
|
|
50
|
+
bag.renditions[track.name] = merged;
|
|
51
|
+
catalog[bagKey] = bag;
|
|
52
|
+
}
|
|
53
|
+
return catalog;
|
|
54
|
+
}
|
|
55
|
+
function isPositiveInteger(value) {
|
|
56
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
57
|
+
}
|
|
58
|
+
function mergeOverrideIntoCmsfTracks(tracks, override) {
|
|
59
|
+
if (!override) return tracks;
|
|
60
|
+
const byName = /* @__PURE__ */ new Map();
|
|
61
|
+
for (const t of tracks) {
|
|
62
|
+
if (typeof t?.name === "string") byName.set(t.name, t);
|
|
63
|
+
}
|
|
64
|
+
const derivedPackaging = override.streamingFormat;
|
|
65
|
+
const existingVideoTrack = tracks.find(
|
|
66
|
+
(t) => t.role === "video" && typeof t.codec === "string" && t.codec.length > 0
|
|
67
|
+
);
|
|
68
|
+
const existingAudioTrack = tracks.find(
|
|
69
|
+
(t) => t.role === "audio" && typeof t.codec === "string" && t.codec.length > 0
|
|
70
|
+
);
|
|
71
|
+
for (const ot of override.tracks) {
|
|
72
|
+
const existing = byName.get(ot.name);
|
|
73
|
+
if (existing !== void 0) {
|
|
74
|
+
if (existing.fec === void 0 && ot.fec !== void 0) existing.fec = ot.fec;
|
|
75
|
+
if (existing.framerate === void 0 && ot.framerate !== void 0) {
|
|
76
|
+
existing.framerate = ot.framerate;
|
|
77
|
+
}
|
|
78
|
+
if (ot.role !== void 0 && existing.role === void 0) existing.role = ot.role;
|
|
79
|
+
if (existing.packaging === "mmtp") {
|
|
80
|
+
const mode = existing.mmtpMode ?? ot.mmtpMode;
|
|
81
|
+
if (mode !== "mpu" && mode !== "mfu") {
|
|
82
|
+
throw new Error(
|
|
83
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid mmtpMode`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
existing.mmtpMode = mode;
|
|
87
|
+
if (existing.timescale === void 0 && ot.timescale !== void 0) existing.timescale = ot.timescale;
|
|
88
|
+
if (existing.groupDurationMs === void 0 && ot.groupDurationMs !== void 0) {
|
|
89
|
+
existing.groupDurationMs = ot.groupDurationMs;
|
|
90
|
+
}
|
|
91
|
+
if (!isPositiveInteger(existing.timescale)) {
|
|
92
|
+
throw new Error(
|
|
93
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid timescale`
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (!isPositiveInteger(existing.groupDurationMs)) {
|
|
97
|
+
throw new Error(
|
|
98
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid groupDurationMs`
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
const packaging = ot.packaging ?? derivedPackaging;
|
|
104
|
+
if (typeof packaging !== "string" || packaging.length === 0) {
|
|
105
|
+
throw new Error(
|
|
106
|
+
`[phase14-catalog-override] track "${ot.name}" has no packaging \u2014 supply per-track or set top-level streamingFormat`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
const role = ot.role ?? (ot.name.endsWith("/repair") ? void 0 : "video");
|
|
110
|
+
const inheritedCodec = role === "audio" ? existingAudioTrack?.codec : existingVideoTrack?.codec;
|
|
111
|
+
const codec = ot.codec ?? inheritedCodec;
|
|
112
|
+
if (packaging !== "timeline" && (typeof codec !== "string" || codec.length === 0)) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
`[phase14-catalog-override] track "${ot.name}" has no codec (packaging='${packaging}') \u2014 supply per-track or ensure the publisher catalog has a ${role ?? "video"} track to inherit from`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
const mmtpMode = ot.mmtpMode;
|
|
118
|
+
if (packaging === "mmtp" && mmtpMode !== "mpu" && mmtpMode !== "mfu") {
|
|
119
|
+
throw new Error(
|
|
120
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid mmtpMode`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
if (packaging === "mmtp" && !isPositiveInteger(ot.timescale)) {
|
|
124
|
+
throw new Error(
|
|
125
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid timescale`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
if (packaging === "mmtp" && !isPositiveInteger(ot.groupDurationMs)) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
`[phase14-catalog-override] track "${ot.name}" has packaging='mmtp' but no valid groupDurationMs`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
const entry = {
|
|
134
|
+
name: ot.name,
|
|
135
|
+
packaging,
|
|
136
|
+
codec
|
|
137
|
+
};
|
|
138
|
+
if (mmtpMode !== void 0) entry.mmtpMode = mmtpMode;
|
|
139
|
+
if (ot.timescale !== void 0) entry.timescale = ot.timescale;
|
|
140
|
+
if (ot.groupDurationMs !== void 0) entry.groupDurationMs = ot.groupDurationMs;
|
|
141
|
+
if (role !== void 0) entry.role = role;
|
|
142
|
+
if (ot.framerate !== void 0) entry.framerate = ot.framerate;
|
|
143
|
+
if (ot.fec !== void 0) entry.fec = ot.fec;
|
|
144
|
+
tracks.push(entry);
|
|
145
|
+
byName.set(ot.name, entry);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return tracks;
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
getPhase14CatalogOverride,
|
|
152
|
+
mergeOverrideIntoCmsfTracks,
|
|
153
|
+
mergeOverrideIntoHangRenditions
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=phase14-catalog-override.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/phase14-catalog-override.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Phase 14 catalog-override hook (test harness only).\n *\n * When `globalThis.__PHASE14_CATALOG_OVERRIDE` is set (injected by the\n * 7point test via `page.addInitScript` \u2014 see\n * packages/moq-server/tests/7point-validation.test.mjs `applyPhase14CatalogOverride`)\n * the override's `tracks[]` are merged into whatever catalog the MoQ-delivered\n * JSON produced:\n *\n * - Dedupe by `track.name`.\n * - When both sides carry a track with the same name, the override's\n * `fec` config wins \u2014 this is how the 7point harness steers multi-track\n * tests onto the Phase 14 `video/base` + `video/delta` + `video/repair`\n * switching set without asking the publisher to change its catalog.\n * - Tracks present only in the override are appended as-is.\n * - Tracks present only in the MoQ catalog are preserved unchanged.\n *\n * This module is deliberately player-agnostic. It exposes:\n *\n * getPhase14CatalogOverride() \u2014 read + shape-check the global.\n * mergeOverrideIntoHangRenditions() \u2014 merge into a `@moq/hang`\n * Catalog.Root `video.renditions` /\n * `audio.renditions` dict. Used by\n * hang-mmt-fec/js/watch/src/broadcast.ts.\n * mergeOverrideIntoCmsfTracks() \u2014 merge into moqtail's CMSF-flat\n * `tracks[]` array. Used by\n * moqtail-private CMSFCatalog.from().\n *\n * Production builds never set the global, so all three helpers are no-ops at\n * runtime unless the test harness opts in.\n */\n\nimport type { FecAlgorithm, FecCatalogConfig } from \"./carp-catalog.js\";\n\n// ---------------------------------------------------------------------------\n// Override fixture shape (IETF draft-ietf-moq-catalogformat-01)\n// ---------------------------------------------------------------------------\n\n/**\n * A single override track entry \u2014 mirrors the fixture at\n * `packages/moq-server/tests/fixtures/multi-track-catalog.json`.\n *\n * Kept intentionally permissive: the canonical fixture carries `name`,\n * `altGroup`, `framerate`, and `fec`, but future 7point scenarios may extend\n * with additional hints without wanting this module to gate-keep them.\n */\nexport interface Phase14OverrideTrack {\n\tname: string;\n\t/** CMSF packaging kind. Optional per track \u2014 when absent, the merge\n\t * derives it from the override's top-level `streamingFormat`. */\n\tpackaging?: \"mmtp\" | \"cmaf\" | \"loc\" | \"timeline\";\n\t/** Required when packaging is `mmtp`; the current publisher emits MFU mode. */\n\tmmtpMode?: \"mpu\" | \"mfu\";\n\t/** Required when packaging is `mmtp`; copied into synthesized CMSF tracks. */\n\ttimescale?: number;\n\t/** Required when packaging is `mmtp`; copied into synthesized CMSF tracks. */\n\tgroupDurationMs?: number;\n\t/** Codec string. Optional per track \u2014 when absent, the merge inherits\n\t * from the existing video/audio rendition in the MoQ catalog (the\n\t * publisher's declaration). Throws only when neither the override nor\n\t * any existing rendition supplies one. */\n\tcodec?: string;\n\trole?: \"video\" | \"audio\" | \"timeline\";\n\taltGroup?: number;\n\tframerate?: number;\n\tfec?: Partial<FecCatalogConfig> & { algorithm: FecAlgorithm };\n}\n\n/**\n * The shape the 7point harness writes to `globalThis.__PHASE14_CATALOG_OVERRIDE`.\n * Extra top-level fields (`version`, `streamingFormat`, ...) are ignored \u2014\n * the merge only consumes `tracks[]`.\n */\nexport interface Phase14CatalogOverride {\n\tversion?: string;\n\tstreamingFormat?: string;\n\ttracks: Phase14OverrideTrack[];\n}\n\n// ---------------------------------------------------------------------------\n// Global reader\n// ---------------------------------------------------------------------------\n\n/**\n * Read `globalThis.__PHASE14_CATALOG_OVERRIDE` and return it only when it has\n * a well-formed `tracks[]` array. Malformed values log + return `null` rather\n * than throw so a broken fixture never kills the MoQ path for a real stream.\n */\nexport function getPhase14CatalogOverride(): Phase14CatalogOverride | null {\n\t// `globalThis` is defined in workers, service workers, and the main window;\n\t// it's the portable way to reach the test-injected hook from any context.\n\tconst g = globalThis as Record<string, unknown>;\n\tconst raw = g[\"__PHASE14_CATALOG_OVERRIDE\"];\n\tif (raw === undefined || raw === null) return null;\n\tif (typeof raw !== \"object\") {\n\t\tconsole.warn(\"[phase14-catalog-override] hook is not an object; ignoring\");\n\t\treturn null;\n\t}\n\tconst obj = raw as Record<string, unknown>;\n\tconst tracks = obj[\"tracks\"];\n\tif (!Array.isArray(tracks)) {\n\t\tconsole.warn(\"[phase14-catalog-override] hook.tracks is not an array; ignoring\");\n\t\treturn null;\n\t}\n\t// Shallow filter: keep only entries that at least have a string name.\n\t// Each consumer (hang or CMSF merge) validates shape further.\n\tconst filtered: Phase14OverrideTrack[] = [];\n\tfor (const t of tracks) {\n\t\tif (typeof t === \"object\" && t !== null) {\n\t\t\tconst entry = t as Record<string, unknown>;\n\t\t\tif (typeof entry[\"name\"] === \"string\" && (entry[\"name\"] as string).length > 0) {\n\t\t\t\tfiltered.push(entry as unknown as Phase14OverrideTrack);\n\t\t\t}\n\t\t}\n\t}\n\tif (filtered.length === 0) return null;\n\treturn {\n\t\tversion: typeof obj[\"version\"] === \"string\" ? (obj[\"version\"] as string) : undefined,\n\t\tstreamingFormat:\n\t\t\ttypeof obj[\"streamingFormat\"] === \"string\" ? (obj[\"streamingFormat\"] as string) : undefined,\n\t\ttracks: filtered,\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// Hang renditions merge (moq-lib / hang-mmt-fec)\n// ---------------------------------------------------------------------------\n\n/**\n * Merge override tracks into a `@moq/hang` Catalog.Root-like object. The\n * caller passes the already-parsed Catalog.Root (mutates in place and also\n * returns it for convenience). No-op when `override` is null.\n *\n * Dedupe rule: override wins for `fec` config and `framerate`. Everything\n * else (codec, container kind) is preserved from the MoQ-delivered rendition\n * when it exists, or synthesised from the override when it does not.\n *\n * Typed `any` here rather than narrow-matching `Catalog.Root` because the\n * upstream `@moq/hang` schema is branded (u53) and the container `kind` union\n * varies by version (`loc` kind appears in hang-mmt-fec's fork). Matching\n * that surface exactly would over-couple this module to a single upstream\n * revision; the runtime shape we rely on (`.video.renditions` dict mutation)\n * is stable.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mergeOverrideIntoHangRenditions<T extends Record<string, any>>(\n\tcatalog: T,\n\toverride: Phase14CatalogOverride | null,\n): T {\n\tif (!override) return catalog;\n\n\tfor (const track of override.tracks) {\n\t\t// Default role inference: names without an explicit role field are\n\t\t// treated as video unless the name suffix says audio.\n\t\tconst role: \"video\" | \"audio\" =\n\t\t\ttrack.role === \"audio\" || track.name.startsWith(\"audio\") ? \"audio\" : \"video\";\n\n\t\tconst bagKey = role === \"audio\" ? \"audio\" : \"video\";\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tconst bag: { renditions: Record<string, any>; priority?: number } =\n\t\t\tcatalog[bagKey] ?? { renditions: {}, priority: 1 };\n\t\tconst existing = bag.renditions[track.name];\n\n\t\t// Merge: override fills gaps, does NOT overwrite existing fec/framerate.\n\t\t// The publisher's real catalog is ground truth for wire parameters:\n\t\t// if the existing rendition already has a matching fec config, that's\n\t\t// what the publisher's packets actually carry. Overwriting it with a\n\t\t// fixture value (e.g. Phase 14 target K=768 when publisher emits K=4)\n\t\t// causes the FEC manager to wait for symbols that never arrive.\n\t\t// Only when the rendition is brand-new (no existing fec) do we seed\n\t\t// from the fixture.\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tconst merged: Record<string, any> = {\n\t\t\t...(existing ?? {}),\n\t\t\tcontainer: existing?.container ?? { kind: \"mmtp-fec\" },\n\t\t\tcodec: existing?.codec ?? \"\",\n\t\t};\n\t\tif (existing?.framerate === undefined && track.framerate !== undefined) {\n\t\t\tmerged[\"framerate\"] = track.framerate;\n\t\t}\n\t\tif (existing?.fec === undefined && track.fec !== undefined) {\n\t\t\tmerged[\"fec\"] = track.fec;\n\t\t}\n\n\t\tbag.renditions[track.name] = merged;\n\t\t// Reassign so a freshly-created bag is actually reachable on the\n\t\t// catalog when the MoQ side was missing video/audio entirely.\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t(catalog as any)[bagKey] = bag;\n\t}\n\treturn catalog;\n}\n\n// ---------------------------------------------------------------------------\n// CMSF tracks merge (moqtail-private)\n// ---------------------------------------------------------------------------\n\n/**\n * Shape-minimal description of a CMSF track input (pre-validation JSON, not\n * the parsed `CMSFTrack`). Keeps this module free of a hard dependency on\n * moqtail-ts.\n */\ntype CmsfTrackJson = {\n\tname: string;\n\tpackaging?: string;\n\tmmtpMode?: string;\n\ttimescale?: number;\n\tgroupDurationMs?: number;\n\trole?: string;\n\tcodec?: string;\n\tframerate?: number;\n\tfec?: unknown;\n\t[k: string]: unknown;\n};\n\nfunction isPositiveInteger(value: unknown): value is number {\n\treturn typeof value === \"number\" && Number.isInteger(value) && value > 0;\n}\n\n/**\n * Merge override tracks into a raw CMSF `tracks[]` JSON array (as produced\n * by `JSON.parse(catalog.json)` inside `CMSFCatalog.from`).\n *\n * Dedupe by `name`. For name collisions, publisher-emitted `fec` + `framerate`\n * are preserved (the publisher is ground truth for wire parameters). For new\n * track names, missing `packaging` is derived from the override's top-level\n * `streamingFormat`, and missing `codec` is inherited from any existing video\n * track in the catalog. Throws on bad init when neither source supplies them.\n */\nexport function mergeOverrideIntoCmsfTracks(\n\ttracks: CmsfTrackJson[],\n\toverride: Phase14CatalogOverride | null,\n): CmsfTrackJson[] {\n\tif (!override) return tracks;\n\n\tconst byName = new Map<string, CmsfTrackJson>();\n\tfor (const t of tracks) {\n\t\tif (typeof t?.name === \"string\") byName.set(t.name, t);\n\t}\n\n\t// Catalog-derived fallbacks (NOT magic numbers) \u2014 inherited from existing\n\t// publisher tracks. Used only when the override track doesn't carry them.\n\tconst derivedPackaging = override.streamingFormat;\n\tconst existingVideoTrack = tracks.find(\n\t\t(t) => t.role === \"video\" && typeof t.codec === \"string\" && (t.codec as string).length > 0,\n\t);\n\tconst existingAudioTrack = tracks.find(\n\t\t(t) => t.role === \"audio\" && typeof t.codec === \"string\" && (t.codec as string).length > 0,\n\t);\n\n\tfor (const ot of override.tracks) {\n\t\tconst existing = byName.get(ot.name);\n\t\tif (existing !== undefined) {\n\t\t\t// Preserve publisher-emitted fec + framerate \u2014 those describe what\n\t\t\t// is actually on the wire. Overwriting with fixture values causes\n\t\t\t// the player's FEC manager to wait for symbols that never arrive\n\t\t\t// when the fixture's K/P don't match the publisher's.\n\t\t\tif (existing.fec === undefined && ot.fec !== undefined) existing.fec = ot.fec;\n\t\t\tif (existing.framerate === undefined && ot.framerate !== undefined) {\n\t\t\t\texisting.framerate = ot.framerate;\n\t\t\t}\n\t\t\tif (ot.role !== undefined && existing.role === undefined) existing.role = ot.role;\n\t\t\tif (existing.packaging === \"mmtp\") {\n\t\t\t\tconst mode = existing.mmtpMode ?? ot.mmtpMode;\n\t\t\t\tif (mode !== \"mpu\" && mode !== \"mfu\") {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid mmtpMode`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\texisting.mmtpMode = mode;\n\t\t\t\tif (existing.timescale === undefined && ot.timescale !== undefined) existing.timescale = ot.timescale;\n\t\t\t\tif (existing.groupDurationMs === undefined && ot.groupDurationMs !== undefined) {\n\t\t\t\t\texisting.groupDurationMs = ot.groupDurationMs;\n\t\t\t\t}\n\t\t\t\tif (!isPositiveInteger(existing.timescale)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid timescale`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (!isPositiveInteger(existing.groupDurationMs)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid groupDurationMs`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst packaging = ot.packaging ?? derivedPackaging;\n\t\t\tif (typeof packaging !== \"string\" || packaging.length === 0) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has no packaging \u2014 supply per-track or set top-level streamingFormat`,\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Role inference: repair tracks (ending in /repair) stay role-less\n\t\t\t// per CMSF convention; others default to video.\n\t\t\tconst role = ot.role ?? (ot.name.endsWith(\"/repair\") ? undefined : \"video\");\n\t\t\tconst inheritedCodec =\n\t\t\t\trole === \"audio\" ? existingAudioTrack?.codec : existingVideoTrack?.codec;\n\t\t\tconst codec = ot.codec ?? inheritedCodec;\n\t\t\tif (packaging !== \"timeline\" && (typeof codec !== \"string\" || codec.length === 0)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has no codec (packaging='${packaging}') \u2014 supply per-track or ensure the publisher catalog has a ${role ?? \"video\"} track to inherit from`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst mmtpMode = ot.mmtpMode;\n\t\t\tif (packaging === \"mmtp\" && mmtpMode !== \"mpu\" && mmtpMode !== \"mfu\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid mmtpMode`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (packaging === \"mmtp\" && !isPositiveInteger(ot.timescale)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid timescale`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (packaging === \"mmtp\" && !isPositiveInteger(ot.groupDurationMs)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[phase14-catalog-override] track \"${ot.name}\" has packaging='mmtp' but no valid groupDurationMs`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst entry: CmsfTrackJson = {\n\t\t\t\tname: ot.name,\n\t\t\t\tpackaging,\n\t\t\t\tcodec: codec as string,\n\t\t\t};\n\t\t\tif (mmtpMode !== undefined) entry.mmtpMode = mmtpMode;\n\t\t\tif (ot.timescale !== undefined) entry.timescale = ot.timescale;\n\t\t\tif (ot.groupDurationMs !== undefined) entry.groupDurationMs = ot.groupDurationMs;\n\t\t\tif (role !== undefined) entry.role = role;\n\t\t\tif (ot.framerate !== undefined) entry.framerate = ot.framerate;\n\t\t\tif (ot.fec !== undefined) entry.fec = ot.fec;\n\t\t\ttracks.push(entry);\n\t\t\tbyName.set(ot.name, entry);\n\t\t}\n\t}\n\treturn tracks;\n}\n"],
|
|
5
|
+
"mappings": ";AAwFO,SAAS,4BAA2D;AAG1E,QAAM,IAAI;AACV,QAAM,MAAM,EAAE,4BAA4B;AAC1C,MAAI,QAAQ,UAAa,QAAQ,KAAM,QAAO;AAC9C,MAAI,OAAO,QAAQ,UAAU;AAC5B,YAAQ,KAAK,4DAA4D;AACzE,WAAO;AAAA,EACR;AACA,QAAM,MAAM;AACZ,QAAM,SAAS,IAAI,QAAQ;AAC3B,MAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;AAC3B,YAAQ,KAAK,kEAAkE;AAC/E,WAAO;AAAA,EACR;AAGA,QAAM,WAAmC,CAAC;AAC1C,aAAW,KAAK,QAAQ;AACvB,QAAI,OAAO,MAAM,YAAY,MAAM,MAAM;AACxC,YAAM,QAAQ;AACd,UAAI,OAAO,MAAM,MAAM,MAAM,YAAa,MAAM,MAAM,EAAa,SAAS,GAAG;AAC9E,iBAAS,KAAK,KAAwC;AAAA,MACvD;AAAA,IACD;AAAA,EACD;AACA,MAAI,SAAS,WAAW,EAAG,QAAO;AAClC,SAAO;AAAA,IACN,SAAS,OAAO,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;AAAA,EACD;AACA,SAAO;AACR;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D-28 shared repair-fetch scheduler.
|
|
3
|
+
*
|
|
4
|
+
* Player-agnostic orchestration for per-SBN on-demand MoQ FEC repair
|
|
5
|
+
* backfill. Each player (moqtail client, hang watch, Shaka MSF bridge)
|
|
6
|
+
* supplies only its protocol verb via {@link RepairFetchTransport}:
|
|
7
|
+
*
|
|
8
|
+
* - moqtail: standalone FETCH (FetchType.Standalone) for group [sbn, sbn+1)
|
|
9
|
+
* - moq-lite/hang: Subscribe with startGroup=sbn, endGroup=sbn (the relay
|
|
10
|
+
* propagates startGroup upstream to pull the past group from the origin's
|
|
11
|
+
* producer cache)
|
|
12
|
+
*
|
|
13
|
+
* Everything else — registration, fire-time repair-track resolution,
|
|
14
|
+
* keyframe-first admission, preemption, feeding symbols, and in-flight slot
|
|
15
|
+
* release — is identical across players and lives here. The Player owns the
|
|
16
|
+
* scheduler: one per `wireRepairFetch` call, and its disposer aborts
|
|
17
|
+
* everything.
|
|
18
|
+
*
|
|
19
|
+
* Priority (from the block's class, see `repairPriorityForClass`):
|
|
20
|
+
* - P0 (keyframe / unknown) and P1 (audio) dispatch as soon as they are
|
|
21
|
+
* enqueued, with no cap. Each has its own fail deadline, and a cap would
|
|
22
|
+
* turn a recoverable protected block into a stall; their number is
|
|
23
|
+
* already bounded by the blocks one fail window can hold.
|
|
24
|
+
* - P2 (delta) dispatches only while no P0/P1 is queued or in flight,
|
|
25
|
+
* earliest absolute fail deadline first. Enqueuing a P0/P1 aborts every
|
|
26
|
+
* in-flight P2 (`repair-preempted`), which returns to the queue while its
|
|
27
|
+
* block is unresolved. A P2 that never ran before its block resolved is
|
|
28
|
+
* reported as `repair-deferred`.
|
|
29
|
+
* - A block reclassified to a higher class while its P2 fetch is in flight
|
|
30
|
+
* is re-issued at once under the new class's wire priority: the running
|
|
31
|
+
* FETCH is aborted (FETCH_CANCEL) and a new one sent.
|
|
32
|
+
*
|
|
33
|
+
* Wire priority (draft-ramadan-moq-fec §11.4.5): every request carries the
|
|
34
|
+
* MoQ Transport SUBSCRIBER_PRIORITY its FETCH must use, derived from the two
|
|
35
|
+
* catalog priorities `ResolveRepairTarget` returns (see
|
|
36
|
+
* `repairFetchSubscriberPriority`): a keyframe-bearing (or unknown) block's
|
|
37
|
+
* FETCH is sent in the Source Media range at no more than the source
|
|
38
|
+
* track's priority, so it is delivered ahead of every repair track and not
|
|
39
|
+
* shed with repair data; a delta or audio FETCH is sent at no less than the
|
|
40
|
+
* fetched repair track's priority, so it is shed first.
|
|
41
|
+
*
|
|
42
|
+
* Deadline and admission (BLO-35597): a repair FETCH rides the reliable path,
|
|
43
|
+
* so its deadline is the block's PRESENTATION deadline, not the multicast
|
|
44
|
+
* reassembly deadline. The player states how long after a block's first
|
|
45
|
+
* symbol its media can still be presented (`presentationDelayMs`); from the
|
|
46
|
+
* block's receiver-local anchor that gives an absolute deadline, never earlier
|
|
47
|
+
* than the multicast wait and never later than the release gate's hold ceiling
|
|
48
|
+
* (`terminalRetentionMsForPacket`), which bounds how long any successor frame
|
|
49
|
+
* may wait behind the block. A FETCH is sent only when the measured
|
|
50
|
+
* reliable-path RTT (`reliableRttMs`) is less than the time left to that
|
|
51
|
+
* deadline -- a request that cannot come back in time is never sent, rather
|
|
52
|
+
* than sent and cancelled -- and an admitted FETCH holds the block open to
|
|
53
|
+
* that deadline, so the multicast span elapsing never aborts it.
|
|
54
|
+
*
|
|
55
|
+
* The scheduler arms no timers. A fetch ends when its transport completes or
|
|
56
|
+
* throws, when it is preempted, when any later scheduling event finds it past
|
|
57
|
+
* its presentation deadline, when its block resolves (recovered, or failed at
|
|
58
|
+
* that deadline), on track reset, or on dispose.
|
|
59
|
+
*/
|
|
60
|
+
import type { FecBlockProfile } from '@blockcast/mmt-base';
|
|
61
|
+
import { type BlockClass } from './block-policy.js';
|
|
62
|
+
import type { RepairLifecycleObserver } from './multicast-manager.js';
|
|
63
|
+
/**
|
|
64
|
+
* The highest value in the Source Media priority range of
|
|
65
|
+
* draft-ramadan-moq-fec §10 (64..191): one below the repair range, which
|
|
66
|
+
* starts at `REPAIR_PRIORITY_MIN` (192).
|
|
67
|
+
*/
|
|
68
|
+
export declare const SOURCE_MEDIA_PRIORITY_MAX: number;
|
|
69
|
+
/** What `ResolveRepairTarget` returns for one repair-bearing stream. */
|
|
70
|
+
export interface RepairTarget {
|
|
71
|
+
/** The repair track to FETCH (base layer 0 of the block's source). */
|
|
72
|
+
readonly repairTrack: string;
|
|
73
|
+
/**
|
|
74
|
+
* The catalog `priority` of the SOURCE track the block belongs to, on the
|
|
75
|
+
* MoQ Transport scale (0..255, lower first), or null when the catalog
|
|
76
|
+
* carries none. Never a player constant: a keyframe repair must not be
|
|
77
|
+
* delivered behind the source it repairs, and only the catalog says what
|
|
78
|
+
* that source's priority is.
|
|
79
|
+
*/
|
|
80
|
+
readonly sourcePriority: number | null;
|
|
81
|
+
/**
|
|
82
|
+
* The catalog priority of `repairTrack` (MoQ Transport scale). Layer 0
|
|
83
|
+
* that declares none has the value draft-ramadan-moq-fec §10 defines
|
|
84
|
+
* (240); `resolveRepairLayers` / `catalogRepairTarget` already apply it.
|
|
85
|
+
* Null only when the resolver cannot read the repair track's entry.
|
|
86
|
+
*/
|
|
87
|
+
readonly repairPriority: number | null;
|
|
88
|
+
}
|
|
89
|
+
/** Resolve a packetId to its repair track and priorities at FIRE TIME.
|
|
90
|
+
*
|
|
91
|
+
* Called on every repair request, never cached by the shell: ABR ladder
|
|
92
|
+
* rungs can share a packetId (e.g. video/720p and video/360p both p:1), so
|
|
93
|
+
* the mapping must reflect the track active when the request fires, not
|
|
94
|
+
* when the shell was wired. Return null when the packetId has no
|
|
95
|
+
* repair-bearing track — the request is released without a fetch.
|
|
96
|
+
* `catalogRepairTarget` builds the answer from a catalog. */
|
|
97
|
+
export type ResolveRepairTarget = (packetId: number, catalogTrackName?: string) => RepairTarget | null;
|
|
98
|
+
/** One on-demand repair FETCH, as the scheduler hands it to the transport. */
|
|
99
|
+
export interface RepairFetchRequest {
|
|
100
|
+
/** Repair track whose block `sbn` is fetched. */
|
|
101
|
+
readonly repairTrack: string;
|
|
102
|
+
/**
|
|
103
|
+
* The block's key, by `blockProfile` (BLO-35597 D2a):
|
|
104
|
+
* - `k-padded-v1`: the source block number, which IS the repair-track MoQ
|
|
105
|
+
* group id (fetch `[sbn, sbn]`).
|
|
106
|
+
* - `iso-ssbg1-v1`: the block's 32-bit SS_Start. The MoQ group id is the
|
|
107
|
+
* 62-bit `extSsStart(wrapEpoch, sbn)`; a receiver that knows only a lost
|
|
108
|
+
* SS_ID fetches `repairFetchRange(lostSsId, kMax, anchor)`, where `anchor`
|
|
109
|
+
* is `{ previousBlockStart }` (the extended start of the last block
|
|
110
|
+
* delimited before it) or `{ reference }` (an epoch reference). Never use
|
|
111
|
+
* it as a group id directly.
|
|
112
|
+
*/
|
|
113
|
+
readonly sbn: number;
|
|
114
|
+
/** The block profile `sbn` is keyed by (the catalog `fec.blockProfile`). */
|
|
115
|
+
readonly blockProfile: FecBlockProfile;
|
|
116
|
+
/** The source packetId the block belongs to. */
|
|
117
|
+
readonly packetId: number;
|
|
118
|
+
/**
|
|
119
|
+
* Aborts when the scheduler no longer wants the group: preemption by
|
|
120
|
+
* keyframe work, reprioritisation, block resolution, track reset, dispose.
|
|
121
|
+
*/
|
|
122
|
+
readonly signal: AbortSignal;
|
|
123
|
+
/**
|
|
124
|
+
* The SUBSCRIBER_PRIORITY parameter the FETCH MUST carry, on the MoQ
|
|
125
|
+
* Transport scale (0..255, lower delivered first), as
|
|
126
|
+
* draft-ramadan-moq-fec §11.4.5 requires. `undefined` means OMIT the
|
|
127
|
+
* parameter: the catalog carries no priority to derive it from, and the
|
|
128
|
+
* publisher then uses the value draft-ietf-moq-transport-16 §9.2.2.3
|
|
129
|
+
* defines for an omitted parameter (128, inside the Source Media range).
|
|
130
|
+
* A transport never substitutes a value of its own. A transport whose API
|
|
131
|
+
* uses another scale (moq-lite's higher-wins weight, say) maps this one
|
|
132
|
+
* without reordering it against the source and repair subscriptions.
|
|
133
|
+
*/
|
|
134
|
+
readonly subscriberPriority: number | undefined;
|
|
135
|
+
}
|
|
136
|
+
/** Protocol-specific fetch of one FEC block's repair group.
|
|
137
|
+
*
|
|
138
|
+
* Yield each repair object payload (MMTP packet bytes, ISO 23008-1 §C.5.3
|
|
139
|
+
* Repair FEC Payload ID framing). Return when the group ends.
|
|
140
|
+
*
|
|
141
|
+
* Put `request.subscriberPriority` on the FETCH (see RepairFetchRequest).
|
|
142
|
+
*
|
|
143
|
+
* When `request.signal` aborts, the transport MUST cancel the FETCH ON THE
|
|
144
|
+
* WIRE, not merely stop reading: send FETCH_CANCEL for its Request ID
|
|
145
|
+
* (draft-ietf-moq-transport-16 §9.18; STOP_SENDING on an open data stream
|
|
146
|
+
* as well, §5.2), and do it from the abort handler itself, before it
|
|
147
|
+
* returns. A relay that is never told keeps sending the group, so a
|
|
148
|
+
* preempted delta repair keeps competing with the keyframe repair that
|
|
149
|
+
* preempted it. The scheduler may issue the next request for the same block
|
|
150
|
+
* (reprioritisation) as soon as it aborts one, and §11.4.5 allows at most
|
|
151
|
+
* one repair FETCH outstanding per block and repair layer, so the cancel
|
|
152
|
+
* must already be queued ahead of that request. A FETCH whose Request ID
|
|
153
|
+
* is not known yet is cancelled as soon as FETCH_OK assigns it. */
|
|
154
|
+
export type RepairFetchTransport = (request: RepairFetchRequest) => AsyncIterable<Uint8Array>;
|
|
155
|
+
/** Why a request could not carry a catalog-derived priority. */
|
|
156
|
+
export type RepairPriorityReason = 'source-priority-absent' | 'source-priority-invalid' | 'repair-priority-absent' | 'repair-priority-invalid';
|
|
157
|
+
/**
|
|
158
|
+
* The wire priority of one repair request (draft-ramadan-moq-fec §11.4.5).
|
|
159
|
+
*
|
|
160
|
+
* - `carry`: send the FETCH with `subscriberPriority`.
|
|
161
|
+
* - `omit`: send it without SUBSCRIBER_PRIORITY. Only a keyframe-bearing or
|
|
162
|
+
* unknown block's request is ever sent this way: the publisher then uses
|
|
163
|
+
* 128 (draft-ietf-moq-transport-16 §9.2.2.3), which lies in the Source
|
|
164
|
+
* Media range, and without a catalog source priority there is no bound
|
|
165
|
+
* below it to honour.
|
|
166
|
+
* - `decline`: send no FETCH. A delta or audio FETCH MUST carry a priority
|
|
167
|
+
* at least its repair track's, so at least 192, and the omitted value (128)
|
|
168
|
+
* would put best-effort repair ahead of every repair track. Unicast repair
|
|
169
|
+
* is optional for those classes (§11.4.3, §11.4.4); in-band FEC and
|
|
170
|
+
* concealment still apply.
|
|
171
|
+
*/
|
|
172
|
+
export type RepairFetchPriority = {
|
|
173
|
+
readonly kind: 'carry';
|
|
174
|
+
readonly subscriberPriority: number;
|
|
175
|
+
} | {
|
|
176
|
+
readonly kind: 'omit';
|
|
177
|
+
readonly reason: RepairPriorityReason;
|
|
178
|
+
} | {
|
|
179
|
+
readonly kind: 'decline';
|
|
180
|
+
readonly reason: RepairPriorityReason;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Derive the SUBSCRIBER_PRIORITY of a repair FETCH from the block's class and
|
|
184
|
+
* the catalog priorities of its source and repair tracks
|
|
185
|
+
* (draft-ramadan-moq-fec §11.4.5 and the §10 ranges):
|
|
186
|
+
*
|
|
187
|
+
* - keyframe / unknown: in the Source Media range and no greater than the
|
|
188
|
+
* source track's priority, i.e. min(source, 191); omitted when the catalog
|
|
189
|
+
* carries no source priority.
|
|
190
|
+
* - delta / audio: no lower than the fetched repair track's priority and at
|
|
191
|
+
* least 192, i.e. max(repair, 192); declined when it carries none.
|
|
192
|
+
*/
|
|
193
|
+
export declare function repairFetchSubscriberPriority(blockClass: BlockClass, target: Pick<RepairTarget, 'sourcePriority' | 'repairPriority'>): RepairFetchPriority;
|
|
194
|
+
export interface WireRepairFetchOptions {
|
|
195
|
+
resolveTarget: ResolveRepairTarget;
|
|
196
|
+
transport: RepairFetchTransport;
|
|
197
|
+
/**
|
|
198
|
+
* Maximum transport attempts per block (required). A retry happens only
|
|
199
|
+
* when the transport rejects with an error `shouldRetry` classifies as
|
|
200
|
+
* retryable, before any symbol was fed, while the block's deadline remains.
|
|
201
|
+
*/
|
|
202
|
+
attemptLimit: number;
|
|
203
|
+
/** Classify a transport error as a transient publisher/relay retention race. */
|
|
204
|
+
shouldRetry?: (error: unknown) => boolean;
|
|
205
|
+
/**
|
|
206
|
+
* The measured round-trip time of the reliable path the transport fetches
|
|
207
|
+
* over, in ms (required). Read at every admission, so it tracks the live
|
|
208
|
+
* session. A value that is not finite and positive, or a throw, means the
|
|
209
|
+
* path offers no measurement: nothing can show the FETCH would come back in
|
|
210
|
+
* time, so none is sent (`rtt-unmeasured`). Never a default.
|
|
211
|
+
*/
|
|
212
|
+
reliableRttMs: () => number;
|
|
213
|
+
/**
|
|
214
|
+
* How long after a block's first symbol arrived its media can still be
|
|
215
|
+
* presented, in ms (required): the player's own playout budget for the
|
|
216
|
+
* stream. Same fail-closed rule as `reliableRttMs`
|
|
217
|
+
* (`presentation-delay-unavailable`).
|
|
218
|
+
*/
|
|
219
|
+
presentationDelayMs: (packetId: number, catalogTrackName?: string) => number;
|
|
220
|
+
}
|
|
221
|
+
/** Why the D-28 layer asked for a repair: the block's class at its deadline. */
|
|
222
|
+
export type RepairSubscribeCallback = (sbn: number, packetId: number, catalogTrackName: string | undefined, blockClass: BlockClass) => void;
|
|
223
|
+
/** Why the scheduler sent no FETCH for a block it was asked to repair. */
|
|
224
|
+
export type RepairSkipReason =
|
|
225
|
+
/** The reliable path offered no RTT measurement; arrival cannot be shown. */
|
|
226
|
+
'rtt-unmeasured'
|
|
227
|
+
/** The measured RTT is not less than the time left to the deadline. */
|
|
228
|
+
| 'rtt-exceeds-budget'
|
|
229
|
+
/** The player gave no usable presentation delay for the block's stream. */
|
|
230
|
+
| 'presentation-delay-unavailable';
|
|
231
|
+
/** The subset of MulticastManager the scheduler drives. */
|
|
232
|
+
export interface RepairFetchHost {
|
|
233
|
+
readonly fecManager: {
|
|
234
|
+
blockProfileForPacket(packetId: number): FecBlockProfile | undefined;
|
|
235
|
+
repairFetchTimeoutMsForBlock(sbn: number, packetId: number, catalogTrackName?: string): number;
|
|
236
|
+
/** Receiver-local time of the block's first accepted symbol, if any. */
|
|
237
|
+
blockAnchorAtMs(sbn: number, packetId: number, catalogTrackName?: string): number | undefined;
|
|
238
|
+
/** How long a terminal block stays authoritative: the release-gate hold ceiling. */
|
|
239
|
+
terminalRetentionMsForPacket(packetId: number): number;
|
|
240
|
+
/** Keep the block open to `untilAtMs` for an admitted FETCH. */
|
|
241
|
+
holdBlockForRepair(sbn: number, packetId: number, catalogTrackName: string | undefined, untilAtMs: number): boolean;
|
|
242
|
+
/** The admitted FETCH ended without delivering: back to the multicast wait. */
|
|
243
|
+
releaseRepairHold(sbn: number, packetId: number, catalogTrackName?: string): void;
|
|
244
|
+
};
|
|
245
|
+
onRepairSubscribe(cb: RepairSubscribeCallback): void;
|
|
246
|
+
addRepairLifecycleObserver(observer: RepairLifecycleObserver): () => void;
|
|
247
|
+
addTrackResetObserver(observer: (packetId: number, catalogTrackName: string) => void): () => void;
|
|
248
|
+
clearRepairForBlock(sbn: number, packetId: number, catalogTrackName?: string): void;
|
|
249
|
+
processRepairFromMoQ(packet: Uint8Array, ownerPacketId?: number, catalogTrackName?: string): void;
|
|
250
|
+
noteRepairScheduling(type: 'repair-preempted' | 'repair-deferred', sbn: number, packetId: number, catalogTrackName?: string): void;
|
|
251
|
+
/** A request whose wire priority the catalog could not supply. */
|
|
252
|
+
noteRepairPriority(action: 'omitted' | 'declined', reason: RepairPriorityReason, blockClass: BlockClass, sbn: number, packetId: number, catalogTrackName?: string): void;
|
|
253
|
+
/** A request the scheduler did not send (see RepairSkipReason). */
|
|
254
|
+
noteRepairSkipped(reason: RepairSkipReason, measurement: {
|
|
255
|
+
readonly rttMs: number | null;
|
|
256
|
+
readonly budgetMs: number;
|
|
257
|
+
}, sbn: number, packetId: number, catalogTrackName?: string): void;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Wire the D-28 repair-fetch scheduler onto a MulticastManager.
|
|
261
|
+
*
|
|
262
|
+
* Call AFTER the manager has a repair-bearing FEC configuration (players gate
|
|
263
|
+
* this on the first fec-setup that carries a repairTrack) — registration arms
|
|
264
|
+
* the per-block repair deadlines in the FEC layer.
|
|
265
|
+
*
|
|
266
|
+
* Returns a dispose function that aborts outstanding fetches and stops new
|
|
267
|
+
* ones from being issued.
|
|
268
|
+
*/
|
|
269
|
+
export declare function wireRepairFetch(mc: RepairFetchHost, opts: WireRepairFetchOptions): () => void;
|
|
270
|
+
//# sourceMappingURL=repair-fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repair-fetch.d.ts","sourceRoot":"","sources":["../src/repair-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAA0B,KAAK,UAAU,EAAuB,MAAM,mBAAmB,CAAA;AAChG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAMrE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,QAA0B,CAAA;AAEhE,wEAAwE;AACxE,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CACvC;AAED;;;;;;;8DAO8D;AAC9D,MAAM,MAAM,mBAAmB,GAAG,CAChC,QAAQ,EAAE,MAAM,EAChB,gBAAgB,CAAC,EAAE,MA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