@blockcast/mmt-container 0.1.0 → 0.3.0-main.0bde85f7082f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +524 -0
- package/dist/.build-stamp +0 -0
- package/dist/__tests__/test-utils.d.ts +71 -0
- package/dist/__tests__/test-utils.d.ts.map +1 -0
- package/dist/align.d.ts +152 -0
- package/dist/align.d.ts.map +1 -0
- package/dist/align.js +88 -0
- package/dist/align.js.map +7 -0
- package/dist/audio-init-parser.d.ts +66 -0
- package/dist/audio-init-parser.d.ts.map +1 -0
- package/dist/audio-init-parser.js +118 -0
- package/dist/audio-init-parser.js.map +7 -0
- package/dist/audio-ring-buffer.d.ts +50 -0
- package/dist/audio-ring-buffer.d.ts.map +1 -0
- package/dist/audio-ring-buffer.js +80 -0
- package/dist/audio-ring-buffer.js.map +7 -0
- package/dist/authored-timing.d.ts +32 -0
- package/dist/authored-timing.d.ts.map +1 -0
- package/dist/authored-timing.js +32 -0
- package/dist/authored-timing.js.map +7 -0
- package/dist/block-policy.d.ts +314 -0
- package/dist/block-policy.d.ts.map +1 -0
- package/dist/block-policy.js +466 -0
- package/dist/block-policy.js.map +7 -0
- package/dist/browser-runtime.js +26549 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +429 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +985 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +275 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +702 -0
- package/dist/catalog-fec-params.js.map +7 -0
- package/dist/catalog-network-source.d.ts +42 -0
- package/dist/catalog-network-source.d.ts.map +1 -0
- package/dist/catalog-network-source.js +47 -0
- package/dist/catalog-network-source.js.map +7 -0
- package/dist/catalog-validator.d.ts +18 -0
- package/dist/catalog-validator.d.ts.map +1 -0
- package/dist/catalog-validator.js +7747 -0
- package/dist/catalog-validator.js.map +7 -0
- package/dist/cmaf-block-assembler.d.ts +285 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1966 -0
- package/dist/cmaf-block-assembler.js.map +7 -0
- package/dist/cmaf-group-batcher.d.ts +38 -0
- package/dist/cmaf-group-batcher.d.ts.map +1 -0
- package/dist/cmaf-group-batcher.js +176 -0
- package/dist/cmaf-group-batcher.js.map +7 -0
- package/dist/cmcd-producer.d.ts +104 -0
- package/dist/cmcd-producer.d.ts.map +1 -0
- package/dist/cmcd-producer.js +183 -0
- package/dist/cmcd-producer.js.map +7 -0
- package/dist/codec-utils.d.ts +384 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1546 -0
- package/dist/codec-utils.js.map +7 -0
- package/dist/conceal-timeline.d.ts +146 -0
- package/dist/conceal-timeline.d.ts.map +1 -0
- package/dist/conceal-timeline.js +137 -0
- package/dist/conceal-timeline.js.map +7 -0
- package/dist/delivery-gap.d.ts +75 -0
- package/dist/delivery-gap.d.ts.map +1 -0
- package/dist/delivery-gap.js +88 -0
- package/dist/delivery-gap.js.map +7 -0
- package/dist/duplicate-ledger.d.ts +197 -0
- package/dist/duplicate-ledger.d.ts.map +1 -0
- package/dist/duplicate-ledger.js +226 -0
- package/dist/duplicate-ledger.js.map +7 -0
- package/dist/fec-codec.d.ts +32 -0
- package/dist/fec-codec.d.ts.map +1 -0
- package/dist/fec-codec.js +47 -0
- package/dist/fec-codec.js.map +7 -0
- package/dist/fec-manager.d.ts +583 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +3899 -0
- package/dist/fec-manager.js.map +7 -0
- package/dist/fec-starvation-detector.d.ts +59 -0
- package/dist/fec-starvation-detector.d.ts.map +1 -0
- package/dist/fec-starvation-detector.js +60 -0
- package/dist/fec-starvation-detector.js.map +7 -0
- package/dist/fec-state.d.ts +131 -0
- package/dist/fec-state.d.ts.map +1 -0
- package/dist/fec-state.js +87 -0
- package/dist/fec-state.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +94 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +673 -0
- package/dist/fec-worker-setup.js.map +7 -0
- package/dist/fmp4-completion.d.ts +30 -0
- package/dist/fmp4-completion.d.ts.map +1 -0
- package/dist/fmp4-completion.js +21 -0
- package/dist/fmp4-completion.js.map +7 -0
- package/dist/fmp4-reader.d.ts +37 -0
- package/dist/fmp4-reader.d.ts.map +1 -0
- package/dist/fmp4-reader.js +100 -0
- package/dist/fmp4-reader.js.map +7 -0
- package/dist/index.d.ts +44 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +460 -14
- package/dist/index.js.map +7 -1
- package/dist/iso-block-locator.d.ts +118 -0
- package/dist/iso-block-locator.d.ts.map +1 -0
- package/dist/iso-block-locator.js +289 -0
- package/dist/iso-block-locator.js.map +7 -0
- package/dist/iso-bmff-timing.d.ts +78 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -0
- package/dist/iso-bmff-timing.js +593 -0
- package/dist/iso-bmff-timing.js.map +7 -0
- package/dist/loc.d.ts +70 -75
- package/dist/loc.d.ts.map +1 -1
- package/dist/loc.js +106 -192
- package/dist/loc.js.map +7 -1
- package/dist/manifest-auth-plan.d.ts +30 -0
- package/dist/manifest-auth-plan.d.ts.map +1 -0
- package/dist/manifest-auth-plan.js +1266 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +262 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +584 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +313 -9
- package/dist/mfu-reassembler.d.ts.map +1 -1
- package/dist/mfu-reassembler.js +3051 -285
- package/dist/mfu-reassembler.js.map +7 -1
- package/dist/mfu-reassembly-policy.d.ts +24 -0
- package/dist/mfu-reassembly-policy.d.ts.map +1 -0
- package/dist/mfu-reassembly-policy.js +99 -0
- package/dist/mfu-reassembly-policy.js.map +7 -0
- package/dist/mmtp-container-parser.d.ts +568 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +6580 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +9616 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +138 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +6814 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +679 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +11278 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +187 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +716 -0
- package/dist/mmtp-to-cmaf.js.map +7 -0
- package/dist/multicast-auth-catalog.d.ts +115 -0
- package/dist/multicast-auth-catalog.d.ts.map +1 -0
- package/dist/multicast-auth-catalog.js +202 -0
- package/dist/multicast-auth-catalog.js.map +7 -0
- package/dist/multicast-input.d.ts +141 -0
- package/dist/multicast-input.d.ts.map +1 -0
- package/dist/multicast-input.js +390 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +669 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +19101 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +271 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +2264 -0
- package/dist/multicast-transport.js.map +7 -0
- package/dist/multicast-unwrap.d.ts +57 -0
- package/dist/multicast-unwrap.d.ts.map +1 -0
- package/dist/multicast-unwrap.js +418 -0
- package/dist/multicast-unwrap.js.map +7 -0
- package/dist/no-modules.d.ts +10 -0
- package/dist/no-modules.d.ts.map +1 -0
- package/dist/no-modules.js +9491 -0
- package/dist/no-modules.js.map +7 -0
- package/dist/phase14-catalog-override.d.ts +126 -0
- package/dist/phase14-catalog-override.d.ts.map +1 -0
- package/dist/phase14-catalog-override.js +155 -0
- package/dist/phase14-catalog-override.js.map +7 -0
- package/dist/repair-fetch.d.ts +270 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +381 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/repair-layers.d.ts +158 -0
- package/dist/repair-layers.d.ts.map +1 -0
- package/dist/repair-layers.js +344 -0
- package/dist/repair-layers.js.map +7 -0
- package/dist/sample-combiner.d.ts +212 -0
- package/dist/sample-combiner.d.ts.map +1 -0
- package/dist/sample-combiner.js +595 -0
- package/dist/sample-combiner.js.map +7 -0
- package/dist/signaling.d.ts +29 -0
- package/dist/signaling.d.ts.map +1 -0
- package/dist/signaling.js +572 -0
- package/dist/signaling.js.map +7 -0
- package/dist/source-auth.d.ts +2 -0
- package/dist/source-auth.d.ts.map +1 -0
- package/dist/source-auth.js +1209 -0
- package/dist/source-auth.js.map +7 -0
- package/dist/switching-set-alignment.d.ts +61 -0
- package/dist/switching-set-alignment.d.ts.map +1 -0
- package/dist/switching-set-alignment.js +70 -0
- package/dist/switching-set-alignment.js.map +7 -0
- package/dist/timestamp-codec.d.ts +34 -0
- package/dist/timestamp-codec.d.ts.map +1 -0
- package/dist/timestamp-codec.js +473 -0
- package/dist/timestamp-codec.js.map +7 -0
- package/dist/track-pipeline-setup.d.ts +83 -0
- package/dist/track-pipeline-setup.d.ts.map +1 -0
- package/dist/track-pipeline-setup.js +291 -0
- package/dist/track-pipeline-setup.js.map +7 -0
- package/dist/track-pipeline.d.ts +121 -0
- package/dist/track-pipeline.d.ts.map +1 -0
- package/dist/track-pipeline.js +209 -0
- package/dist/track-pipeline.js.map +7 -0
- package/dist/track-session.d.ts +414 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +754 -0
- package/dist/track-session.js.map +7 -0
- package/dist/transport-pool.d.ts +69 -0
- package/dist/transport-pool.d.ts.map +1 -0
- package/dist/transport-pool.js +74 -0
- package/dist/transport-pool.js.map +7 -0
- package/dist/wasm-mfu-reassembler.d.ts +97 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +2133 -0
- package/dist/wasm-mfu-reassembler.js.map +7 -0
- package/dist/wasm-mmtp-container-parser.d.ts +10 -0
- package/dist/wasm-mmtp-container-parser.d.ts.map +1 -0
- package/dist/wasm-mmtp-container-parser.js +6834 -0
- package/dist/wasm-mmtp-container-parser.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/README.md +223 -0
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +38 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +78 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +93 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +346 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +380 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +11 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +14 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +859 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts +10 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js +8 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +20 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +370 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +104 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +181 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +194 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +62 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +9 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js +13 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/package.json +59 -0
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +93 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +392 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +399 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1502 -0
- package/node_modules/@blockcast/fec-worker/src/index.ts +35 -0
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +589 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +222 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +209 -0
- package/node_modules/@blockcast/fec-worker/src/transfer.ts +12 -0
- package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-base/README.md +134 -0
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/README.md +271 -0
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +296 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +106 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +288 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +46 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +96 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +33 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +57 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +205 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +240 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +20 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +258 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +382 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +41 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +81 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +170 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +134 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/package.json +79 -0
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +371 -0
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +439 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +127 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +68 -0
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +310 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +94 -0
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +463 -0
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -0
- package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +195 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +28 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +128 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +37 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +179 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +99 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +492 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/package.json +45 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +171 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +3 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +230 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +669 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +521 -0
- package/node_modules/@noble/hashes/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_assert.js +18 -0
- package/node_modules/@noble/hashes/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_blake.js +50 -0
- package/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_md.js +162 -0
- package/node_modules/@noble/hashes/_md.js.map +1 -0
- package/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_u64.js +90 -0
- package/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/argon2.js +401 -0
- package/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake1.js +459 -0
- package/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +420 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2b.js +14 -0
- package/node_modules/@noble/hashes/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2s.js +24 -0
- package/node_modules/@noble/hashes/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake3.js +255 -0
- package/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/crypto.js +5 -0
- package/node_modules/@noble/hashes/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.js +18 -0
- package/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/eskdf.js +166 -0
- package/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.js +15 -0
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.js +45 -0
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.js +155 -0
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.js +67 -0
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.js +392 -0
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.js +452 -0
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.js +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.js +21 -0
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.js +251 -0
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.js +160 -0
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.js +82 -0
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.js +86 -0
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/esm/index.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/index.js +33 -0
- package/node_modules/@noble/hashes/esm/index.js.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/esm/package.json +10 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.js +228 -0
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.js +11 -0
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.js +375 -0
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.js +20 -0
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js +393 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.js +234 -0
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.js +26 -0
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.js +281 -0
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hkdf.js +88 -0
- package/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hmac.js +91 -0
- package/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/index.d.ts +1 -0
- package/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/index.js +33 -0
- package/node_modules/@noble/hashes/index.js.map +1 -0
- package/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/legacy.js +287 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +266 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/pbkdf2.js +101 -0
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.js +16 -0
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/scrypt.js +232 -0
- package/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha1.js +14 -0
- package/node_modules/@noble/hashes/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha2.js +384 -0
- package/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha256.js +23 -0
- package/node_modules/@noble/hashes/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.js +402 -0
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3.js +239 -0
- package/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha512.js +29 -0
- package/node_modules/@noble/hashes/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/src/_assert.ts +22 -0
- package/node_modules/@noble/hashes/src/_blake.ts +50 -0
- package/node_modules/@noble/hashes/src/_md.ts +176 -0
- package/node_modules/@noble/hashes/src/_u64.ts +91 -0
- package/node_modules/@noble/hashes/src/argon2.ts +497 -0
- package/node_modules/@noble/hashes/src/blake1.ts +534 -0
- package/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +10 -0
- package/node_modules/@noble/hashes/src/blake2s.ts +20 -0
- package/node_modules/@noble/hashes/src/blake3.ts +272 -0
- package/node_modules/@noble/hashes/src/crypto.ts +9 -0
- package/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +187 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +88 -0
- package/node_modules/@noble/hashes/src/hmac.ts +94 -0
- package/node_modules/@noble/hashes/src/index.ts +31 -0
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +122 -0
- package/node_modules/@noble/hashes/src/ripemd160.ts +12 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +257 -0
- package/node_modules/@noble/hashes/src/sha1.ts +10 -0
- package/node_modules/@noble/hashes/src/sha2.ts +402 -0
- package/node_modules/@noble/hashes/src/sha256.ts +24 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +499 -0
- package/node_modules/@noble/hashes/src/sha3.ts +258 -0
- package/node_modules/@noble/hashes/src/sha512.ts +34 -0
- package/node_modules/@noble/hashes/src/utils.ts +395 -0
- package/node_modules/@noble/hashes/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/utils.js +313 -0
- package/node_modules/@noble/hashes/utils.js.map +1 -0
- package/package.json +179 -8
- package/schemas/catalog.schema.json +357 -0
- package/src/align.ts +239 -0
- package/src/audio-init-parser.ts +189 -0
- package/src/audio-ring-buffer.ts +120 -0
- package/src/authored-timing.ts +63 -0
- package/src/block-policy.ts +903 -0
- package/src/carp-catalog.ts +1065 -0
- package/src/catalog-fec-params.ts +729 -0
- package/src/catalog-network-source.ts +74 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1255 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +329 -0
- package/src/codec-utils.ts +1984 -0
- package/src/conceal-timeline.ts +293 -0
- package/src/delivery-gap.ts +147 -0
- package/src/duplicate-ledger.ts +372 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +4298 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-state.ts +219 -0
- package/src/fec-worker-setup.ts +283 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +590 -21
- package/src/iso-block-locator.ts +329 -0
- package/src/iso-bmff-timing.ts +813 -0
- package/src/loc.ts +128 -154
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +841 -0
- package/src/mfu-reassembler.ts +3480 -155
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +2380 -0
- package/src/mmtp-decode-pipeline.ts +406 -0
- package/src/mmtp-router.ts +4860 -0
- package/src/mmtp-to-cmaf.ts +977 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +793 -0
- package/src/multicast-manager.ts +2783 -0
- package/src/multicast-transport.ts +1058 -0
- package/src/multicast-unwrap.ts +132 -0
- package/src/no-modules.ts +21 -0
- package/src/phase14-catalog-override.ts +336 -0
- package/src/repair-fetch.ts +772 -0
- package/src/repair-layers.ts +533 -0
- package/src/sample-combiner.ts +938 -0
- package/src/signaling.ts +78 -0
- package/src/source-auth.ts +1 -0
- package/src/switching-set-alignment.ts +109 -0
- package/src/timestamp-codec.ts +265 -0
- package/src/track-pipeline-setup.ts +205 -0
- package/src/track-pipeline.ts +332 -0
- package/src/track-session.ts +1010 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +405 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +106 -0
- package/test-vectors/catalog/negative/archive-origin-with-path.json +33 -0
- package/test-vectors/catalog/negative/archive-unknown-field.json +34 -0
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +51 -0
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +52 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +28 -0
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +33 -0
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +31 -0
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +32 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +34 -0
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +24 -0
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +33 -0
- package/test-vectors/catalog/negative/legacy-selection-params.json +15 -0
- package/test-vectors/catalog/negative/media-track-repair-layer.json +16 -0
- package/test-vectors/catalog/negative/missing-mmtp-fields.json +12 -0
- package/test-vectors/catalog/negative/multicast-auth-padded-key.json +37 -0
- package/test-vectors/catalog/negative/multicast-auth-reused-track-format.json +53 -0
- package/test-vectors/catalog/negative/multicast-auth-trailing-pad-bits.json +37 -0
- package/test-vectors/catalog/negative/multicast-endpoint-missing-protocol-and-source.json +24 -0
- package/test-vectors/catalog/negative/multicast-network-source-empty.json +44 -0
- package/test-vectors/catalog/negative/multicast-packet-id-signaling.json +26 -0
- package/test-vectors/catalog/negative/network-source-object.json +25 -0
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +24 -0
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +27 -0
- package/test-vectors/catalog/negative/repair-track-legacy-shape.json +19 -0
- package/test-vectors/catalog/negative/track-role-empty.json +16 -0
- package/test-vectors/catalog/negative/track-role-non-string.json +16 -0
- package/test-vectors/catalog/positive/archive-origin.json +34 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +52 -0
- package/test-vectors/catalog/positive/fec-layered-repair.json +106 -0
- package/test-vectors/catalog/positive/fec-multicast.json +52 -0
- package/test-vectors/catalog/positive/flat-av.json +30 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +55 -0
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +43 -0
- package/test-vectors/catalog/positive/ticks-and-mixed-timescales.json +39 -0
- package/test-vectors/catalog/positive/track-role.json +49 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1/catalog.json +65 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1.archive.sha256 +1 -0
- package/test-vectors/catalog-multicast-auth-v1.json +26 -0
- package/test-vectors/catalog-validation.json +732 -0
- package/test-vectors/catalog-validator-public-api.mjs +25 -0
- package/test-vectors/generate-source-auth-fixture.mjs +114 -0
- package/test-vectors/hevc-x265-repeat-headers-v1.json +40 -0
- package/test-vectors/source-auth-v1.json +61 -0
- package/test-vectors/source-contiguity-v1.json +131 -0
- package/test-vectors/subsample-placement-v1.json +230 -0
- package/dist/mmtp.d.ts +0 -73
- package/dist/mmtp.d.ts.map +0 -1
- package/dist/mmtp.js +0 -210
- package/dist/mmtp.js.map +0 -1
- package/src/mmtp.ts +0 -277
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blockcast/fec-worker — Shred (Reed-Solomon) Worker Protocol
|
|
3
|
+
*
|
|
4
|
+
* A sibling codec to the RaptorQ/MMTP worker (`fec-worker.ts`). Solana-style
|
|
5
|
+
* shred streams carry a different FEC payload identity than MMTP source/repair
|
|
6
|
+
* symbols — a shred is `(slot, fecSetIndex, localIndex, numData, numCoding,
|
|
7
|
+
* isCoding, lastInSet)`, not a flat `ssId` — so they need their own command
|
|
8
|
+
* shape. The transport harness (Worker spawn, onmessage plumbing, zero-copy
|
|
9
|
+
* `toOwnedArrayBuffer` transfers) is shared; the decoder WASM is not.
|
|
10
|
+
*
|
|
11
|
+
* The worker owns the batch-drain: the consumer transfers a WebTransport
|
|
12
|
+
* `datagrams.readable` (or any `ReadableStream<Uint8Array>` of raw shred
|
|
13
|
+
* frames) into the Worker via {@link ShredWorkerCommand} `attachStream`, and
|
|
14
|
+
* the read loop + wire parse + `ShredFecBuffer.add_shred` all run off the main
|
|
15
|
+
* thread. Only recovered FEC sets (and coalesced stats) cross back. A
|
|
16
|
+
* `feedShred` command covers sources that have already demuxed the shred bytes
|
|
17
|
+
* on the main thread (e.g. a moqtail OBJECT_DATAGRAM callback, or the IWA
|
|
18
|
+
* multicast bridge).
|
|
19
|
+
*
|
|
20
|
+
* Types here are importable from both main thread and Worker contexts.
|
|
21
|
+
*/
|
|
22
|
+
// --- Wire format ------------------------------------------------------------
|
|
23
|
+
/**
|
|
24
|
+
* Wire header layout the worker parses. Mirrors the deployed shred player's
|
|
25
|
+
* `onShredBytes` exactly (libmmt shred-forwarder `emit_frame`) so the off-thread
|
|
26
|
+
* path is bit-identical to the proven on-thread path.
|
|
27
|
+
*
|
|
28
|
+
* v3 (28-byte header):
|
|
29
|
+
* [0] version u8 (3 or 4; any other version is dropped, not misframed)
|
|
30
|
+
* [1-8] slot u64 LE
|
|
31
|
+
* [9-12] fecSetIndex u32 LE
|
|
32
|
+
* [13-16] localIndex u32 LE (data: 0..numData; coding: numData+position)
|
|
33
|
+
* [17] flags u8 (bit0 = DATA_COMPLETE, bit1 = IS_CODING_SHRED)
|
|
34
|
+
* [18] numData u8 (coding shreds only; 0 on data — WASM infers)
|
|
35
|
+
* [19] numCoding u8 (coding shreds only; 0 on data)
|
|
36
|
+
* [20-27] sendTsUs u64 LE (µs since epoch, 0 when unstamped)
|
|
37
|
+
* [28+] erasureShard (equal length across the FEC set)
|
|
38
|
+
*
|
|
39
|
+
* DATA_COMPLETE (last data shred in the set) is passed to `add_shred` as its
|
|
40
|
+
* `lastInSet` argument — the WASM uses it to infer numData for a set that
|
|
41
|
+
* received only data shreds (no coding).
|
|
42
|
+
*
|
|
43
|
+
* v4 has the same 28-byte header, but its body is the full canonical Agave
|
|
44
|
+
* shred (signature, headers, erasure shard, chained Merkle root, proof, and
|
|
45
|
+
* the retransmitter signature on resigned variants) — the form a validator TVU
|
|
46
|
+
* accepts (BLO-41383). The worker recovers the exact v3 erasure-shard view
|
|
47
|
+
* from it with the forwarder's own `erasure_shard()` slice, so both versions
|
|
48
|
+
* reach `add_shred` byte-identical:
|
|
49
|
+
* variant = shred[64]; data 0x9_/0xb_, coding 0x6_/0x7_ (chained merkle;
|
|
50
|
+
* 0xb_/0x7_ resigned), must agree with IS_CODING_SHRED
|
|
51
|
+
* length = 1203 (data) / 1228 (coding), exactly
|
|
52
|
+
* shard start = 64 (data: after the signature) / 89 (coding headers)
|
|
53
|
+
* shard end = length - (32 root + 20 * (variant & 0x0f) proof
|
|
54
|
+
* + 64 retransmitter signature if resigned)
|
|
55
|
+
*/
|
|
56
|
+
export const SHRED_WIRE_VERSION = 3;
|
|
57
|
+
/** Wire version whose body is the full canonical shred (see above). */
|
|
58
|
+
export const SHRED_WIRE_VERSION_FULL = 4;
|
|
59
|
+
export const SHRED_HEADER_LEN = 28;
|
|
60
|
+
export const SHRED_FLAG_DATA_COMPLETE = 0x01;
|
|
61
|
+
export const SHRED_FLAG_IS_CODING = 0x02;
|
|
62
|
+
//# sourceMappingURL=shred-worker-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shred-worker-types.js","sourceRoot":"","sources":["../src/shred-worker-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a fresh ArrayBuffer containing exactly the bytes in `view`.
|
|
3
|
+
*
|
|
4
|
+
* Worker outputs must not transfer buffers that might be owned by a WASM
|
|
5
|
+
* binding or by a larger shared packet. A fresh JS-owned buffer gives
|
|
6
|
+
* postMessage() exclusive ownership without detaching unrelated memory.
|
|
7
|
+
*/
|
|
8
|
+
export declare function toOwnedArrayBuffer(view: Uint8Array): ArrayBuffer;
|
|
9
|
+
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../src/transfer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAIhE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a fresh ArrayBuffer containing exactly the bytes in `view`.
|
|
3
|
+
*
|
|
4
|
+
* Worker outputs must not transfer buffers that might be owned by a WASM
|
|
5
|
+
* binding or by a larger shared packet. A fresh JS-owned buffer gives
|
|
6
|
+
* postMessage() exclusive ownership without detaching unrelated memory.
|
|
7
|
+
*/
|
|
8
|
+
export function toOwnedArrayBuffer(view) {
|
|
9
|
+
const copy = new Uint8Array(view.byteLength);
|
|
10
|
+
copy.set(view);
|
|
11
|
+
return copy.buffer;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=transfer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.js","sourceRoot":"","sources":["../src/transfer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IAClD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACf,OAAO,IAAI,CAAC,MAAM,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blockcast/fec-worker",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Worker-per-track FEC decode with zero-copy ArrayBuffer transfer and ALTA auth plumbing",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./worker": {
|
|
14
|
+
"import": "./dist/fec-worker.js"
|
|
15
|
+
},
|
|
16
|
+
"./shred-worker": {
|
|
17
|
+
"import": "./dist/shred-fec-worker.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"src",
|
|
23
|
+
"!src/**/*.test.ts",
|
|
24
|
+
"!src/**/*.spec.ts",
|
|
25
|
+
"!src/**/__tests__",
|
|
26
|
+
"!dist/**/*.test.*",
|
|
27
|
+
"!dist/**/*.spec.*"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc && node build.mjs",
|
|
31
|
+
"dev": "tsc --watch",
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"test:watch": "vitest"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@blockcast/mmt-alta-parse": "^0.3.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"esbuild": "^0.28.0",
|
|
42
|
+
"typescript": "^5.3.0",
|
|
43
|
+
"vitest": "^1.0.0"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"fec",
|
|
47
|
+
"worker",
|
|
48
|
+
"raptorq",
|
|
49
|
+
"zero-copy",
|
|
50
|
+
"transferable",
|
|
51
|
+
"alta"
|
|
52
|
+
],
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/Blockcast/libmmt.git",
|
|
57
|
+
"directory": "packages/fec-worker"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order of K-stride FEC blocks on the 32-bit SS_ID (ISO/IEC 23008-1:2023
|
|
3
|
+
* C.5.2; RFC 1982 serial arithmetic, SERIAL_BITS = 32; BLO-35597 iso:5).
|
|
4
|
+
*
|
|
5
|
+
* Block `sbn` starts at SS_ID `sbn * K mod 2^32`, and blocks are ordered by
|
|
6
|
+
* serial comparison of their starts. That is identical to comparing SBNs
|
|
7
|
+
* with < for any two blocks less than 2^31 SS_IDs apart, so only the order
|
|
8
|
+
* across the SS_ID wrap changes.
|
|
9
|
+
*
|
|
10
|
+
* The canonical helpers are @blockcast/mmt-base `kStrideBlockPrecedes` /
|
|
11
|
+
* `kStrideBlocksBehind`. This worker bundle does not depend on mmt-base, so
|
|
12
|
+
* it carries these two, and block-order.test.ts pins them to the same wrap
|
|
13
|
+
* vectors.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const SPAN = 0x1_0000_0000;
|
|
17
|
+
const HALF = 0x8000_0000;
|
|
18
|
+
|
|
19
|
+
function blockStart(sbn: number, k: number): number {
|
|
20
|
+
// sbn < 2^32 and k <= 56 403 keep the product below 2^48: exact.
|
|
21
|
+
return (sbn * k) % SPAN;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Forward SS_ID distance from block `a`'s start to block `b`'s, or null when `a` does not precede `b`. */
|
|
25
|
+
function precedingDistance(a: number, b: number, k: number): number | null {
|
|
26
|
+
const distance = (blockStart(b, k) - blockStart(a, k) + SPAN) % SPAN;
|
|
27
|
+
return distance !== 0 && distance < HALF ? distance : null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Whether block `a` precedes block `b`. */
|
|
31
|
+
export function blockPrecedes(a: number, b: number, k: number): boolean {
|
|
32
|
+
return precedingDistance(a, b, k) !== null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* How many blocks `a` lies behind `b`: 0 unless `a` precedes `b`. Across the
|
|
37
|
+
* wrap the short pre-wrap block (2^32 mod K symbols) counts as one block.
|
|
38
|
+
*/
|
|
39
|
+
export function blocksBehind(a: number, b: number, k: number): number {
|
|
40
|
+
const distance = precedingDistance(a, b, k);
|
|
41
|
+
return distance === null ? 0 : Math.ceil(distance / k);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// --- iso-ssbg1-v1 (ISO/IEC 23008-1 C.3.3 ssbg_mode1; C.5.2/C.5.3) ---------
|
|
45
|
+
//
|
|
46
|
+
// Under the ISO profile SS_ID increments by one per FEC source packet and
|
|
47
|
+
// wraps at 2^32, and a block is the SSB_length consecutive SS_IDs
|
|
48
|
+
// `[SS_Start, SS_Start + SSB_length)`. Blocks are keyed and ordered by their
|
|
49
|
+
// SS_Start, never by an SBN derived from K: the catalog K is only the maximum
|
|
50
|
+
// block length (kMax). The canonical helpers are @blockcast/mmt-base
|
|
51
|
+
// `serial32Distance` / `serial32Precedes` / `isoBlockContains` /
|
|
52
|
+
// `isoBlocksBehindLowerBound`; this bundle carries its own copies (it does not
|
|
53
|
+
// depend on mmt-base), and block-order.test.ts pins them to the same vectors.
|
|
54
|
+
|
|
55
|
+
/** Forward RFC 1982 distance from `from` to `to` on the 32-bit SS_ID, in 0..2^32-1. */
|
|
56
|
+
export function serialDistance(from: number, to: number): number {
|
|
57
|
+
return (to - from + SPAN) % SPAN;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Whether `a` precedes `b` under RFC 1982 serial comparison (SERIAL_BITS = 32). */
|
|
61
|
+
export function serialPrecedes(a: number, b: number): boolean {
|
|
62
|
+
const distance = serialDistance(a, b);
|
|
63
|
+
return distance !== 0 && distance < HALF;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Whether `ssId` is one of the `ssbLength` consecutive SS_IDs starting at `ssStart`, mod 2^32. */
|
|
67
|
+
export function isoBlockContains(ssStart: number, ssbLength: number, ssId: number): boolean {
|
|
68
|
+
return serialDistance(ssStart, ssId) < ssbLength;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Whether two SS_ID ranges `[start, start + length)` share any SS_ID, mod 2^32. */
|
|
72
|
+
export function isoBlocksOverlap(
|
|
73
|
+
aStart: number,
|
|
74
|
+
aLength: number,
|
|
75
|
+
bStart: number,
|
|
76
|
+
bLength: number,
|
|
77
|
+
): boolean {
|
|
78
|
+
return isoBlockContains(aStart, aLength, bStart) || isoBlockContains(bStart, bLength, aStart);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* How many blocks SS_ID `a` lies behind SS_ID `b` (0 unless `a` precedes `b`):
|
|
83
|
+
* a lower bound, because an iso-ssbg1-v1 block holds at most `kMax` source
|
|
84
|
+
* symbols, so `n * kMax` SS_IDs always span at least `n` blocks. This is the
|
|
85
|
+
* one interleave-horizon metric every ISO receiver layer shares (decoder
|
|
86
|
+
* retention, worker retirement, ordered-relay settlement).
|
|
87
|
+
*/
|
|
88
|
+
export function isoBlocksBehind(a: number, b: number, kMax: number): number {
|
|
89
|
+
if (!Number.isSafeInteger(kMax) || kMax <= 0) {
|
|
90
|
+
throw new Error(`iso-ssbg1-v1 block horizon needs a positive maximum K (got ${kMax})`);
|
|
91
|
+
}
|
|
92
|
+
return serialPrecedes(a, b) ? Math.floor(serialDistance(a, b) / kMax) : 0;
|
|
93
|
+
}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blockcast/fec-worker — Main-Thread Client
|
|
3
|
+
*
|
|
4
|
+
* Wraps one Worker per track instance. Provides typed API for the
|
|
5
|
+
* FecWorkerCommand/FecWorkerEvent protocol with zero-copy ArrayBuffer transfers.
|
|
6
|
+
*
|
|
7
|
+
* Constructor accepts either a URL (creates Worker internally) or a pre-created
|
|
8
|
+
* Worker instance (for testing via constructor injection).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
FecWorkerCommand,
|
|
13
|
+
FecSymbolCommand,
|
|
14
|
+
FecWorkerEvent,
|
|
15
|
+
FecTrackConfig,
|
|
16
|
+
FecTrackStats,
|
|
17
|
+
FecBlockSnapshot,
|
|
18
|
+
FrameMeta,
|
|
19
|
+
FecWorkerErrorCode,
|
|
20
|
+
} from "./fec-worker-types.js";
|
|
21
|
+
|
|
22
|
+
export class FecWorkerClient {
|
|
23
|
+
readonly #worker: Worker;
|
|
24
|
+
#onFrame: ((data: ArrayBuffer, meta: FrameMeta) => void) | null = null;
|
|
25
|
+
#onSnapshot: ((stats: FecTrackStats) => void) | null = null;
|
|
26
|
+
#onBlockUpdate: ((block: FecBlockSnapshot) => void) | null = null;
|
|
27
|
+
#onCleanupComplete: ((sbn: number) => void) | null = null;
|
|
28
|
+
#onError: ((message: string, code?: FecWorkerErrorCode) => void) | null = null;
|
|
29
|
+
#cleanupInFlight: Set<number> | null = null;
|
|
30
|
+
#queuedCleanupSbns = new Set<number>();
|
|
31
|
+
#pendingResets = 0;
|
|
32
|
+
#resetFailed = false;
|
|
33
|
+
#disposed = false;
|
|
34
|
+
// Symbols fed during the current task, sent as one feedSymbols message
|
|
35
|
+
// when the task's microtasks run (BLO-36599). A packet stream delivers many
|
|
36
|
+
// symbols per task, and each postMessage is a structured-clone round trip
|
|
37
|
+
// on the page thread; the batch boundary is the task, not a size or timer.
|
|
38
|
+
#pendingSymbols: FecSymbolCommand[] = [];
|
|
39
|
+
#pendingTransfer: Transferable[] = [];
|
|
40
|
+
#flushQueued = false;
|
|
41
|
+
// Batching starts only once the Worker announced it accepts feedSymbols.
|
|
42
|
+
#batchSymbols = false;
|
|
43
|
+
// The Worker posts blockUpdate events only to a client that subscribed,
|
|
44
|
+
// which this client does once a callback is registered and the Worker
|
|
45
|
+
// announced the command (BLO-36599).
|
|
46
|
+
#blockUpdatesAnnounced = false;
|
|
47
|
+
#blockUpdatesSubscribed = false;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create a FecWorkerClient.
|
|
51
|
+
* @param workerOrUrl - Either a Worker instance (for testing) or a URL to create one
|
|
52
|
+
*/
|
|
53
|
+
constructor(workerOrUrl: Worker | URL) {
|
|
54
|
+
if (workerOrUrl instanceof URL) {
|
|
55
|
+
this.#worker = new Worker(workerOrUrl, { type: "module" });
|
|
56
|
+
} else {
|
|
57
|
+
this.#worker = workerOrUrl;
|
|
58
|
+
}
|
|
59
|
+
this.#worker.onmessage = (e: MessageEvent<FecWorkerEvent>) =>
|
|
60
|
+
this.#handleEvent(e.data);
|
|
61
|
+
this.#worker.onerror = (e) => {
|
|
62
|
+
this.#onError?.(formatWorkerError(e), "worker-runtime");
|
|
63
|
+
};
|
|
64
|
+
this.#worker.onmessageerror = (e) => {
|
|
65
|
+
this.#onError?.(formatWorkerMessageError(e), "worker-message");
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Configure the Worker with FEC parameters and WASM module.
|
|
71
|
+
* wasmModule is transferred (not neutered — WebAssembly.Module is shareable).
|
|
72
|
+
* altaPublicKey is PKCS#8 SPKI DER bytes (self-describing — algorithm detected from OID).
|
|
73
|
+
* Transferred (detached from sender).
|
|
74
|
+
* altaWasmModule is structured-cloneable (NOT transferable — do not add to transfer list).
|
|
75
|
+
*/
|
|
76
|
+
configure(
|
|
77
|
+
config: FecTrackConfig,
|
|
78
|
+
wasmModule: WebAssembly.Module,
|
|
79
|
+
altaPublicKey?: ArrayBuffer,
|
|
80
|
+
altaWasmModule?: WebAssembly.Module,
|
|
81
|
+
): void {
|
|
82
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] disposed");
|
|
83
|
+
this.#flushSymbols();
|
|
84
|
+
const cmd: FecWorkerCommand = {
|
|
85
|
+
type: "configure",
|
|
86
|
+
config,
|
|
87
|
+
wasmModule,
|
|
88
|
+
altaPublicKey,
|
|
89
|
+
altaWasmModule,
|
|
90
|
+
};
|
|
91
|
+
// WebAssembly.Module is structured-cloneable, NOT transferable.
|
|
92
|
+
// Pass it in the message body (Chrome clones it automatically).
|
|
93
|
+
// Only ArrayBuffers (like altaPublicKey) go in the transfer list.
|
|
94
|
+
const transferList: Transferable[] = [];
|
|
95
|
+
if (altaPublicKey) transferList.push(altaPublicKey);
|
|
96
|
+
// altaWasmModule is structured-cloneable — NOT added to transferList
|
|
97
|
+
this.#worker.postMessage(cmd, transferList);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Feed a source symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
102
|
+
* Caller must not access data after this call — it is transferred with the
|
|
103
|
+
* task's symbol batch, before any later command of this client.
|
|
104
|
+
*
|
|
105
|
+
* Optional `alta` carries the detached ALTA authenticator bytes and the
|
|
106
|
+
* byte offset in `data` where the signed payload ends. The auth buffer is
|
|
107
|
+
* transferred zero-copy alongside `data`. Use {@link getMmtpAltaTrailer}
|
|
108
|
+
* upstream (mmtp-router) to extract it from the wire packet.
|
|
109
|
+
*/
|
|
110
|
+
feedSource(
|
|
111
|
+
ssId: number,
|
|
112
|
+
data: ArrayBuffer,
|
|
113
|
+
ts: number,
|
|
114
|
+
alta?: { auth: ArrayBuffer; payloadEnd: number },
|
|
115
|
+
): void {
|
|
116
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] feedSource on a disposed client");
|
|
117
|
+
if (alta) {
|
|
118
|
+
this.#queueSymbol(
|
|
119
|
+
{
|
|
120
|
+
type: "feedSource",
|
|
121
|
+
ssId,
|
|
122
|
+
data,
|
|
123
|
+
ts,
|
|
124
|
+
altaAuth: alta.auth,
|
|
125
|
+
altaPayloadEnd: alta.payloadEnd,
|
|
126
|
+
},
|
|
127
|
+
data,
|
|
128
|
+
alta.auth,
|
|
129
|
+
);
|
|
130
|
+
} else {
|
|
131
|
+
this.#queueSymbol({ type: "feedSource", ssId, data, ts }, data);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Feed a repair symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
137
|
+
* Caller must not access data after this call — it is detached.
|
|
138
|
+
*
|
|
139
|
+
* Carries the wire-level Repair FEC Payload ID fields (ISO 23008-1 §C.5.3):
|
|
140
|
+
* - ssStart: SS_ID of first source symbol in the block (= SBN * configured K
|
|
141
|
+
* under `k-padded-v1`; any uint32, the block key, under `iso-ssbg1-v1`)
|
|
142
|
+
* - ssbLength: authored source-symbol count (1..configured K)
|
|
143
|
+
* - rsId: repair symbol index within the block
|
|
144
|
+
*/
|
|
145
|
+
feedRepair(
|
|
146
|
+
ssStart: number,
|
|
147
|
+
ssbLength: number,
|
|
148
|
+
rsId: number,
|
|
149
|
+
data: ArrayBuffer,
|
|
150
|
+
ts: number,
|
|
151
|
+
): void {
|
|
152
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] feedRepair on a disposed client");
|
|
153
|
+
this.#queueSymbol({ type: "feedRepair", ssStart, ssbLength, rsId, data, ts }, data);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#queueSymbol(symbol: FecSymbolCommand, data: ArrayBuffer, auth?: ArrayBuffer): void {
|
|
157
|
+
if (!this.#batchSymbols) {
|
|
158
|
+
this.#worker.postMessage(symbol, auth ? [data, auth] : [data]);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.#pendingSymbols.push(symbol);
|
|
162
|
+
this.#pendingTransfer.push(data);
|
|
163
|
+
if (auth) this.#pendingTransfer.push(auth);
|
|
164
|
+
if (this.#flushQueued) return;
|
|
165
|
+
this.#flushQueued = true;
|
|
166
|
+
queueMicrotask(() => {
|
|
167
|
+
this.#flushQueued = false;
|
|
168
|
+
this.#flushSymbols();
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Send the symbols fed so far. Every other command calls this first, so a
|
|
174
|
+
* cleanup barrier, reset or signature still follows all earlier symbols.
|
|
175
|
+
*/
|
|
176
|
+
#flushSymbols(): void {
|
|
177
|
+
if (this.#pendingSymbols.length === 0 || this.#disposed) return;
|
|
178
|
+
const symbols = this.#pendingSymbols;
|
|
179
|
+
const transfer = this.#pendingTransfer;
|
|
180
|
+
this.#pendingSymbols = [];
|
|
181
|
+
this.#pendingTransfer = [];
|
|
182
|
+
this.#worker.postMessage(
|
|
183
|
+
{ type: "feedSymbols", symbols } satisfies FecWorkerCommand,
|
|
184
|
+
transfer,
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Submit relay block signature for verification. sig and hash are transferred.
|
|
190
|
+
*/
|
|
191
|
+
relayBlockSig(sbn: number, sig: ArrayBuffer, hash: ArrayBuffer): void {
|
|
192
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] relayBlockSig on a disposed client");
|
|
193
|
+
this.#flushSymbols();
|
|
194
|
+
this.#worker.postMessage(
|
|
195
|
+
{ type: "relayBlockSig", sbn, sig, hash } satisfies FecWorkerCommand,
|
|
196
|
+
[sig, hash],
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Trigger cleanup after a block's inactivity deadline. `currentSbn` is the
|
|
202
|
+
* block key: the SBN under `k-padded-v1`, the SS_Start under `iso-ssbg1-v1`.
|
|
203
|
+
*
|
|
204
|
+
* While one queue-drain barrier is in flight, later SBNs are coalesced into
|
|
205
|
+
* the next command without losing their individual acknowledgement identity.
|
|
206
|
+
*/
|
|
207
|
+
cleanup(currentSbn: number): void {
|
|
208
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] cleanup on a disposed client");
|
|
209
|
+
if (
|
|
210
|
+
!Number.isInteger(currentSbn) ||
|
|
211
|
+
currentSbn < 0 ||
|
|
212
|
+
currentSbn > 0xffff_ffff
|
|
213
|
+
) {
|
|
214
|
+
throw new Error("[FecWorkerClient] cleanup: SBN must be a uint32");
|
|
215
|
+
}
|
|
216
|
+
if (this.#cleanupInFlight) {
|
|
217
|
+
this.#queuedCleanupSbns.add(currentSbn);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
this.#postCleanup(new Set([currentSbn]));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Reset this track's decoder epoch while preserving Worker configuration. */
|
|
224
|
+
reset(): void {
|
|
225
|
+
if (this.#disposed) throw new Error("[FecWorkerClient] reset on a disposed client");
|
|
226
|
+
this.#flushSymbols();
|
|
227
|
+
this.#pendingResets++;
|
|
228
|
+
this.#cleanupInFlight = null;
|
|
229
|
+
this.#queuedCleanupSbns.clear();
|
|
230
|
+
this.#worker.postMessage({ type: "reset" } satisfies FecWorkerCommand);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
#postCleanup(sbns: Set<number>): void {
|
|
234
|
+
// The cleanup is a queue-drain barrier: every symbol fed before it is
|
|
235
|
+
// posted must reach the Worker first.
|
|
236
|
+
this.#flushSymbols();
|
|
237
|
+
this.#cleanupInFlight = sbns;
|
|
238
|
+
const orderedSbns = [...sbns].sort((a, b) => a - b);
|
|
239
|
+
this.#worker.postMessage(
|
|
240
|
+
{ type: "cleanup", sbns: orderedSbns } satisfies FecWorkerCommand,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** Register callback for decoded/recovered frames (FEC-03). */
|
|
245
|
+
onFrame(cb: (data: ArrayBuffer, meta: FrameMeta) => void): void {
|
|
246
|
+
this.#onFrame = cb;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Register callback for periodic stats snapshots (FEC-04). */
|
|
250
|
+
onSnapshot(cb: (stats: FecTrackStats) => void): void {
|
|
251
|
+
this.#onSnapshot = cb;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Register callback for individual block state changes. The Worker posts
|
|
256
|
+
* them only once asked, so registering subscribes (after the Worker
|
|
257
|
+
* announces `subscribeBlockUpdates`). An older Worker that does not
|
|
258
|
+
* announce it posts them unasked.
|
|
259
|
+
*/
|
|
260
|
+
onBlockUpdate(cb: (block: FecBlockSnapshot) => void): void {
|
|
261
|
+
this.#onBlockUpdate = cb;
|
|
262
|
+
this.#subscribeBlockUpdates();
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
#subscribeBlockUpdates(): void {
|
|
266
|
+
if (
|
|
267
|
+
this.#disposed ||
|
|
268
|
+
this.#blockUpdatesSubscribed ||
|
|
269
|
+
!this.#blockUpdatesAnnounced ||
|
|
270
|
+
!this.#onBlockUpdate
|
|
271
|
+
) return;
|
|
272
|
+
this.#blockUpdatesSubscribed = true;
|
|
273
|
+
this.#worker.postMessage(
|
|
274
|
+
{ type: "subscribeBlockUpdates" } satisfies FecWorkerCommand,
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Register callback fired after the Worker drains all commands queued before cleanup. */
|
|
279
|
+
onCleanupComplete(cb: (sbn: number) => void): void {
|
|
280
|
+
this.#onCleanupComplete = cb;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** Register callback for Worker errors. */
|
|
284
|
+
onError(cb: (message: string, code?: FecWorkerErrorCode) => void): void {
|
|
285
|
+
this.#onError = cb;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* True once dispose() ran. A disposed client cannot decode, fill, or
|
|
290
|
+
* acknowledge anything, so routing symbols to it discards them; every
|
|
291
|
+
* command method (feedSource, feedRepair, relayBlockSig, cleanup, reset)
|
|
292
|
+
* throws rather than pretend otherwise. Callers check this first.
|
|
293
|
+
*/
|
|
294
|
+
get disposed(): boolean {
|
|
295
|
+
return this.#disposed;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Dispose the Worker. Sends dispose command then terminates.
|
|
300
|
+
* Idempotent — safe to call multiple times.
|
|
301
|
+
*/
|
|
302
|
+
dispose(): void {
|
|
303
|
+
if (this.#disposed) return;
|
|
304
|
+
this.#disposed = true;
|
|
305
|
+
// A terminated Worker decodes nothing; symbols still batched are dropped.
|
|
306
|
+
this.#pendingSymbols = [];
|
|
307
|
+
this.#pendingTransfer = [];
|
|
308
|
+
this.#cleanupInFlight = null;
|
|
309
|
+
this.#queuedCleanupSbns.clear();
|
|
310
|
+
this.#worker.postMessage({ type: "dispose" } satisfies FecWorkerCommand);
|
|
311
|
+
this.#worker.terminate();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
#handleEvent(event: FecWorkerEvent): void {
|
|
315
|
+
if (event.type === "capabilities") {
|
|
316
|
+
if (Array.isArray(event.commands) && event.commands.includes("feedSymbols")) {
|
|
317
|
+
this.#batchSymbols = true;
|
|
318
|
+
}
|
|
319
|
+
if (Array.isArray(event.commands) && event.commands.includes("subscribeBlockUpdates")) {
|
|
320
|
+
this.#blockUpdatesAnnounced = true;
|
|
321
|
+
this.#subscribeBlockUpdates();
|
|
322
|
+
}
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (event.type === "resetComplete") {
|
|
326
|
+
this.#pendingResets = Math.max(0, this.#pendingResets - 1);
|
|
327
|
+
this.#resetFailed = false;
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (event.type === "error") {
|
|
331
|
+
if (event.code === "reset-failed") {
|
|
332
|
+
this.#pendingResets = Math.max(0, this.#pendingResets - 1);
|
|
333
|
+
this.#resetFailed = true;
|
|
334
|
+
}
|
|
335
|
+
if (event.code) this.#onError?.(event.message, event.code);
|
|
336
|
+
else this.#onError?.(event.message);
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
if (this.#pendingResets > 0 || this.#resetFailed) return;
|
|
340
|
+
switch (event.type) {
|
|
341
|
+
case "frame":
|
|
342
|
+
this.#onFrame?.(event.data, event.meta);
|
|
343
|
+
break;
|
|
344
|
+
case "snapshot":
|
|
345
|
+
this.#onSnapshot?.(event.stats);
|
|
346
|
+
break;
|
|
347
|
+
case "blockUpdate":
|
|
348
|
+
this.#onBlockUpdate?.(event.block);
|
|
349
|
+
break;
|
|
350
|
+
case "cleanupComplete":
|
|
351
|
+
for (const sbn of event.sbns) {
|
|
352
|
+
this.#onCleanupComplete?.(sbn);
|
|
353
|
+
}
|
|
354
|
+
this.#cleanupInFlight = null;
|
|
355
|
+
if (this.#queuedCleanupSbns.size > 0) {
|
|
356
|
+
const next = this.#queuedCleanupSbns;
|
|
357
|
+
this.#queuedCleanupSbns = new Set();
|
|
358
|
+
this.#postCleanup(next);
|
|
359
|
+
}
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function formatWorkerError(event: ErrorEvent): string {
|
|
366
|
+
const parts = ["Worker error"];
|
|
367
|
+
if (event.message) parts.push(event.message);
|
|
368
|
+
if (event.filename) {
|
|
369
|
+
const location = [event.filename];
|
|
370
|
+
if (event.lineno) location.push(String(event.lineno));
|
|
371
|
+
if (event.colno) location.push(String(event.colno));
|
|
372
|
+
parts.push(`at ${location.join(":")}`);
|
|
373
|
+
}
|
|
374
|
+
if (event.error instanceof Error) {
|
|
375
|
+
if (event.error.message && event.error.message !== event.message) {
|
|
376
|
+
parts.push(event.error.message);
|
|
377
|
+
}
|
|
378
|
+
if (event.error.stack) parts.push(event.error.stack);
|
|
379
|
+
} else if (event.error != null) {
|
|
380
|
+
parts.push(String(event.error));
|
|
381
|
+
}
|
|
382
|
+
return parts.join(": ");
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function formatWorkerMessageError(event: MessageEvent): string {
|
|
386
|
+
const data = event.data;
|
|
387
|
+
const detail =
|
|
388
|
+
data == null ? "" :
|
|
389
|
+
data instanceof Error ? `: ${data.message}` :
|
|
390
|
+
`: ${Object.prototype.toString.call(data)}`;
|
|
391
|
+
return `Worker messageerror: failed to deserialize worker message${detail}`;
|
|
392
|
+
}
|