@blockcast/mmt-container 0.1.0-main.0399efef1f07
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 +432 -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 +93 -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/browser-runtime.js +20087 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +318 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +873 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +202 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +568 -0
- package/dist/catalog-fec-params.js.map +7 -0
- package/dist/catalog-network-source.d.ts +19 -0
- package/dist/catalog-network-source.d.ts.map +1 -0
- package/dist/catalog-network-source.js +22 -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 +217 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1769 -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 +195 -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 +207 -0
- package/dist/cmcd-producer.js.map +7 -0
- package/dist/codec-utils.d.ts +248 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1268 -0
- package/dist/codec-utils.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 +307 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +1530 -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 +75 -0
- package/dist/fec-starvation-detector.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +88 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +614 -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 +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +380 -0
- package/dist/index.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 +618 -0
- package/dist/iso-bmff-timing.js.map +7 -0
- package/dist/loc.d.ts +68 -0
- package/dist/loc.d.ts.map +1 -0
- package/dist/loc.js +143 -0
- package/dist/loc.js.map +7 -0
- 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 +1285 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +251 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +624 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +396 -0
- package/dist/mfu-reassembler.d.ts.map +1 -0
- package/dist/mfu-reassembler.js +3085 -0
- package/dist/mfu-reassembler.js.map +7 -0
- 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 +434 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +6164 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +8999 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +132 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +6413 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +390 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +9242 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +181 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +802 -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 +107 -0
- package/dist/multicast-input.d.ts.map +1 -0
- package/dist/multicast-input.js +256 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +369 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +13400 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +61 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +1665 -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 +384 -0
- package/dist/multicast-unwrap.js.map +7 -0
- package/dist/no-modules.d.ts +9 -0
- package/dist/no-modules.d.ts.map +1 -0
- package/dist/no-modules.js +8965 -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 +58 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +127 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/repair-layers.d.ts +141 -0
- package/dist/repair-layers.d.ts.map +1 -0
- package/dist/repair-layers.js +303 -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 +616 -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 +232 -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 +1238 -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 +85 -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 +456 -0
- package/dist/timestamp-codec.js.map +7 -0
- package/dist/track-pipeline-setup.d.ts +72 -0
- package/dist/track-pipeline-setup.d.ts.map +1 -0
- package/dist/track-pipeline-setup.js +306 -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 +229 -0
- package/dist/track-pipeline.js.map +7 -0
- package/dist/track-session.d.ts +398 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +767 -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 +88 -0
- package/dist/transport-pool.js.map +7 -0
- package/dist/wasm-mfu-reassembler.d.ts +92 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +2139 -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 +6418 -0
- package/dist/wasm-mmtp-container-parser.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/README.md +213 -0
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +87 -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 +279 -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 +252 -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 +565 -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 +349 -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 +179 -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 +47 -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/fec-worker-client.ts +319 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +268 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1048 -0
- package/node_modules/@blockcast/fec-worker/src/index.ts +32 -0
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +558 -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 +194 -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 +120 -0
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +2 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js +2 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +276 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +645 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-base/src/index.ts +1 -0
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +899 -0
- package/node_modules/@blockcast/mmt-fec/README.md +270 -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 +72 -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 +192 -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 +185 -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 +273 -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 +22 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js +22 -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 +172 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +254 -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/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 +120 -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/index.d.ts +2 -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 +2 -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 +276 -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 +645 -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/package.json +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +899 -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 +277 -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 +332 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +77 -0
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +317 -0
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -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 +203 -0
- package/schemas/catalog.schema.json +360 -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/carp-catalog.ts +845 -0
- package/src/catalog-fec-params.ts +535 -0
- package/src/catalog-network-source.ts +49 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1167 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +334 -0
- package/src/codec-utils.ts +1611 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +2081 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-worker-setup.ts +213 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +486 -0
- package/src/iso-bmff-timing.ts +813 -0
- package/src/loc.ts +181 -0
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +795 -0
- package/src/mfu-reassembler.ts +3741 -0
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +1836 -0
- package/src/mmtp-decode-pipeline.ts +389 -0
- package/src/mmtp-router.ts +3136 -0
- package/src/mmtp-to-cmaf.ts +1024 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +439 -0
- package/src/multicast-manager.ts +1720 -0
- package/src/multicast-transport.ts +321 -0
- package/src/multicast-unwrap.ts +132 -0
- package/src/no-modules.ts +20 -0
- package/src/phase14-catalog-override.ts +336 -0
- package/src/repair-fetch.ts +238 -0
- package/src/repair-layers.ts +490 -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 +189 -0
- package/src/track-pipeline.ts +332 -0
- package/src/track-session.ts +994 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +389 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +40 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +27 -0
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +32 -0
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +30 -0
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +31 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +33 -0
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +23 -0
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +32 -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/network-source-object.json +25 -0
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +23 -0
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +26 -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/fec-layered-repair.json +104 -0
- package/test-vectors/catalog/positive/fec-multicast.json +51 -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/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 +148 -0
- package/test-vectors/catalog-validator-public-api.mjs +25 -0
- package/test-vectors/generate-source-auth-fixture.mjs +114 -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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
// src/multicast-input.ts
|
|
2
|
+
var MulticastInputError = class extends Error {
|
|
3
|
+
constructor(kind, endpointIndex, message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.kind = kind;
|
|
6
|
+
this.endpointIndex = endpointIndex;
|
|
7
|
+
this.name = "MulticastInputError";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function multicastFromConfig(input) {
|
|
11
|
+
if (input.endpoints.length === 0) {
|
|
12
|
+
throw new MulticastInputError(
|
|
13
|
+
"empty_endpoints",
|
|
14
|
+
null,
|
|
15
|
+
"endpoints[] must be non-empty \u2014 a multicast field with zero endpoints declares nothing"
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
if (input.version !== void 0 && (!Number.isInteger(input.version) || input.version < 0)) {
|
|
19
|
+
throw new MulticastInputError("invalid_version", null, `version must be a non-negative integer; got ${input.version}`);
|
|
20
|
+
}
|
|
21
|
+
if (input.validUntil !== void 0) {
|
|
22
|
+
if (!Number.isFinite(input.validUntil) || input.validUntil <= 0) {
|
|
23
|
+
throw new MulticastInputError(
|
|
24
|
+
"invalid_valid_until",
|
|
25
|
+
null,
|
|
26
|
+
`validUntil must be a positive unix-ms timestamp; got ${input.validUntil}`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const seenTuples = /* @__PURE__ */ new Set();
|
|
31
|
+
const endpoints = input.endpoints.map((ep, idx) => validateEndpoint(ep, idx, seenTuples));
|
|
32
|
+
const out = { endpoints };
|
|
33
|
+
if (input.enabled !== void 0) out.enabled = input.enabled;
|
|
34
|
+
if (input.amtFallback !== void 0) out.amtFallback = { ...input.amtFallback };
|
|
35
|
+
if (input.version !== void 0) out.version = input.version;
|
|
36
|
+
if (input.validUntil !== void 0) out.validUntil = input.validUntil;
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
function validateEndpoint(ep, idx, seenTuples) {
|
|
40
|
+
if (ep.protocol === "ssm" && (!ep.sourceAddress || ep.sourceAddress.length === 0)) {
|
|
41
|
+
throw new MulticastInputError(
|
|
42
|
+
"ssm_requires_source",
|
|
43
|
+
idx,
|
|
44
|
+
`endpoint[${idx}] protocol=ssm requires sourceAddress`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
if (ep.protocol === "amt" && (!ep.relayAddress || ep.relayAddress.length === 0)) {
|
|
48
|
+
throw new MulticastInputError(
|
|
49
|
+
"amt_requires_relay",
|
|
50
|
+
idx,
|
|
51
|
+
`endpoint[${idx}] protocol=amt requires relayAddress`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
if (!isMulticastGroupAddress(ep.groupAddress)) {
|
|
55
|
+
throw new MulticastInputError(
|
|
56
|
+
"invalid_group_address",
|
|
57
|
+
idx,
|
|
58
|
+
`endpoint[${idx}] groupAddress "${ep.groupAddress}" is not a valid multicast address`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (ep.protocol === "ssm" && !isSsmGroupAddress(ep.groupAddress)) {
|
|
62
|
+
throw new MulticastInputError(
|
|
63
|
+
"ssm_group_out_of_range",
|
|
64
|
+
idx,
|
|
65
|
+
`endpoint[${idx}] protocol=ssm requires groupAddress in 232.0.0.0/8 (IPv4) or ff3x::/32 (IPv6); got "${ep.groupAddress}"`
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
if (!Number.isInteger(ep.port) || ep.port < 1 || ep.port > 65535) {
|
|
69
|
+
throw new MulticastInputError("invalid_port", idx, `endpoint[${idx}] port must be 1..65535; got ${ep.port}`);
|
|
70
|
+
}
|
|
71
|
+
if (ep.tracks.length === 0) {
|
|
72
|
+
throw new MulticastInputError("empty_tracks", idx, `endpoint[${idx}] tracks must be non-empty`);
|
|
73
|
+
}
|
|
74
|
+
const seenPids = /* @__PURE__ */ new Set();
|
|
75
|
+
for (const t of ep.tracks) {
|
|
76
|
+
if (typeof t.name !== "string" || t.name.length === 0) {
|
|
77
|
+
throw new MulticastInputError(
|
|
78
|
+
"invalid_track_name",
|
|
79
|
+
idx,
|
|
80
|
+
`endpoint[${idx}] track name must be a non-empty string`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
if (!Number.isInteger(t.packetId) || t.packetId < 0 || t.packetId > 65535) {
|
|
84
|
+
throw new MulticastInputError(
|
|
85
|
+
"invalid_packet_id",
|
|
86
|
+
idx,
|
|
87
|
+
`endpoint[${idx}] track "${t.name}" packetId must be 0..65535; got ${t.packetId}`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
if (seenPids.has(t.packetId)) {
|
|
91
|
+
throw new MulticastInputError(
|
|
92
|
+
"duplicate_packet_id",
|
|
93
|
+
idx,
|
|
94
|
+
`endpoint[${idx}] duplicate packetId ${t.packetId}`
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
seenPids.add(t.packetId);
|
|
98
|
+
}
|
|
99
|
+
if (ep.bandwidth !== void 0 && (!Number.isFinite(ep.bandwidth) || ep.bandwidth <= 0)) {
|
|
100
|
+
throw new MulticastInputError(
|
|
101
|
+
"invalid_bandwidth",
|
|
102
|
+
idx,
|
|
103
|
+
`endpoint[${idx}] bandwidth must be positive; got ${ep.bandwidth}`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
const tupleKey = `${ep.sourceAddress ?? ""}|${ep.groupAddress}|${ep.port}`;
|
|
107
|
+
if (seenTuples.has(tupleKey)) {
|
|
108
|
+
throw new MulticastInputError(
|
|
109
|
+
"duplicate_endpoint_tuple",
|
|
110
|
+
idx,
|
|
111
|
+
`endpoint[${idx}] duplicates (sourceAddress, groupAddress, port) tuple "${tupleKey}"`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
seenTuples.add(tupleKey);
|
|
115
|
+
const out = {
|
|
116
|
+
protocol: ep.protocol,
|
|
117
|
+
groupAddress: ep.groupAddress,
|
|
118
|
+
port: ep.port,
|
|
119
|
+
tracks: ep.tracks.map((t) => ({ name: t.name, packetId: t.packetId }))
|
|
120
|
+
};
|
|
121
|
+
if (ep.sourceAddress !== void 0) out.sourceAddress = ep.sourceAddress;
|
|
122
|
+
if (ep.relayAddress !== void 0) out.relayAddress = ep.relayAddress;
|
|
123
|
+
if (ep.bandwidth !== void 0) out.bandwidth = ep.bandwidth;
|
|
124
|
+
return out;
|
|
125
|
+
}
|
|
126
|
+
function isMulticastGroupAddress(addr) {
|
|
127
|
+
if (addr.includes(":")) {
|
|
128
|
+
return /^ff[0-9a-f]{2}:/i.test(addr);
|
|
129
|
+
}
|
|
130
|
+
const m = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(addr);
|
|
131
|
+
if (!m) return false;
|
|
132
|
+
for (let i = 1; i <= 4; i++) {
|
|
133
|
+
const v = Number(m[i]);
|
|
134
|
+
if (!Number.isInteger(v) || v < 0 || v > 255) return false;
|
|
135
|
+
}
|
|
136
|
+
const first = Number(m[1]);
|
|
137
|
+
return first >= 224 && first <= 239;
|
|
138
|
+
}
|
|
139
|
+
function isSsmGroupAddress(addr) {
|
|
140
|
+
if (addr.includes(":")) {
|
|
141
|
+
return /^ff3[0-9a-f]:0{0,4}:/i.test(addr);
|
|
142
|
+
}
|
|
143
|
+
const m = /^(\d{1,3})\./.exec(addr);
|
|
144
|
+
return m !== null && Number(m[1]) === 232;
|
|
145
|
+
}
|
|
146
|
+
function multicastFromEnv(env = globalThis.process?.env ?? {}) {
|
|
147
|
+
const indices = collectMulticastIndices(env);
|
|
148
|
+
if (indices.length === 0) {
|
|
149
|
+
const strayCatalog = env["MOQCAST_MULTICAST_AMT_DISCOVERY"] !== void 0 || env["MOQCAST_MULTICAST_AMT_RELAY_DNS"] !== void 0;
|
|
150
|
+
if (strayCatalog) {
|
|
151
|
+
throw new MulticastInputError(
|
|
152
|
+
"invalid_env_shape",
|
|
153
|
+
null,
|
|
154
|
+
"MOQCAST_MULTICAST_AMT_* env keys are set but no per-endpoint keys (MOQCAST_MULTICAST_GROUP / _PROTOCOL / _PORT / _TRACKS) were found. AMT discovery is a catalog-level fallback for endpoints; declaring it with zero endpoints is a misconfiguration."
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
return void 0;
|
|
158
|
+
}
|
|
159
|
+
const endpoints = indices.map((idx) => readEndpointAt(env, idx));
|
|
160
|
+
const input = {
|
|
161
|
+
endpoints,
|
|
162
|
+
...env["MOQCAST_MULTICAST_AMT_DISCOVERY"] ? {
|
|
163
|
+
amtFallback: {
|
|
164
|
+
discovery: env["MOQCAST_MULTICAST_AMT_DISCOVERY"],
|
|
165
|
+
...env["MOQCAST_MULTICAST_AMT_RELAY_DNS"] ? { relayDns: env["MOQCAST_MULTICAST_AMT_RELAY_DNS"] } : {}
|
|
166
|
+
}
|
|
167
|
+
} : {}
|
|
168
|
+
};
|
|
169
|
+
return multicastFromConfig(input);
|
|
170
|
+
}
|
|
171
|
+
var ENV_PER_FIELD = ["PROTOCOL", "GROUP", "PORT", "SOURCE", "RELAY", "TRACKS", "BANDWIDTH"];
|
|
172
|
+
var ENV_CATALOG_LEVEL = /* @__PURE__ */ new Set(["AMT_DISCOVERY", "AMT_RELAY_DNS"]);
|
|
173
|
+
function collectMulticastIndices(env) {
|
|
174
|
+
const indices = /* @__PURE__ */ new Set();
|
|
175
|
+
let hasUnindexed = false;
|
|
176
|
+
let hasZeroIndexed = false;
|
|
177
|
+
for (const [key, val] of Object.entries(env)) {
|
|
178
|
+
if (val === void 0) continue;
|
|
179
|
+
if (!key.startsWith("MOQCAST_MULTICAST_")) continue;
|
|
180
|
+
const suffix = key.slice("MOQCAST_MULTICAST_".length);
|
|
181
|
+
if (ENV_CATALOG_LEVEL.has(suffix)) continue;
|
|
182
|
+
const m = /^(\d+)_(.+)$/.exec(suffix);
|
|
183
|
+
if (m) {
|
|
184
|
+
const idx = Number(m[1]);
|
|
185
|
+
const field = m[2];
|
|
186
|
+
if (!ENV_PER_FIELD.includes(field)) continue;
|
|
187
|
+
if (idx === 0) hasZeroIndexed = true;
|
|
188
|
+
indices.add(idx);
|
|
189
|
+
} else if (ENV_PER_FIELD.includes(suffix)) {
|
|
190
|
+
hasUnindexed = true;
|
|
191
|
+
indices.add(0);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (hasUnindexed && hasZeroIndexed) {
|
|
195
|
+
throw new MulticastInputError(
|
|
196
|
+
"invalid_env_shape",
|
|
197
|
+
null,
|
|
198
|
+
"MOQCAST_MULTICAST_* env contract: cannot mix unindexed keys (MOQCAST_MULTICAST_GROUP) with explicitly-indexed keys at index 0 (MOQCAST_MULTICAST_0_GROUP) \u2014 they refer to the same endpoint. Use one form consistently."
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return [...indices].sort((a, b) => a - b);
|
|
202
|
+
}
|
|
203
|
+
function readEndpointAt(env, idx) {
|
|
204
|
+
const lookup = (field) => {
|
|
205
|
+
if (idx === 0) {
|
|
206
|
+
return env[`MOQCAST_MULTICAST_${field}`] ?? env[`MOQCAST_MULTICAST_0_${field}`];
|
|
207
|
+
}
|
|
208
|
+
return env[`MOQCAST_MULTICAST_${idx}_${field}`];
|
|
209
|
+
};
|
|
210
|
+
const portStr = lookup("PORT");
|
|
211
|
+
const port = portStr !== void 0 ? Number(portStr) : NaN;
|
|
212
|
+
const tracks = parseTracksEnv(lookup("TRACKS"), idx);
|
|
213
|
+
const bandwidthStr = lookup("BANDWIDTH");
|
|
214
|
+
const bandwidth = bandwidthStr !== void 0 ? Number(bandwidthStr) : void 0;
|
|
215
|
+
const source = lookup("SOURCE");
|
|
216
|
+
const relay = lookup("RELAY");
|
|
217
|
+
return {
|
|
218
|
+
protocol: lookup("PROTOCOL"),
|
|
219
|
+
groupAddress: lookup("GROUP") ?? "",
|
|
220
|
+
port,
|
|
221
|
+
tracks,
|
|
222
|
+
...source ? { sourceAddress: source } : {},
|
|
223
|
+
...relay ? { relayAddress: relay } : {},
|
|
224
|
+
...bandwidth !== void 0 ? { bandwidth } : {}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function parseTracksEnv(raw, endpointIdx) {
|
|
228
|
+
if (!raw || raw.length === 0) return [];
|
|
229
|
+
return raw.split(",").map((entry, i) => {
|
|
230
|
+
const colon = entry.lastIndexOf(":");
|
|
231
|
+
if (colon < 0) {
|
|
232
|
+
throw new MulticastInputError(
|
|
233
|
+
"invalid_track_name",
|
|
234
|
+
endpointIdx,
|
|
235
|
+
`endpoint[${endpointIdx}] TRACKS[${i}] missing ":" \u2014 expected "name:packetId", got ${JSON.stringify(entry)}`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
const name = entry.slice(0, colon).trim();
|
|
239
|
+
const idStr = entry.slice(colon + 1).trim();
|
|
240
|
+
const packetId = Number(idStr);
|
|
241
|
+
if (!name || idStr.length === 0 || !Number.isFinite(packetId) || !Number.isInteger(packetId)) {
|
|
242
|
+
throw new MulticastInputError(
|
|
243
|
+
"invalid_packet_id",
|
|
244
|
+
endpointIdx,
|
|
245
|
+
`endpoint[${endpointIdx}] TRACKS[${i}] entry malformed (need "name:integer"): ${JSON.stringify(entry)}`
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
return { name, packetId };
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
MulticastInputError,
|
|
253
|
+
multicastFromConfig,
|
|
254
|
+
multicastFromEnv
|
|
255
|
+
};
|
|
256
|
+
//# sourceMappingURL=multicast-input.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/multicast-input.ts"],
|
|
4
|
+
"sourcesContent": ["// Module-local ambient: `multicastFromEnv` reads `process.env` when present\n// (Node, FFI host) and falls back to `{}` in browser contexts. The package\n// targets both, so we don't pull in `@types/node` org-wide \u2014 declaring the\n// minimal surface we touch keeps the dependency graph tight and the\n// published .d.ts free of node-isms.\ndeclare const process: { env: Record<string, string | undefined> } | undefined;\n\n/**\n * Multicast catalog input contract \u2014 validator + builder.\n *\n * Per draft-ramadan-moq-multicast-00 \u00A73 + \u00A74.1, the publisher (FFmpeg,\n * cast bridge, GStreamer, OBS-bridge) populates `multicast.endpoints[]`\n * in the catalog when its output includes a UDP multicast destination.\n *\n * This module is the TypeScript-side validator over a versioned input\n * shape. Sister-language validators (FFmpeg C, cast Rust) target the\n * same invariants \u2014 eventually via a shared JSON Schema + fixtures\n * (BLO-3341 follow-up); today parity is enforced by code review against\n * 1:1 ports. Each publisher's integration MUST also assert that the\n * declared `(sourceAddress, groupAddress, port)` matches what it\n * actually emits \u2014 that's a separate runtime check the helper cannot\n * perform.\n *\n * Validation invariants (per codex review of BLO-3323 v2):\n * - protocol === 'ssm' \u2192 sourceAddress REQUIRED\n * - protocol === 'amt' \u2192 relayAddress REQUIRED\n * - groupAddress is a valid IPv4 multicast group (224.0.0.0/4)\n * or IPv6 multicast group (ff00::/8)\n * - SSM groupAddress MUST be in 232.0.0.0/8 (IPv4) or ff3x::/32 (IPv6),\n * where the IPv6 form requires P=1 + T=1 (the `3` nibble) AND the\n * 16-bit reserved-zero second hextet per RFC 3306 \u00A74 / RFC 4607.\n * - port in 1..65535\n * - tracks non-empty; per-track packetId in 0..65535\n * - packetIds unique within an endpoint\n * - (sourceAddress, groupAddress, port) tuple unique across endpoints\n * - bandwidth (if present) > 0\n * - validUntil (if present) is a positive unix-ms timestamp\n *\n * @see draft-ramadan-moq-multicast-00 \u00A74.1\n * @see .planning/drafts/blo-3323-multicast-catalog-source-of-truth.md\n */\n\nimport {\n\ttype AmtDiscovery,\n\ttype MulticastCatalogConfig,\n\ttype MulticastEndpoint,\n\ttype MulticastProtocol,\n\ttype MulticastTrackObject,\n} from \"./carp-catalog.js\";\n\n/**\n * Strict typed input for one multicast endpoint. The publisher provides\n * this shape (env vars / CLI / config record), the helper validates and\n * lifts it into a `MulticastEndpoint` ready to embed in the catalog.\n */\nexport interface MulticastEndpointInput {\n\treadonly protocol: MulticastProtocol;\n\treadonly sourceAddress?: string;\n\treadonly groupAddress: string;\n\treadonly port: number;\n\t/** New emitters MUST use the object form (name + packetId). */\n\treadonly tracks: ReadonlyArray<MulticastTrackObject>;\n\treadonly relayAddress?: string;\n\t/** Aggregate bandwidth in bits per second. RECOMMENDED per draft \u00A74.1. */\n\treadonly bandwidth?: number;\n}\n\n/**\n * Strict typed input for the catalog-level multicast extension.\n *\n * `version` (monotonic) + `validUntil` (unix ms) support the catalog\n * freshness model: subscribers refetch before expiry, and publishers\n * MUST republish (with bumped `version`) on any endpoint mutation.\n */\nexport interface MulticastInput {\n\treadonly enabled?: boolean;\n\treadonly endpoints: ReadonlyArray<MulticastEndpointInput>;\n\treadonly amtFallback?: { readonly discovery: AmtDiscovery; readonly relayDns?: string };\n\treadonly version?: number;\n\treadonly validUntil?: number;\n}\n\nexport type MulticastInputErrorKind =\n\t| \"empty_endpoints\"\n\t| \"ssm_requires_source\"\n\t| \"amt_requires_relay\"\n\t| \"invalid_group_address\"\n\t| \"ssm_group_out_of_range\"\n\t| \"invalid_port\"\n\t| \"empty_tracks\"\n\t| \"invalid_track_name\"\n\t| \"invalid_packet_id\"\n\t| \"duplicate_packet_id\"\n\t| \"duplicate_endpoint_tuple\"\n\t| \"invalid_bandwidth\"\n\t| \"invalid_valid_until\"\n\t| \"invalid_version\"\n\t| \"invalid_env_shape\";\n\nexport class MulticastInputError extends Error {\n\tconstructor(\n\t\tpublic readonly kind: MulticastInputErrorKind,\n\t\tpublic readonly endpointIndex: number | null,\n\t\tmessage: string,\n\t) {\n\t\tsuper(message);\n\t\tthis.name = \"MulticastInputError\";\n\t}\n}\n\n/**\n * Validate a typed publisher input and lift it into a\n * `MulticastCatalogConfig` ready for `catalog.multicast = \u2026`.\n *\n * Throws `MulticastInputError` on any invariant violation. Fail-fast\n * at config-load time, never at runtime \u2014 silent fallbacks hide bugs\n * upstream (per the project's \"no anti-patterns\" directive).\n */\nexport function multicastFromConfig(input: MulticastInput): MulticastCatalogConfig {\n\tif (input.endpoints.length === 0) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"empty_endpoints\",\n\t\t\tnull,\n\t\t\t\"endpoints[] must be non-empty \u2014 a multicast field with zero endpoints declares nothing\",\n\t\t);\n\t}\n\tif (input.version !== undefined && (!Number.isInteger(input.version) || input.version < 0)) {\n\t\tthrow new MulticastInputError(\"invalid_version\", null, `version must be a non-negative integer; got ${input.version}`);\n\t}\n\tif (input.validUntil !== undefined) {\n\t\tif (!Number.isFinite(input.validUntil) || input.validUntil <= 0) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_valid_until\",\n\t\t\t\tnull,\n\t\t\t\t`validUntil must be a positive unix-ms timestamp; got ${input.validUntil}`,\n\t\t\t);\n\t\t}\n\t}\n\n\tconst seenTuples = new Set<string>();\n\tconst endpoints: MulticastEndpoint[] = input.endpoints.map((ep, idx) => validateEndpoint(ep, idx, seenTuples));\n\n\tconst out: MulticastCatalogConfig = { endpoints };\n\tif (input.enabled !== undefined) out.enabled = input.enabled;\n\tif (input.amtFallback !== undefined) out.amtFallback = { ...input.amtFallback };\n\tif (input.version !== undefined) out.version = input.version;\n\tif (input.validUntil !== undefined) out.validUntil = input.validUntil;\n\treturn out;\n}\n\nfunction validateEndpoint(\n\tep: MulticastEndpointInput,\n\tidx: number,\n\tseenTuples: Set<string>,\n): MulticastEndpoint {\n\tif (ep.protocol === \"ssm\" && (!ep.sourceAddress || ep.sourceAddress.length === 0)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"ssm_requires_source\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] protocol=ssm requires sourceAddress`,\n\t\t);\n\t}\n\tif (ep.protocol === \"amt\" && (!ep.relayAddress || ep.relayAddress.length === 0)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"amt_requires_relay\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] protocol=amt requires relayAddress`,\n\t\t);\n\t}\n\n\tif (!isMulticastGroupAddress(ep.groupAddress)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"invalid_group_address\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] groupAddress \"${ep.groupAddress}\" is not a valid multicast address`,\n\t\t);\n\t}\n\tif (ep.protocol === \"ssm\" && !isSsmGroupAddress(ep.groupAddress)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"ssm_group_out_of_range\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] protocol=ssm requires groupAddress in 232.0.0.0/8 (IPv4) or ff3x::/32 (IPv6); got \"${ep.groupAddress}\"`,\n\t\t);\n\t}\n\n\tif (!Number.isInteger(ep.port) || ep.port < 1 || ep.port > 65535) {\n\t\tthrow new MulticastInputError(\"invalid_port\", idx, `endpoint[${idx}] port must be 1..65535; got ${ep.port}`);\n\t}\n\n\tif (ep.tracks.length === 0) {\n\t\tthrow new MulticastInputError(\"empty_tracks\", idx, `endpoint[${idx}] tracks must be non-empty`);\n\t}\n\n\tconst seenPids = new Set<number>();\n\tfor (const t of ep.tracks) {\n\t\tif (typeof t.name !== \"string\" || t.name.length === 0) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_track_name\",\n\t\t\t\tidx,\n\t\t\t\t`endpoint[${idx}] track name must be a non-empty string`,\n\t\t\t);\n\t\t}\n\t\tif (!Number.isInteger(t.packetId) || t.packetId < 0 || t.packetId > 65535) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_packet_id\",\n\t\t\t\tidx,\n\t\t\t\t`endpoint[${idx}] track \"${t.name}\" packetId must be 0..65535; got ${t.packetId}`,\n\t\t\t);\n\t\t}\n\t\tif (seenPids.has(t.packetId)) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"duplicate_packet_id\",\n\t\t\t\tidx,\n\t\t\t\t`endpoint[${idx}] duplicate packetId ${t.packetId}`,\n\t\t\t);\n\t\t}\n\t\tseenPids.add(t.packetId);\n\t}\n\n\tif (ep.bandwidth !== undefined && (!Number.isFinite(ep.bandwidth) || ep.bandwidth <= 0)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"invalid_bandwidth\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] bandwidth must be positive; got ${ep.bandwidth}`,\n\t\t);\n\t}\n\n\tconst tupleKey = `${ep.sourceAddress ?? \"\"}|${ep.groupAddress}|${ep.port}`;\n\tif (seenTuples.has(tupleKey)) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"duplicate_endpoint_tuple\",\n\t\t\tidx,\n\t\t\t`endpoint[${idx}] duplicates (sourceAddress, groupAddress, port) tuple \"${tupleKey}\"`,\n\t\t);\n\t}\n\tseenTuples.add(tupleKey);\n\n\tconst out: MulticastEndpoint = {\n\t\tprotocol: ep.protocol,\n\t\tgroupAddress: ep.groupAddress,\n\t\tport: ep.port,\n\t\ttracks: ep.tracks.map((t) => ({ name: t.name, packetId: t.packetId })),\n\t};\n\tif (ep.sourceAddress !== undefined) out.sourceAddress = ep.sourceAddress;\n\tif (ep.relayAddress !== undefined) out.relayAddress = ep.relayAddress;\n\tif (ep.bandwidth !== undefined) out.bandwidth = ep.bandwidth;\n\treturn out;\n}\n\nfunction isMulticastGroupAddress(addr: string): boolean {\n\tif (addr.includes(\":\")) {\n\t\t// IPv6: ff00::/8. Prefix-only check; full IPv6 syntax validation\n\t\t// is delegated to the OS bind() call downstream.\n\t\treturn /^ff[0-9a-f]{2}:/i.test(addr);\n\t}\n\tconst m = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/.exec(addr);\n\tif (!m) return false;\n\tfor (let i = 1; i <= 4; i++) {\n\t\tconst v = Number(m[i]);\n\t\tif (!Number.isInteger(v) || v < 0 || v > 255) return false;\n\t}\n\tconst first = Number(m[1]);\n\treturn first >= 224 && first <= 239;\n}\n\nfunction isSsmGroupAddress(addr: string): boolean {\n\tif (addr.includes(\":\")) {\n\t\t// SSM IPv6: ff3x::/32 per RFC 3306 \u00A74. Requires P=1 + T=1 (the `3`\n\t\t// nibble) AND the second 16-bit hextet to be all-zero (RFC 3306's\n\t\t// \"prefix length = 0\" \u2192 next 32 bits are 0). The regex matches\n\t\t// `ff3?:0000:` collapsed forms (`ff3e::`, `ff3e:0::`, `ff3e:0:`,\n\t\t// `ff3e:0000:`) and rejects `ff3e:beef::1` etc.\n\t\treturn /^ff3[0-9a-f]:0{0,4}:/i.test(addr);\n\t}\n\tconst m = /^(\\d{1,3})\\./.exec(addr);\n\treturn m !== null && Number(m[1]) === 232;\n}\n\n// Env-var helper (BLO-3337): read MOQCAST_MULTICAST_* keys and route\n// through multicastFromConfig so all per-endpoint invariants apply.\n\n/**\n * Read `MOQCAST_MULTICAST_*` env vars and return a\n * `MulticastCatalogConfig`. Returns `undefined` when no per-endpoint\n * key is set.\n *\n * Env contract \u2014 per-endpoint keys take an optional non-negative index:\n *\n * MOQCAST_MULTICAST[_<idx>]_PROTOCOL=ssm\n * MOQCAST_MULTICAST[_<idx>]_GROUP=232.1.1.1\n * MOQCAST_MULTICAST[_<idx>]_PORT=5004\n * MOQCAST_MULTICAST[_<idx>]_SOURCE=10.0.0.20 (required for ssm)\n * MOQCAST_MULTICAST[_<idx>]_RELAY=amt.example.com (required for amt)\n * MOQCAST_MULTICAST[_<idx>]_TRACKS=video:1,audio:3\n * MOQCAST_MULTICAST[_<idx>]_BANDWIDTH=8000000 (optional, bps)\n *\n * MOQCAST_MULTICAST_AMT_DISCOVERY=driad (catalog-level)\n * MOQCAST_MULTICAST_AMT_RELAY_DNS=relay.example.com (catalog-level)\n *\n * The unindexed form (`MOQCAST_MULTICAST_GROUP`) is exactly index 0;\n * mixing it with explicit `_0_` keys is rejected as ambiguous. Indices\n * need not be contiguous; observed indices are sorted ascending.\n */\nexport function multicastFromEnv(\n\tenv: Record<string, string | undefined> = ((globalThis as { process?: { env?: Record<string, string | undefined> } })\n\t\t.process?.env ?? {}) as Record<string, string | undefined>,\n): MulticastCatalogConfig | undefined {\n\tconst indices = collectMulticastIndices(env);\n\tif (indices.length === 0) {\n\t\t// Catalog-level AMT keys without per-endpoint keys is a\n\t\t// misconfiguration, not a no-op: `MOQCAST_MULTICAST_AMT_DISCOVERY`\n\t\t// only makes sense alongside endpoints to fall back FOR. Throw\n\t\t// loudly instead of silently dropping the request \u2014 a publisher\n\t\t// that meant to declare AMT fallback shouldn't have its config\n\t\t// disappear without any signal.\n\t\tconst strayCatalog = env[\"MOQCAST_MULTICAST_AMT_DISCOVERY\"] !== undefined\n\t\t\t|| env[\"MOQCAST_MULTICAST_AMT_RELAY_DNS\"] !== undefined;\n\t\tif (strayCatalog) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_env_shape\",\n\t\t\t\tnull,\n\t\t\t\t\"MOQCAST_MULTICAST_AMT_* env keys are set but no per-endpoint keys \" +\n\t\t\t\t\t\"(MOQCAST_MULTICAST_GROUP / _PROTOCOL / _PORT / _TRACKS) were found. \" +\n\t\t\t\t\t\"AMT discovery is a catalog-level fallback for endpoints; declaring it \" +\n\t\t\t\t\t\"with zero endpoints is a misconfiguration.\",\n\t\t\t);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tconst endpoints: MulticastEndpointInput[] = indices.map((idx) => readEndpointAt(env, idx));\n\n\tconst input: MulticastInput = {\n\t\tendpoints,\n\t\t...(env[\"MOQCAST_MULTICAST_AMT_DISCOVERY\"]\n\t\t\t? {\n\t\t\t\t\tamtFallback: {\n\t\t\t\t\t\tdiscovery: env[\"MOQCAST_MULTICAST_AMT_DISCOVERY\"] as AmtDiscovery,\n\t\t\t\t\t\t...(env[\"MOQCAST_MULTICAST_AMT_RELAY_DNS\"]\n\t\t\t\t\t\t\t? { relayDns: env[\"MOQCAST_MULTICAST_AMT_RELAY_DNS\"] }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t: {}),\n\t};\n\treturn multicastFromConfig(input);\n}\n\nconst ENV_PER_FIELD = [\"PROTOCOL\", \"GROUP\", \"PORT\", \"SOURCE\", \"RELAY\", \"TRACKS\", \"BANDWIDTH\"];\nconst ENV_CATALOG_LEVEL = new Set([\"AMT_DISCOVERY\", \"AMT_RELAY_DNS\"]);\n\nfunction collectMulticastIndices(env: Record<string, string | undefined>): number[] {\n\tconst indices = new Set<number>();\n\tlet hasUnindexed = false;\n\tlet hasZeroIndexed = false;\n\n\tfor (const [key, val] of Object.entries(env)) {\n\t\tif (val === undefined) continue;\n\t\tif (!key.startsWith(\"MOQCAST_MULTICAST_\")) continue;\n\t\tconst suffix = key.slice(\"MOQCAST_MULTICAST_\".length);\n\t\tif (ENV_CATALOG_LEVEL.has(suffix)) continue;\n\n\t\tconst m = /^(\\d+)_(.+)$/.exec(suffix);\n\t\tif (m) {\n\t\t\tconst idx = Number(m[1]);\n\t\t\tconst field = m[2];\n\t\t\tif (!ENV_PER_FIELD.includes(field)) continue;\n\t\t\tif (idx === 0) hasZeroIndexed = true;\n\t\t\tindices.add(idx);\n\t\t} else if (ENV_PER_FIELD.includes(suffix)) {\n\t\t\thasUnindexed = true;\n\t\t\tindices.add(0);\n\t\t}\n\t}\n\n\tif (hasUnindexed && hasZeroIndexed) {\n\t\tthrow new MulticastInputError(\n\t\t\t\"invalid_env_shape\",\n\t\t\tnull,\n\t\t\t\"MOQCAST_MULTICAST_* env contract: cannot mix unindexed keys (MOQCAST_MULTICAST_GROUP) \" +\n\t\t\t\t\"with explicitly-indexed keys at index 0 (MOQCAST_MULTICAST_0_GROUP) \u2014 they refer to \" +\n\t\t\t\t\"the same endpoint. Use one form consistently.\",\n\t\t);\n\t}\n\n\treturn [...indices].sort((a, b) => a - b);\n}\n\nfunction readEndpointAt(env: Record<string, string | undefined>, idx: number): MulticastEndpointInput {\n\tconst lookup = (field: string): string | undefined => {\n\t\tif (idx === 0) {\n\t\t\treturn env[`MOQCAST_MULTICAST_${field}`] ?? env[`MOQCAST_MULTICAST_0_${field}`];\n\t\t}\n\t\treturn env[`MOQCAST_MULTICAST_${idx}_${field}`];\n\t};\n\n\tconst portStr = lookup(\"PORT\");\n\tconst port = portStr !== undefined ? Number(portStr) : NaN;\n\tconst tracks = parseTracksEnv(lookup(\"TRACKS\"), idx);\n\tconst bandwidthStr = lookup(\"BANDWIDTH\");\n\tconst bandwidth = bandwidthStr !== undefined ? Number(bandwidthStr) : undefined;\n\tconst source = lookup(\"SOURCE\");\n\tconst relay = lookup(\"RELAY\");\n\n\treturn {\n\t\tprotocol: lookup(\"PROTOCOL\") as MulticastProtocol,\n\t\tgroupAddress: lookup(\"GROUP\") ?? \"\",\n\t\tport,\n\t\ttracks,\n\t\t...(source ? { sourceAddress: source } : {}),\n\t\t...(relay ? { relayAddress: relay } : {}),\n\t\t...(bandwidth !== undefined ? { bandwidth } : {}),\n\t};\n}\n\nfunction parseTracksEnv(raw: string | undefined, endpointIdx: number): MulticastTrackObject[] {\n\tif (!raw || raw.length === 0) return [];\n\treturn raw.split(\",\").map((entry, i) => {\n\t\tconst colon = entry.lastIndexOf(\":\");\n\t\tif (colon < 0) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_track_name\",\n\t\t\t\tendpointIdx,\n\t\t\t\t`endpoint[${endpointIdx}] TRACKS[${i}] missing \":\" \u2014 expected \"name:packetId\", got ${JSON.stringify(entry)}`,\n\t\t\t);\n\t\t}\n\t\tconst name = entry.slice(0, colon).trim();\n\t\tconst idStr = entry.slice(colon + 1).trim();\n\t\tconst packetId = Number(idStr);\n\t\tif (!name || idStr.length === 0 || !Number.isFinite(packetId) || !Number.isInteger(packetId)) {\n\t\t\tthrow new MulticastInputError(\n\t\t\t\t\"invalid_packet_id\",\n\t\t\t\tendpointIdx,\n\t\t\t\t`endpoint[${endpointIdx}] TRACKS[${i}] entry malformed (need \"name:integer\"): ${JSON.stringify(entry)}`,\n\t\t\t);\n\t\t}\n\t\treturn { name, packetId };\n\t});\n}\n"],
|
|
5
|
+
"mappings": ";AAmGO,IAAM,sBAAN,cAAkC,MAAM;AAAA,EAC9C,YACiB,MACA,eAChB,SACC;AACD,UAAM,OAAO;AAJG;AACA;AAIhB,SAAK,OAAO;AAAA,EACb;AACD;AAUO,SAAS,oBAAoB,OAA+C;AAClF,MAAI,MAAM,UAAU,WAAW,GAAG;AACjC,UAAM,IAAI;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACA,MAAI,MAAM,YAAY,WAAc,CAAC,OAAO,UAAU,MAAM,OAAO,KAAK,MAAM,UAAU,IAAI;AAC3F,UAAM,IAAI,oBAAoB,mBAAmB,MAAM,+CAA+C,MAAM,OAAO,EAAE;AAAA,EACtH;AACA,MAAI,MAAM,eAAe,QAAW;AACnC,QAAI,CAAC,OAAO,SAAS,MAAM,UAAU,KAAK,MAAM,cAAc,GAAG;A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