@blockcast/mmt-container 0.1.0-main.149f78a4adae
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 +148 -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 +17109 -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 +549 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +82 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +66 -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 +168 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1755 -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 +235 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1225 -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 +266 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +1447 -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 +76 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +603 -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 +330 -0
- package/dist/index.js.map +7 -0
- package/dist/iso-bmff-timing.d.ts +47 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -0
- package/dist/iso-bmff-timing.js +526 -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 +1267 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +338 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +802 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +264 -0
- package/dist/mfu-reassembler.d.ts.map +1 -0
- package/dist/mfu-reassembler.js +2668 -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 +304 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +5378 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +7853 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +96 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +5589 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +383 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +8384 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +166 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +781 -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 +330 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +11032 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +62 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +338 -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 +7819 -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 +117 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/sample-combiner.d.ts +182 -0
- package/dist/sample-combiner.d.ts.map +1 -0
- package/dist/sample-combiner.js +571 -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 +1220 -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 +269 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +597 -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 +81 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +1915 -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 +5635 -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 +80 -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 +270 -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 +309 -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 +275 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +644 -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 +898 -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 +80 -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 +294 -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 +174 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +256 -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 +275 -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 +644 -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 +898 -0
- package/node_modules/@blockcast/mmt-fec/package.json +79 -0
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +369 -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 +319 -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 +90 -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 +462 -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 +636 -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 +283 -0
- package/src/align.ts +235 -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 +776 -0
- package/src/catalog-fec-params.ts +167 -0
- package/src/catalog-network-source.ts +49 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1058 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +329 -0
- package/src/codec-utils.ts +1539 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +1939 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-worker-setup.ts +177 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +443 -0
- package/src/iso-bmff-timing.ts +688 -0
- package/src/loc.ts +181 -0
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +1185 -0
- package/src/mfu-reassembler.ts +2842 -0
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +1498 -0
- package/src/mmtp-decode-pipeline.ts +315 -0
- package/src/mmtp-router.ts +3027 -0
- package/src/mmtp-to-cmaf.ts +956 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +439 -0
- package/src/multicast-manager.ts +1503 -0
- package/src/multicast-transport.ts +320 -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 +217 -0
- package/src/sample-combiner.ts +846 -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 +778 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +372 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +25 -0
- package/test-vectors/catalog/negative/legacy-selection-params.json +15 -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-unaligned-symbol.json +26 -0
- package/test-vectors/catalog/negative/repair-track-legacy-shape.json +18 -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-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/subsample-placement-v1.json +230 -0
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
// src/multicast-auth-catalog.ts
|
|
2
|
+
var RAW_ED25519_KEY_LENGTH = 32;
|
|
3
|
+
var SOURCE_AUTH_SCOPE_LENGTH = 32;
|
|
4
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
5
|
+
function encodeBase64Url(bytes) {
|
|
6
|
+
let output = "";
|
|
7
|
+
for (let i = 0; i < bytes.length; i += 3) {
|
|
8
|
+
const b0 = bytes[i];
|
|
9
|
+
const b1 = bytes[i + 1];
|
|
10
|
+
const b2 = bytes[i + 2];
|
|
11
|
+
output += BASE64URL_ALPHABET[b0 >> 2];
|
|
12
|
+
output += BASE64URL_ALPHABET[(b0 & 3) << 4 | (b1 === void 0 ? 0 : b1 >> 4)];
|
|
13
|
+
if (b1 === void 0) break;
|
|
14
|
+
output += BASE64URL_ALPHABET[(b1 & 15) << 2 | (b2 === void 0 ? 0 : b2 >> 6)];
|
|
15
|
+
if (b2 === void 0) break;
|
|
16
|
+
output += BASE64URL_ALPHABET[b2 & 63];
|
|
17
|
+
}
|
|
18
|
+
return output;
|
|
19
|
+
}
|
|
20
|
+
var BASE64URL_DECODE_TABLE = (() => {
|
|
21
|
+
const table = new Int8Array(128).fill(-1);
|
|
22
|
+
for (let i = 0; i < BASE64URL_ALPHABET.length; i++) {
|
|
23
|
+
table[BASE64URL_ALPHABET.charCodeAt(i)] = i;
|
|
24
|
+
}
|
|
25
|
+
return table;
|
|
26
|
+
})();
|
|
27
|
+
function decodeBase64Url(text) {
|
|
28
|
+
if (text.length % 4 === 1) {
|
|
29
|
+
throw new Error(`[multicast-auth-catalog] invalid unpadded base64url length for "${text}"`);
|
|
30
|
+
}
|
|
31
|
+
const bytes = [];
|
|
32
|
+
let buffer = 0;
|
|
33
|
+
let bits = 0;
|
|
34
|
+
for (let i = 0; i < text.length; i++) {
|
|
35
|
+
const code = text.charCodeAt(i);
|
|
36
|
+
const value = code < 128 ? BASE64URL_DECODE_TABLE[code] : -1;
|
|
37
|
+
if (value === void 0 || value < 0) {
|
|
38
|
+
throw new Error(`[multicast-auth-catalog] invalid base64url character in "${text}"`);
|
|
39
|
+
}
|
|
40
|
+
buffer = buffer << 6 | value;
|
|
41
|
+
bits += 6;
|
|
42
|
+
if (bits >= 8) {
|
|
43
|
+
bits -= 8;
|
|
44
|
+
bytes.push(buffer >> bits & 255);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const decoded = Uint8Array.from(bytes);
|
|
48
|
+
if (encodeBase64Url(decoded) !== text) {
|
|
49
|
+
throw new Error(`[multicast-auth-catalog] non-canonical base64url encoding "${text}"`);
|
|
50
|
+
}
|
|
51
|
+
return decoded;
|
|
52
|
+
}
|
|
53
|
+
function decodeAuthScope(authScope) {
|
|
54
|
+
const bytes = decodeBase64Url(authScope);
|
|
55
|
+
if (bytes.byteLength !== SOURCE_AUTH_SCOPE_LENGTH) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`[multicast-auth-catalog] authScope must decode to ${SOURCE_AUTH_SCOPE_LENGTH} raw bytes, got ${bytes.byteLength}`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return bytes;
|
|
61
|
+
}
|
|
62
|
+
function decodeEd25519PublicKey(publicKey) {
|
|
63
|
+
const bytes = decodeBase64Url(publicKey);
|
|
64
|
+
if (bytes.byteLength !== RAW_ED25519_KEY_LENGTH) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
`[multicast-auth-catalog] public key must decode to ${RAW_ED25519_KEY_LENGTH} raw bytes, got ${bytes.byteLength}`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return bytes;
|
|
70
|
+
}
|
|
71
|
+
function isNonEmptyString(value) {
|
|
72
|
+
return typeof value === "string" && value.length > 0;
|
|
73
|
+
}
|
|
74
|
+
function isValidAuthScopeField(value) {
|
|
75
|
+
if (!isNonEmptyString(value)) return false;
|
|
76
|
+
try {
|
|
77
|
+
decodeAuthScope(value);
|
|
78
|
+
return true;
|
|
79
|
+
} catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function isValidPublicKeyField(value) {
|
|
84
|
+
if (!isNonEmptyString(value)) return false;
|
|
85
|
+
try {
|
|
86
|
+
decodeEd25519PublicKey(value);
|
|
87
|
+
return true;
|
|
88
|
+
} catch {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function hasOnlyKeys(object, allowed) {
|
|
93
|
+
const allowedKeys = new Set(allowed);
|
|
94
|
+
return Object.keys(object).every((key) => allowedKeys.has(key));
|
|
95
|
+
}
|
|
96
|
+
function isMulticastAuthTrackConfig(obj) {
|
|
97
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
98
|
+
const o = obj;
|
|
99
|
+
return hasOnlyKeys(o, ["mediaTrack", "manifestTrack", "authScope", "sourceSymbolFormat"]) && isNonEmptyString(o["mediaTrack"]) && isNonEmptyString(o["manifestTrack"]) && o["mediaTrack"] !== o["manifestTrack"] && isValidAuthScopeField(o["authScope"]) && isNonEmptyString(o["sourceSymbolFormat"]);
|
|
100
|
+
}
|
|
101
|
+
var VALID_COMPACTION = /* @__PURE__ */ new Set(["merkle", "none"]);
|
|
102
|
+
var VALID_ENFORCEMENT = /* @__PURE__ */ new Set(["shadow", "enforce"]);
|
|
103
|
+
function hasUniqueMulticastAuthTrackBindings(tracks) {
|
|
104
|
+
const bindings = tracks.flatMap((track) => {
|
|
105
|
+
if (typeof track !== "object" || track === null) return [];
|
|
106
|
+
const value = track;
|
|
107
|
+
if (typeof value["mediaTrack"] !== "string" || typeof value["sourceSymbolFormat"] !== "string") {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
return [JSON.stringify([value["mediaTrack"], value["sourceSymbolFormat"]])];
|
|
111
|
+
});
|
|
112
|
+
return new Set(bindings).size === bindings.length;
|
|
113
|
+
}
|
|
114
|
+
function isMulticastAuthConfig(obj) {
|
|
115
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
116
|
+
const o = obj;
|
|
117
|
+
if (o["scheme"] !== "bc-provenance") return false;
|
|
118
|
+
if (o["hash"] !== "blake3") return false;
|
|
119
|
+
if (o["sig"] !== "ed25519") return false;
|
|
120
|
+
if (!hasOnlyKeys(o, ["scheme", "hash", "sig", "publicKey", "keyId", "previousKey", "compaction", "enforcement", "tracks"])) return false;
|
|
121
|
+
if (!isValidPublicKeyField(o["publicKey"])) return false;
|
|
122
|
+
if (!isNonEmptyString(o["keyId"])) return false;
|
|
123
|
+
if (o["previousKey"] !== void 0 && !isValidPublicKeyField(o["previousKey"])) return false;
|
|
124
|
+
if (o["previousKey"] === o["publicKey"]) return false;
|
|
125
|
+
if (typeof o["compaction"] !== "string" || !VALID_COMPACTION.has(o["compaction"])) return false;
|
|
126
|
+
if (o["enforcement"] !== void 0) {
|
|
127
|
+
if (typeof o["enforcement"] !== "string" || !VALID_ENFORCEMENT.has(o["enforcement"])) return false;
|
|
128
|
+
}
|
|
129
|
+
if (!Array.isArray(o["tracks"]) || o["tracks"].length === 0) return false;
|
|
130
|
+
const tracks = o["tracks"];
|
|
131
|
+
if (!tracks.every((t) => isMulticastAuthTrackConfig(t))) return false;
|
|
132
|
+
const typedTracks = tracks;
|
|
133
|
+
const scopes = typedTracks.map((t) => t.authScope);
|
|
134
|
+
if (new Set(scopes).size !== scopes.length) return false;
|
|
135
|
+
if (!hasUniqueMulticastAuthTrackBindings(typedTracks)) return false;
|
|
136
|
+
const manifestTracks = typedTracks.map((t) => t.manifestTrack);
|
|
137
|
+
if (new Set(manifestTracks).size !== manifestTracks.length) return false;
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
function resolveMulticastAuthMode(playerMode, auth) {
|
|
141
|
+
if (playerMode !== void 0) return playerMode;
|
|
142
|
+
if (auth === void 0) return "off";
|
|
143
|
+
return auth.enforcement ?? "shadow";
|
|
144
|
+
}
|
|
145
|
+
function resolveMulticastAuthCatalog(catalog, playerMode) {
|
|
146
|
+
if (typeof catalog !== "object" || catalog === null || Array.isArray(catalog)) {
|
|
147
|
+
throw new Error("[multicast-auth-catalog] catalog must be an object");
|
|
148
|
+
}
|
|
149
|
+
const root = catalog;
|
|
150
|
+
const rawAuth = root["multicast.auth"];
|
|
151
|
+
if (rawAuth === void 0) {
|
|
152
|
+
if (playerMode === "enforce") {
|
|
153
|
+
throw new Error("[multicast-auth-catalog] player enforce mode requires multicast.auth");
|
|
154
|
+
}
|
|
155
|
+
return void 0;
|
|
156
|
+
}
|
|
157
|
+
if (!isMulticastAuthConfig(rawAuth)) {
|
|
158
|
+
throw new Error("[multicast-auth-catalog] invalid multicast.auth v2 block");
|
|
159
|
+
}
|
|
160
|
+
const rawTracks = root["tracks"];
|
|
161
|
+
if (!Array.isArray(rawTracks)) {
|
|
162
|
+
throw new Error("[multicast-auth-catalog] catalog tracks must be an array");
|
|
163
|
+
}
|
|
164
|
+
const catalogTrackNames = new Set(
|
|
165
|
+
rawTracks.flatMap(
|
|
166
|
+
(track) => typeof track === "object" && track !== null && typeof track["name"] === "string" ? [track["name"]] : []
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
for (const track of rawAuth.tracks) {
|
|
170
|
+
if (!catalogTrackNames.has(track.mediaTrack)) {
|
|
171
|
+
throw new Error(`[multicast-auth-catalog] unknown mediaTrack "${track.mediaTrack}"`);
|
|
172
|
+
}
|
|
173
|
+
if (!catalogTrackNames.has(track.manifestTrack)) {
|
|
174
|
+
throw new Error(`[multicast-auth-catalog] unknown manifestTrack "${track.manifestTrack}"`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
keyId: rawAuth.keyId,
|
|
179
|
+
acceptedPublicKeys: [
|
|
180
|
+
decodeEd25519PublicKey(rawAuth.publicKey),
|
|
181
|
+
...rawAuth.previousKey === void 0 ? [] : [decodeEd25519PublicKey(rawAuth.previousKey)]
|
|
182
|
+
],
|
|
183
|
+
mode: resolveMulticastAuthMode(playerMode, rawAuth),
|
|
184
|
+
compaction: rawAuth.compaction,
|
|
185
|
+
tracks: rawAuth.tracks.map((track) => ({
|
|
186
|
+
...track,
|
|
187
|
+
authScope: decodeAuthScope(track.authScope)
|
|
188
|
+
}))
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// src/carp-catalog.ts
|
|
193
|
+
var VALID_ROLE_SUFFIXES = /* @__PURE__ */ new Set(["base", "delta", "repair"]);
|
|
194
|
+
function parseTrackRole(trackName) {
|
|
195
|
+
if (trackName === "") {
|
|
196
|
+
throw new Error("[carp-catalog] empty track name");
|
|
197
|
+
}
|
|
198
|
+
for (let i = 0; i < trackName.length; i++) {
|
|
199
|
+
const cp = trackName.charCodeAt(i);
|
|
200
|
+
if (cp <= 31 || cp === 127 || cp > 126) {
|
|
201
|
+
throw new Error(
|
|
202
|
+
`[carp-catalog] track name contains non-ASCII or control character (code point 0x${cp.toString(16)}) in "${trackName}"`
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const lastSlash = trackName.lastIndexOf("/");
|
|
207
|
+
if (lastSlash === -1) {
|
|
208
|
+
return "single";
|
|
209
|
+
}
|
|
210
|
+
const suffix = trackName.slice(lastSlash + 1);
|
|
211
|
+
if (suffix === "") {
|
|
212
|
+
throw new Error(
|
|
213
|
+
`[carp-catalog] empty role suffix in track name "${trackName}"; track names must not end with "/"`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
if (!VALID_ROLE_SUFFIXES.has(suffix)) {
|
|
217
|
+
throw new Error(
|
|
218
|
+
`[carp-catalog] unknown role suffix "${suffix}" in track name "${trackName}"; expected one of: base, delta, repair`
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
return suffix;
|
|
222
|
+
}
|
|
223
|
+
function hasSwitchingSetRole(names) {
|
|
224
|
+
return names.some((name) => {
|
|
225
|
+
const lastSlash = name.lastIndexOf("/");
|
|
226
|
+
if (lastSlash === -1) return false;
|
|
227
|
+
const suffix = name.slice(lastSlash + 1);
|
|
228
|
+
return suffix === "base" || suffix === "delta";
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function validateSwitchingSet(trackNames) {
|
|
232
|
+
if (trackNames.length === 0) return { ok: true };
|
|
233
|
+
const roles = trackNames.map(parseTrackRole);
|
|
234
|
+
if (roles.every((r) => r === "single")) {
|
|
235
|
+
return { ok: true };
|
|
236
|
+
}
|
|
237
|
+
const presentRoles = new Set(roles.filter((r) => r !== "single"));
|
|
238
|
+
const required = ["base", "delta", "repair"];
|
|
239
|
+
const missing = required.filter((r) => !presentRoles.has(r));
|
|
240
|
+
if (missing.length > 0) {
|
|
241
|
+
return { ok: false, missing };
|
|
242
|
+
}
|
|
243
|
+
return { ok: true };
|
|
244
|
+
}
|
|
245
|
+
function isFecCatalogConfig(obj) {
|
|
246
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
247
|
+
const o = obj;
|
|
248
|
+
const algorithm = o["algorithm"];
|
|
249
|
+
const symbolSize = o["symbolSize"];
|
|
250
|
+
return typeof algorithm === "string" && (algorithm === "none" || algorithm === "raptorq" || algorithm === "reed-solomon") && typeof o["sourceSymbols"] === "number" && o["sourceSymbols"] >= 1 && typeof o["repairSymbols"] === "number" && o["repairSymbols"] >= 1 && typeof symbolSize === "number" && symbolSize >= 1 && (algorithm !== "raptorq" || symbolSize % 8 === 0) && typeof o["repairTrack"] === "string" && o["repairTrack"].length > 0;
|
|
251
|
+
}
|
|
252
|
+
function isMulticastTrackObject(obj) {
|
|
253
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
254
|
+
const o = obj;
|
|
255
|
+
return typeof o["name"] === "string" && typeof o["packetId"] === "number";
|
|
256
|
+
}
|
|
257
|
+
function isMulticastEndpoint(obj) {
|
|
258
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
259
|
+
const o = obj;
|
|
260
|
+
const protocol = o["protocol"] ?? (typeof o["sourceAddress"] === "string" && o["sourceAddress"].length > 0 ? "ssm" : void 0);
|
|
261
|
+
return typeof protocol === "string" && (protocol === "ssm" || protocol === "asm" || protocol === "amt" || protocol === "atsc3") && typeof o["groupAddress"] === "string" && o["groupAddress"].length > 0 && typeof o["port"] === "number" && o["port"] > 0 && o["port"] <= 65535 && Array.isArray(o["tracks"]) && o["tracks"].every((t) => typeof t === "string" || isMulticastTrackObject(t));
|
|
262
|
+
}
|
|
263
|
+
function isMulticastCatalogConfig(obj) {
|
|
264
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
265
|
+
const o = obj;
|
|
266
|
+
return Array.isArray(o["endpoints"]) && o["endpoints"].every((ep) => isMulticastEndpoint(ep));
|
|
267
|
+
}
|
|
268
|
+
function isTrackTimingConfig(obj) {
|
|
269
|
+
if (typeof obj !== "object" || obj === null) return false;
|
|
270
|
+
const o = obj;
|
|
271
|
+
const ms = o["groupDurationMs"];
|
|
272
|
+
const ticks = o["groupDurationTicks"];
|
|
273
|
+
if (ms === void 0 && ticks === void 0) return false;
|
|
274
|
+
if (ms !== void 0 && (typeof ms !== "number" || !Number.isInteger(ms) || ms <= 0)) return false;
|
|
275
|
+
if ("groupDurationTicks" in o) {
|
|
276
|
+
if (ticks === void 0) return ms !== void 0;
|
|
277
|
+
if (typeof ticks !== "number" || !Number.isInteger(ticks) || ticks <= 0) return false;
|
|
278
|
+
}
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
function resolveGroupDurationMs(timing, timescale) {
|
|
282
|
+
if (!Number.isSafeInteger(timescale) || timescale <= 0) {
|
|
283
|
+
throw new Error(
|
|
284
|
+
`[carp-catalog] resolveGroupDurationMs: timescale must be a positive safe integer Hz, got ${timescale}`
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
if (!isTrackTimingConfig(timing)) {
|
|
288
|
+
throw new Error(
|
|
289
|
+
`[carp-catalog] resolveGroupDurationMs: invalid TrackTimingConfig: ${JSON.stringify(timing)}`
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
if (timing.groupDurationTicks === void 0) {
|
|
293
|
+
return timing.groupDurationMs;
|
|
294
|
+
}
|
|
295
|
+
const durationMs = timing.groupDurationTicks / timescale * 1e3;
|
|
296
|
+
if (!Number.isFinite(durationMs) || durationMs <= 0 || durationMs > Number.MAX_SAFE_INTEGER) {
|
|
297
|
+
throw new Error(
|
|
298
|
+
`[carp-catalog] resolveGroupDurationMs: groupDurationTicks=${timing.groupDurationTicks} at timescale=${timescale} cannot be represented as a positive safe millisecond duration`
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
return durationMs;
|
|
302
|
+
}
|
|
303
|
+
var CmsfCatalogValidationError = class extends Error {
|
|
304
|
+
constructor(code, path, message) {
|
|
305
|
+
super(`[cmsf:${code}] ${path}: ${message}`);
|
|
306
|
+
this.code = code;
|
|
307
|
+
this.path = path;
|
|
308
|
+
this.name = "CmsfCatalogValidationError";
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
function catalogError(code, path, message) {
|
|
312
|
+
throw new CmsfCatalogValidationError(code, path, message);
|
|
313
|
+
}
|
|
314
|
+
function validateCmsfMmtpCatalog(value) {
|
|
315
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
316
|
+
catalogError("catalog_object", "$", "catalog must be an object");
|
|
317
|
+
}
|
|
318
|
+
const catalog = value;
|
|
319
|
+
const rawVersion = catalog["version"];
|
|
320
|
+
const normalizedVersion = typeof rawVersion === "string" ? Number.isFinite(Number(rawVersion)) ? Number(rawVersion) : rawVersion.startsWith("draft-ietf-moq-catalogformat") ? 1 : NaN : rawVersion;
|
|
321
|
+
if (!Number.isInteger(normalizedVersion) || normalizedVersion <= 0) {
|
|
322
|
+
catalogError("catalog_version", "$.version", "version must be a positive integer or a recognized format tag");
|
|
323
|
+
}
|
|
324
|
+
catalog["version"] = normalizedVersion;
|
|
325
|
+
if (!Array.isArray(catalog["tracks"])) {
|
|
326
|
+
catalogError("catalog_tracks", "$.tracks", "tracks must be an array");
|
|
327
|
+
}
|
|
328
|
+
const common = typeof catalog["commonTrackFields"] === "object" && catalog["commonTrackFields"] !== null && !Array.isArray(catalog["commonTrackFields"]) ? catalog["commonTrackFields"] : {};
|
|
329
|
+
const tracks = catalog["tracks"];
|
|
330
|
+
const trackRecords = [];
|
|
331
|
+
const effective = (track, field) => track[field] ?? common[field];
|
|
332
|
+
const positiveInteger = (input) => Number.isSafeInteger(input) && input > 0;
|
|
333
|
+
const positiveNumber = (input) => typeof input === "number" && Number.isFinite(input) && input > 0;
|
|
334
|
+
for (let index = 0; index < tracks.length; index++) {
|
|
335
|
+
const raw = tracks[index];
|
|
336
|
+
const path = `$.tracks[${index}]`;
|
|
337
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
338
|
+
catalogError("track_object", path, "track must be an object");
|
|
339
|
+
}
|
|
340
|
+
const track = raw;
|
|
341
|
+
const name = track["name"];
|
|
342
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
343
|
+
catalogError("track_name", `${path}.name`, "name must be a non-empty string");
|
|
344
|
+
}
|
|
345
|
+
trackRecords.push(track);
|
|
346
|
+
const packaging = effective(track, "packaging");
|
|
347
|
+
if (typeof packaging !== "string" || packaging.length === 0) {
|
|
348
|
+
catalogError("track_packaging", `${path}.packaging`, "packaging must be a non-empty string");
|
|
349
|
+
}
|
|
350
|
+
const trackHasIsLive = Object.prototype.hasOwnProperty.call(track, "isLive");
|
|
351
|
+
const hasIsLive = trackHasIsLive || Object.prototype.hasOwnProperty.call(common, "isLive");
|
|
352
|
+
const isLive = trackHasIsLive ? track["isLive"] : common["isLive"];
|
|
353
|
+
if (hasIsLive && typeof isLive !== "boolean") {
|
|
354
|
+
catalogError("track_is_live", `${path}.isLive`, "isLive must be a boolean");
|
|
355
|
+
}
|
|
356
|
+
track["isLive"] = isLive ?? true;
|
|
357
|
+
const selectionValue = effective(track, "selectionParams");
|
|
358
|
+
const selection = typeof selectionValue === "object" && selectionValue !== null && !Array.isArray(selectionValue) ? selectionValue : void 0;
|
|
359
|
+
const codec = selection?.["codec"] ?? effective(track, "codec");
|
|
360
|
+
if (packaging !== "timeline" && packaging !== "mediatimeline" && packaging !== "eventtimeline" && packaging !== "fec-repair" && (typeof codec !== "string" || codec.length === 0)) {
|
|
361
|
+
catalogError("track_codec", `${path}.codec`, `codec is required for packaging=${packaging}`);
|
|
362
|
+
}
|
|
363
|
+
const timescale = effective(track, "timescale");
|
|
364
|
+
const groupDurationMs = effective(track, "groupDurationMs");
|
|
365
|
+
const groupDurationTicks = effective(track, "groupDurationTicks");
|
|
366
|
+
const keyframeIntervalMs = effective(track, "keyframeIntervalMs");
|
|
367
|
+
const keyframeIntervalTicks = effective(track, "keyframeIntervalTicks");
|
|
368
|
+
if (groupDurationMs !== void 0 && !positiveInteger(groupDurationMs)) {
|
|
369
|
+
catalogError("track_group_duration_ms", `${path}.groupDurationMs`, "must be a positive integer");
|
|
370
|
+
}
|
|
371
|
+
if (groupDurationTicks !== void 0 && !positiveInteger(groupDurationTicks)) {
|
|
372
|
+
catalogError("track_group_duration_ticks", `${path}.groupDurationTicks`, "must be a positive integer");
|
|
373
|
+
}
|
|
374
|
+
if (keyframeIntervalMs !== void 0 && !positiveNumber(keyframeIntervalMs) || keyframeIntervalTicks !== void 0 && !positiveInteger(keyframeIntervalTicks)) {
|
|
375
|
+
catalogError("track_keyframe_interval", path, "keyframe interval fields must be positive numbers");
|
|
376
|
+
}
|
|
377
|
+
if (packaging === "mmtp") {
|
|
378
|
+
const mmtpMode = effective(track, "mmtpMode");
|
|
379
|
+
if (mmtpMode !== "mpu" && mmtpMode !== "mfu") {
|
|
380
|
+
catalogError("track_mmtp_mode", `${path}.mmtpMode`, "must be mpu or mfu");
|
|
381
|
+
}
|
|
382
|
+
if (!positiveInteger(timescale)) {
|
|
383
|
+
catalogError("track_timescale", `${path}.timescale`, "must be a positive integer");
|
|
384
|
+
}
|
|
385
|
+
if (groupDurationMs === void 0 && groupDurationTicks === void 0) {
|
|
386
|
+
catalogError(
|
|
387
|
+
"track_group_duration_ms",
|
|
388
|
+
path,
|
|
389
|
+
"groupDurationMs or groupDurationTicks must be a positive integer"
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
if (groupDurationTicks === void 0 && BigInt(groupDurationMs) * BigInt(timescale) % 1000n !== 0n) {
|
|
393
|
+
catalogError("track_group_duration_exact", `${path}.groupDurationMs`, "does not resolve to an exact integer tick count");
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (track["fec"] !== void 0) {
|
|
397
|
+
const fec = track["fec"];
|
|
398
|
+
if (typeof fec !== "object" || fec === null || Array.isArray(fec)) {
|
|
399
|
+
catalogError("track_fec", `${path}.fec`, "FEC must be an object");
|
|
400
|
+
}
|
|
401
|
+
const config = fec;
|
|
402
|
+
const algorithm = config["algorithm"];
|
|
403
|
+
if (algorithm !== "none" && algorithm !== "raptorq" && algorithm !== "reed-solomon") {
|
|
404
|
+
catalogError("track_fec", `${path}.fec.algorithm`, "algorithm is not supported");
|
|
405
|
+
}
|
|
406
|
+
if ("interleaveDepth" in config || "interleaveMs" in config) {
|
|
407
|
+
catalogError("track_fec", `${path}.fec`, "interleaveDepthMs is the only supported interleave field");
|
|
408
|
+
}
|
|
409
|
+
if (config["interleaveDepthMs"] !== void 0 && !positiveInteger(config["interleaveDepthMs"])) {
|
|
410
|
+
catalogError("track_fec", `${path}.fec.interleaveDepthMs`, "must be a positive integer");
|
|
411
|
+
}
|
|
412
|
+
if (algorithm !== "none") {
|
|
413
|
+
for (const field of ["sourceSymbols", "repairSymbols", "symbolSize"]) {
|
|
414
|
+
if (!positiveInteger(config[field])) {
|
|
415
|
+
catalogError("track_fec", `${path}.fec.${field}`, "must be a positive integer");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (typeof config["repairTrack"] !== "string" || config["repairTrack"].length === 0) {
|
|
419
|
+
catalogError("track_fec", `${path}.fec.repairTrack`, "must be a non-empty string");
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
for (let index = 0; index < trackRecords.length; index++) {
|
|
425
|
+
const track = trackRecords[index];
|
|
426
|
+
const fec = track["fec"];
|
|
427
|
+
if (!fec || fec["algorithm"] === "none") continue;
|
|
428
|
+
const repairTrack = fec["repairTrack"];
|
|
429
|
+
const target = trackRecords.find((candidate) => candidate["name"] === repairTrack);
|
|
430
|
+
if (!target || effective(target, "packaging") !== "fec-repair") {
|
|
431
|
+
catalogError("track_repair_track", `$.tracks[${index}].fec.repairTrack`, `unknown FEC repair track ${JSON.stringify(repairTrack)}`);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
const switchingSets = /* @__PURE__ */ new Map();
|
|
435
|
+
for (let index = 0; index < trackRecords.length; index++) {
|
|
436
|
+
const track = trackRecords[index];
|
|
437
|
+
if (effective(track, "packaging") !== "mmtp") continue;
|
|
438
|
+
const altGroup = effective(track, "altGroup");
|
|
439
|
+
if (!Number.isSafeInteger(altGroup)) continue;
|
|
440
|
+
const timescale = BigInt(effective(track, "timescale"));
|
|
441
|
+
const durationTicks = effective(track, "groupDurationTicks");
|
|
442
|
+
const ticks = durationTicks !== void 0 ? BigInt(durationTicks) : BigInt(effective(track, "groupDurationMs")) * timescale / 1000n;
|
|
443
|
+
const anchor = switchingSets.get(altGroup);
|
|
444
|
+
if (anchor && ticks * anchor.timescale !== anchor.ticks * timescale) {
|
|
445
|
+
catalogError("track_switching_set", `$.tracks[${index}]`, `group duration does not match ${JSON.stringify(anchor.name)} in altGroup ${altGroup}`);
|
|
446
|
+
}
|
|
447
|
+
if (!anchor) switchingSets.set(altGroup, { name: track["name"], ticks, timescale });
|
|
448
|
+
}
|
|
449
|
+
const multicast = catalog["multicast"];
|
|
450
|
+
if (typeof multicast === "object" && multicast !== null && !Array.isArray(multicast)) {
|
|
451
|
+
const endpoints = multicast["endpoints"];
|
|
452
|
+
if (Array.isArray(endpoints)) {
|
|
453
|
+
for (let endpointIndex = 0; endpointIndex < endpoints.length; endpointIndex++) {
|
|
454
|
+
const endpoint = endpoints[endpointIndex];
|
|
455
|
+
if (typeof endpoint !== "object" || endpoint === null || Array.isArray(endpoint)) continue;
|
|
456
|
+
const refs = endpoint["tracks"];
|
|
457
|
+
if (!Array.isArray(refs)) continue;
|
|
458
|
+
const packetIds = /* @__PURE__ */ new Map();
|
|
459
|
+
for (let refIndex = 0; refIndex < refs.length; refIndex++) {
|
|
460
|
+
const ref = refs[refIndex];
|
|
461
|
+
if (typeof ref !== "object" || ref === null || Array.isArray(ref)) continue;
|
|
462
|
+
const trackRef = ref;
|
|
463
|
+
const refPath = `$.multicast.endpoints[${endpointIndex}].tracks[${refIndex}]`;
|
|
464
|
+
const name = trackRef["name"];
|
|
465
|
+
if (typeof name !== "string" || !trackRecords.some((track) => track["name"] === name)) {
|
|
466
|
+
catalogError("multicast_track", `${refPath}.name`, `unknown catalog track ${JSON.stringify(name)}`);
|
|
467
|
+
}
|
|
468
|
+
const packetId = trackRef["packetId"];
|
|
469
|
+
if (!Number.isSafeInteger(packetId) || packetId < 0 || packetId > 65535) {
|
|
470
|
+
catalogError("multicast_packet_id", `${refPath}.packetId`, "packetId must be an integer from 0 to 65535");
|
|
471
|
+
}
|
|
472
|
+
const previous = packetIds.get(packetId);
|
|
473
|
+
if (previous !== void 0) {
|
|
474
|
+
catalogError("multicast_packet_id", `${refPath}.packetId`, `packetId is already assigned to ${JSON.stringify(previous)}`);
|
|
475
|
+
}
|
|
476
|
+
packetIds.set(packetId, name);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
try {
|
|
482
|
+
resolveMulticastAuthCatalog(catalog);
|
|
483
|
+
} catch (error) {
|
|
484
|
+
catalogError(
|
|
485
|
+
"multicast_auth",
|
|
486
|
+
"$.multicast.auth",
|
|
487
|
+
error instanceof Error ? error.message : "invalid multicast.auth v2 block"
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
return catalog;
|
|
491
|
+
}
|
|
492
|
+
function resolveGroupDurationTicks(timing, timescale) {
|
|
493
|
+
if (!Number.isFinite(timescale) || !Number.isInteger(timescale) || timescale <= 0) {
|
|
494
|
+
throw new Error(
|
|
495
|
+
`[carp-catalog] resolveGroupDurationTicks: timescale must be a positive integer Hz, got ${timescale}`
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
if (!isTrackTimingConfig(timing)) {
|
|
499
|
+
throw new Error(
|
|
500
|
+
`[carp-catalog] resolveGroupDurationTicks: invalid TrackTimingConfig: ${JSON.stringify(timing)}`
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
if (timing.groupDurationTicks !== void 0) {
|
|
504
|
+
return timing.groupDurationTicks;
|
|
505
|
+
}
|
|
506
|
+
if (timing.groupDurationMs === void 0) {
|
|
507
|
+
throw new Error(
|
|
508
|
+
"[carp-catalog] resolveGroupDurationTicks: groupDurationMs is required when groupDurationTicks is absent"
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
const product = timing.groupDurationMs * timescale;
|
|
512
|
+
if (product % 1e3 !== 0) {
|
|
513
|
+
throw new Error(
|
|
514
|
+
`[carp-catalog] resolveGroupDurationTicks: groupDurationMs=${timing.groupDurationMs} at timescale=${timescale} produces non-integer ticks (${product / 1e3}); publisher must use groupDurationTicks override (mmt-00 \xA74.4.4)`
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
return product / 1e3;
|
|
518
|
+
}
|
|
519
|
+
function validateSwitchingSetTiming(tracks) {
|
|
520
|
+
if (tracks.length === 0) return { ok: true };
|
|
521
|
+
const ticksByTrack = tracks.map((t) => ({
|
|
522
|
+
name: t.name,
|
|
523
|
+
ticks: resolveGroupDurationTicks(t.timing, t.timescale),
|
|
524
|
+
timescale: t.timescale
|
|
525
|
+
}));
|
|
526
|
+
const expectedTicks = ticksByTrack[0].ticks;
|
|
527
|
+
const expectedTimescale = ticksByTrack[0].timescale;
|
|
528
|
+
const mismatches = ticksByTrack.slice(1).filter(
|
|
529
|
+
(t) => BigInt(t.ticks) * BigInt(expectedTimescale) !== BigInt(expectedTicks) * BigInt(t.timescale)
|
|
530
|
+
).map(({ name, ticks }) => ({ name, ticks }));
|
|
531
|
+
if (mismatches.length === 0) return { ok: true };
|
|
532
|
+
return { ok: false, expectedTicks, mismatches };
|
|
533
|
+
}
|
|
534
|
+
export {
|
|
535
|
+
CmsfCatalogValidationError,
|
|
536
|
+
hasSwitchingSetRole,
|
|
537
|
+
isFecCatalogConfig,
|
|
538
|
+
isMulticastCatalogConfig,
|
|
539
|
+
isMulticastEndpoint,
|
|
540
|
+
isMulticastTrackObject,
|
|
541
|
+
isTrackTimingConfig,
|
|
542
|
+
parseTrackRole,
|
|
543
|
+
resolveGroupDurationMs,
|
|
544
|
+
resolveGroupDurationTicks,
|
|
545
|
+
validateCmsfMmtpCatalog,
|
|
546
|
+
validateSwitchingSet,
|
|
547
|
+
validateSwitchingSetTiming
|
|
548
|
+
};
|
|
549
|
+
//# sourceMappingURL=carp-catalog.js.map
|