@blockcast/mmt-container 0.4.0 → 0.4.1-main.22841c1f0a2d
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 +37 -21
- package/dist/align.d.ts +24 -18
- package/dist/align.d.ts.map +1 -1
- package/dist/align.js +23 -4
- package/dist/align.js.map +2 -2
- package/dist/browser-runtime.js +2037 -881
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +76 -39
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +321 -205
- package/dist/carp-catalog.js.map +3 -3
- package/dist/catalog-fec-params.d.ts +12 -4
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +40 -17
- package/dist/catalog-fec-params.js.map +3 -3
- package/dist/catalog-network-source.d.ts +28 -7
- package/dist/catalog-network-source.d.ts.map +1 -1
- package/dist/catalog-network-source.js +21 -1
- package/dist/catalog-network-source.js.map +2 -2
- package/dist/catalog-validator.d.ts +4 -3
- package/dist/catalog-validator.d.ts.map +1 -1
- package/dist/catalog-validator.js +0 -29
- package/dist/catalog-validator.js.map +3 -3
- package/dist/cmcd-producer.d.ts +13 -1
- package/dist/cmcd-producer.d.ts.map +1 -1
- package/dist/cmcd-producer.js +14 -0
- package/dist/cmcd-producer.js.map +2 -2
- package/dist/delivery-catalog.js +98 -234
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/fec-manager.d.ts +108 -1
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +452 -66
- package/dist/fec-manager.js.map +4 -4
- package/dist/fec-state.d.ts +2 -1
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +18 -3
- package/dist/fec-state.js.map +3 -3
- package/dist/fec-worker-setup.d.ts +10 -0
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +15 -4
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/held-layer-admission.d.ts +58 -0
- package/dist/held-layer-admission.d.ts.map +1 -0
- package/dist/held-layer-admission.js +105 -0
- package/dist/held-layer-admission.js.map +7 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.d.ts +39 -1
- package/dist/iso-block-locator.d.ts.map +1 -1
- package/dist/iso-block-locator.js +109 -17
- package/dist/iso-block-locator.js.map +3 -3
- package/dist/mfu-reassembler.js +21 -13
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +93 -22
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +3677 -1213
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +93 -22
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-fec-session.d.ts +192 -0
- package/dist/mmtp-fec-session.d.ts.map +1 -0
- package/dist/mmtp-fec-session.js +640 -0
- package/dist/mmtp-fec-session.js.map +7 -0
- package/dist/mmtp-router.d.ts +69 -32
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +296 -192
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-auth-catalog.d.ts +86 -92
- package/dist/multicast-auth-catalog.d.ts.map +1 -1
- package/dist/multicast-auth-catalog.js +313 -124
- package/dist/multicast-auth-catalog.js.map +3 -3
- package/dist/multicast-input.d.ts +31 -8
- package/dist/multicast-input.d.ts.map +1 -1
- package/dist/multicast-input.js +299 -35
- package/dist/multicast-input.js.map +3 -3
- package/dist/multicast-manager.d.ts +97 -11
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +1022 -527
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +12 -2
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +108 -238
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +21 -13
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.d.ts +5 -3
- package/dist/no-modules.d.ts.map +1 -1
- package/dist/no-modules.js +3625 -1194
- package/dist/no-modules.js.map +4 -4
- package/dist/phase14-catalog-override.d.ts +1 -1
- package/dist/phase14-catalog-override.d.ts.map +1 -1
- package/dist/phase14-catalog-override.js +2 -2
- package/dist/phase14-catalog-override.js.map +2 -2
- package/dist/repair-fetch.d.ts +81 -6
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +156 -31
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layers.d.ts +2 -0
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +19 -2
- package/dist/repair-layers.js.map +2 -2
- package/dist/sample-combiner.d.ts +7 -1
- package/dist/sample-combiner.d.ts.map +1 -1
- package/dist/sample-combiner.js +14 -2
- package/dist/sample-combiner.js.map +2 -2
- package/dist/signaling.d.ts +2 -2
- package/dist/signaling.d.ts.map +1 -1
- package/dist/signaling.js +3 -3
- package/dist/signaling.js.map +2 -2
- package/dist/switching-set-alignment.d.ts +1 -1
- package/dist/switching-set-alignment.js.map +1 -1
- package/dist/timestamp-codec.js +21 -13
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +1 -1
- package/dist/wasm-mmtp-container-parser.js +93 -22
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +6 -18
- package/schemas/catalog.schema.json +133 -38
- package/src/align.ts +52 -21
- package/src/carp-catalog.ts +188 -68
- package/src/catalog-fec-params.ts +28 -3
- package/src/catalog-network-source.ts +49 -7
- package/src/catalog-validator.ts +4 -11
- package/src/cmcd-producer.ts +23 -1
- package/src/fec-manager.ts +366 -63
- package/src/fec-state.ts +11 -4
- package/src/fec-worker-setup.ts +30 -2
- package/src/held-layer-admission.ts +161 -0
- package/src/index.ts +32 -19
- package/src/iso-block-locator.ts +110 -7
- package/src/mmtp-container-parser.ts +75 -7
- package/src/mmtp-fec-session.ts +606 -0
- package/src/mmtp-router.ts +301 -240
- package/src/multicast-auth-catalog.ts +134 -238
- package/src/multicast-input.ts +148 -124
- package/src/multicast-manager.ts +271 -40
- package/src/multicast-transport.ts +17 -3
- package/src/no-modules.ts +8 -7
- package/src/phase14-catalog-override.ts +3 -3
- package/src/repair-fetch.ts +283 -39
- package/src/repair-layers.ts +22 -2
- package/src/sample-combiner.ts +15 -2
- package/src/signaling.ts +2 -2
- package/src/switching-set-alignment.ts +1 -1
- package/test-vectors/align.json +108 -32
- package/test-vectors/bc-provenance-v2.json +1526 -0
- package/test-vectors/catalog/README.md +71 -4
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-retired.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +1 -1
- package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-k-plus-p-over-255.json +39 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-overlay-over-255.json +40 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
- package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
- package/test-vectors/catalog/negative/init-data-inline-without-data.json +22 -0
- package/test-vectors/catalog/negative/mmtp-mode-mpu.json +15 -0
- package/test-vectors/catalog/negative/multicast-amt-dns-without-relay.json +37 -0
- package/test-vectors/catalog/negative/multicast-amt-driad-with-relay.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-asm-missing-sender-address.json +77 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-first-epoch.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-kid.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-auth-without-object-auth.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-auth.json +49 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-bandwidth.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-port-equals-port.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-timer-out-of-range.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-above-max.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-below-min.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-root-dotted-key.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-sender-address-on-ssm.json +57 -0
- package/test-vectors/catalog/negative/multicast-auth-version-1.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-3.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-missing.json +55 -0
- package/test-vectors/catalog/negative/multicast-endpoint-foreign-namespace-track.json +44 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-amt.json +38 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-atsc3.json +38 -0
- package/test-vectors/catalog/negative/presentation-anchor-unsafe.json +16 -0
- package/test-vectors/catalog/positive/fec-algorithm-unimplemented.json +29 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +1 -1
- package/test-vectors/catalog/positive/fec-multicast.json +1 -1
- package/test-vectors/catalog/positive/fec-reed-solomon-layered.json +50 -0
- package/test-vectors/catalog/positive/mmt01-12-1-init-ref-anchor.json +29 -0
- package/test-vectors/catalog/positive/multicast-amt-discovery-omitted.json +37 -0
- package/test-vectors/catalog/positive/multicast-amt-dns-relay.json +38 -0
- package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +3 -3
- package/test-vectors/catalog/{negative/multicast-endpoint-missing-protocol-and-source.json → positive/multicast-asm-unprotected.json} +10 -5
- package/test-vectors/catalog/positive/multicast-auth-asm-sender.json +78 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +39 -38
- package/test-vectors/catalog/positive/multicast-draft01-4-1-example.json +81 -0
- package/test-vectors/catalog/positive/multicast-draft01-7-2-6-example.json +70 -0
- package/test-vectors/catalog/positive/presentation-anchor-negative.json +27 -0
- package/test-vectors/catalog/section-codes.json +31 -1
- package/test-vectors/catalog-multicast-auth-v1.json +38 -20
- package/test-vectors/catalog-validation.json +101 -5
- package/test-vectors/catalog-validator-public-api.mjs +14 -9
- package/test-vectors/generate-bc-provenance-v2.mjs +252 -0
- package/dist/fec-codec.d.ts +0 -32
- package/dist/fec-codec.d.ts.map +0 -1
- package/dist/fec-codec.js +0 -47
- package/dist/fec-codec.js.map +0 -7
- package/dist/manifest-auth-plan.d.ts +0 -30
- package/dist/manifest-auth-plan.d.ts.map +0 -1
- package/dist/manifest-auth-plan.js +0 -1266
- package/dist/manifest-auth-plan.js.map +0 -7
- package/dist/source-auth.d.ts +0 -2
- package/dist/source-auth.d.ts.map +0 -1
- package/dist/source-auth.js +0 -1209
- package/dist/source-auth.js.map +0 -7
- package/src/fec-codec.ts +0 -61
- package/src/manifest-auth-plan.ts +0 -107
- package/src/source-auth.ts +0 -1
- package/test-vectors/generate-source-auth-fixture.mjs +0 -114
- package/test-vectors/source-auth-v1.json +0 -61
package/src/multicast-input.ts
CHANGED
|
@@ -8,7 +8,8 @@ declare const process: { env: Record<string, string | undefined> } | undefined;
|
|
|
8
8
|
/**
|
|
9
9
|
* Multicast catalog input contract — validator + builder.
|
|
10
10
|
*
|
|
11
|
-
* Per draft-ramadan-moq-multicast-
|
|
11
|
+
* Per draft-ramadan-moq-multicast-01 §3 + §4.1 + §7.2.6
|
|
12
|
+
* (Blockcast/moqcast-draft@fd962fd73d21ed281b60219c11ea61cc9e4e91c4), the publisher (FFmpeg,
|
|
12
13
|
* cast bridge, GStreamer, OBS-bridge) populates `multicast.endpoints[]`
|
|
13
14
|
* in the catalog when its output includes a UDP multicast destination.
|
|
14
15
|
*
|
|
@@ -22,17 +23,23 @@ declare const process: { env: Record<string, string | undefined> } | undefined;
|
|
|
22
23
|
* perform.
|
|
23
24
|
*
|
|
24
25
|
* Validation invariants (per codex review of BLO-3323 v2):
|
|
25
|
-
* -
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
26
|
+
* - The emitted mode is the one `sourceAddress` selects (present: SSM,
|
|
27
|
+
* absent: ASM), restated as `protocol`. Input `protocol` "ssm" requires
|
|
28
|
+
* `sourceAddress`, "asm" forbids it.
|
|
29
|
+
* - Input `protocol` "amt" / "atsc3" names a bearer, which draft -01
|
|
30
|
+
* carries as a `networkSource` entry, not a protocol: the `networkSource`
|
|
31
|
+
* entries of that type MOVE onto each endpoint that named it (so they
|
|
32
|
+
* no longer apply to native endpoints) and the protocol is never emitted.
|
|
33
|
+
* An entry of that type is REQUIRED: an AMT one's `relay` only for
|
|
34
|
+
* `discovery: "manual"` ("driad" resolves it at runtime), an ATSC3 one
|
|
35
|
+
* carries the only tuning information an ATSC3 receiver has. A
|
|
36
|
+
* per-endpoint `relayAddress` input is LIFTED into the AMT entry.
|
|
37
|
+
* - Native "ssm" | "asm" requires no `networkSource` entry: a native join
|
|
38
|
+
* describes no alternate bearer (BLO-37926).
|
|
39
|
+
* - `auth` (catalog) and endpoint `auth` follow draft -01 7.2.6 through the
|
|
40
|
+
* shared `multicastCatalogIssues` of `@blockcast/mmt-base`: all or
|
|
41
|
+
* nothing, `senderAddress` on ASM only, bandwidth required, and
|
|
42
|
+
* `(S, G, manifestPort)` clear of every port of its `(S, G)`.
|
|
36
43
|
* - groupAddress is a valid IPv4 multicast group (224.0.0.0/4)
|
|
37
44
|
* or IPv6 multicast group (ff00::/8)
|
|
38
45
|
* - SSM groupAddress MUST be in 232.0.0.0/8 (IPv4) or ff3x::/32 (IPv6),
|
|
@@ -46,23 +53,31 @@ declare const process: { env: Record<string, string | undefined> } | undefined;
|
|
|
46
53
|
* `signaling_packet_id`. The kind string matches cast's
|
|
47
54
|
* `multicast_input.rs` so the two ports report the same reason.
|
|
48
55
|
* - packetIds unique within an endpoint
|
|
49
|
-
* - (
|
|
56
|
+
* - (S, groupAddress, port) tuple unique across endpoints, S being
|
|
57
|
+
* sourceAddress (SSM), auth.senderAddress (protected ASM) or absent
|
|
50
58
|
* - bandwidth (if present) > 0
|
|
51
59
|
* - validUntil (if present) is a positive unix-ms timestamp
|
|
52
60
|
*
|
|
53
|
-
* @see draft-ramadan-moq-multicast-
|
|
61
|
+
* @see draft-ramadan-moq-multicast-01 §4.1, §7.2.6
|
|
54
62
|
* @see .planning/drafts/blo-3323-multicast-catalog-source-of-truth.md
|
|
55
63
|
*/
|
|
56
64
|
|
|
57
|
-
import { MMTP_PACKET_ID_MAX, MMTP_SIGNALING_PACKET_ID } from "@blockcast/mmt-base";
|
|
65
|
+
import { MMTP_PACKET_ID_MAX, MMTP_SIGNALING_PACKET_ID, multicastCatalogIssues } from "@blockcast/mmt-base";
|
|
58
66
|
import {
|
|
59
67
|
type AmtDiscovery,
|
|
60
68
|
type MulticastCatalogConfig,
|
|
61
69
|
type MulticastEndpoint,
|
|
62
|
-
type MulticastProtocol,
|
|
63
70
|
type MulticastTrackObject,
|
|
64
71
|
type NetworkSource,
|
|
65
72
|
} from "./carp-catalog.js";
|
|
73
|
+
import type { EndpointAuthConfig, MulticastAuthConfig } from "./multicast-auth-catalog.js";
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Publisher input protocol. "ssm" / "asm" restate the mode `sourceAddress`
|
|
77
|
+
* selects; "amt" / "atsc3" (draft -00) name a bearer and are mapped onto an
|
|
78
|
+
* endpoint-level `networkSource`, never emitted.
|
|
79
|
+
*/
|
|
80
|
+
export type MulticastInputProtocol = "ssm" | "asm" | "amt" | "atsc3";
|
|
66
81
|
|
|
67
82
|
/**
|
|
68
83
|
* Strict typed input for one multicast endpoint. The publisher provides
|
|
@@ -70,7 +85,7 @@ import {
|
|
|
70
85
|
* lifts it into a `MulticastEndpoint` ready to embed in the catalog.
|
|
71
86
|
*/
|
|
72
87
|
export interface MulticastEndpointInput {
|
|
73
|
-
readonly protocol:
|
|
88
|
+
readonly protocol: MulticastInputProtocol;
|
|
74
89
|
readonly sourceAddress?: string;
|
|
75
90
|
readonly groupAddress: string;
|
|
76
91
|
readonly port: number;
|
|
@@ -88,8 +103,10 @@ export interface MulticastEndpointInput {
|
|
|
88
103
|
* Prefer declaring `MulticastInput.networkSource` directly.
|
|
89
104
|
*/
|
|
90
105
|
readonly relayAddress?: string;
|
|
91
|
-
/** Aggregate bandwidth in bits per second. RECOMMENDED per draft §4.1
|
|
106
|
+
/** Aggregate bandwidth in bits per second. RECOMMENDED per draft §4.1; REQUIRED with `auth`. */
|
|
92
107
|
readonly bandwidth?: number;
|
|
108
|
+
/** Protected-flow parameters (draft -01 7.2.6); REQUIRED exactly when `MulticastInput.auth` is set. */
|
|
109
|
+
readonly auth?: EndpointAuthConfig;
|
|
93
110
|
}
|
|
94
111
|
|
|
95
112
|
/**
|
|
@@ -112,7 +129,9 @@ export interface MulticastInput {
|
|
|
112
129
|
*/
|
|
113
130
|
readonly networkSource?: ReadonlyArray<NetworkSource>;
|
|
114
131
|
/** @deprecated Lifted into `networkSource`; no longer emitted. */
|
|
115
|
-
readonly amtFallback?: { readonly discovery
|
|
132
|
+
readonly amtFallback?: { readonly discovery?: AmtDiscovery; readonly relayDns?: string };
|
|
133
|
+
/** bc-provenance version 2 profile and keys (draft -01 7.2.6). */
|
|
134
|
+
readonly auth?: MulticastAuthConfig;
|
|
116
135
|
readonly version?: number;
|
|
117
136
|
readonly validUntil?: number;
|
|
118
137
|
}
|
|
@@ -127,6 +146,17 @@ export type MulticastInputErrorKind =
|
|
|
127
146
|
*/
|
|
128
147
|
| "invalid_endpoints"
|
|
129
148
|
| "ssm_requires_source"
|
|
149
|
+
/** Input `protocol` "asm" with a `sourceAddress`, which selects SSM. */
|
|
150
|
+
| "protocol_source_mismatch"
|
|
151
|
+
/** `MulticastInput.auth` fails draft -01 7.2.6 (version, keys, a repeated kid or firstEpoch). */
|
|
152
|
+
| "invalid_multicast_auth"
|
|
153
|
+
/**
|
|
154
|
+
* An endpoint's `auth` fails draft -01 7.2.6: present without
|
|
155
|
+
* `MulticastInput.auth` or absent with it, `senderAddress` on SSM or
|
|
156
|
+
* missing on ASM, a timer out of range, no `bandwidth`, or a
|
|
157
|
+
* `manifestPort` that is a port or manifestPort of its `(S, G)`.
|
|
158
|
+
*/
|
|
159
|
+
| "invalid_endpoint_auth"
|
|
130
160
|
/**
|
|
131
161
|
* Deliberately overloaded, unlike its one-site mirror
|
|
132
162
|
* `atsc3_requires_tuning`: an AMT relay can be missing at two layers, and
|
|
@@ -138,8 +168,8 @@ export type MulticastInputErrorKind =
|
|
|
138
168
|
| "amt_requires_relay"
|
|
139
169
|
/**
|
|
140
170
|
* An `atsc3` endpoint with no `networkSource` entry of type `"atsc3"`. The
|
|
141
|
-
* ATSC3 entry carries the frequency
|
|
142
|
-
* tuning information there is — so without it the endpoint names a broadcast
|
|
171
|
+
* ATSC3 entry carries the frequency (kHz; PLP, service id and SLS URI are
|
|
172
|
+
* optional) — the only tuning information there is — so without it the endpoint names a broadcast
|
|
143
173
|
* nobody can tune to. The AMT mirror of this is `amt_requires_relay`; native
|
|
144
174
|
* joins ("ssm", "asm") describe no bearer and are exempt (BLO-37926).
|
|
145
175
|
*/
|
|
@@ -242,8 +272,7 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
242
272
|
}
|
|
243
273
|
}
|
|
244
274
|
|
|
245
|
-
const
|
|
246
|
-
const endpoints: MulticastEndpoint[] = input.endpoints.map((ep, idx) => validateEndpoint(ep, idx, seenTuples));
|
|
275
|
+
const endpoints: MulticastEndpoint[] = input.endpoints.map((ep, idx) => validateEndpoint(ep, idx));
|
|
247
276
|
|
|
248
277
|
const out: MulticastCatalogConfig = { endpoints };
|
|
249
278
|
const { entries: networkSource, relayFrom } = resolveNetworkSource(input);
|
|
@@ -256,22 +285,15 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
256
285
|
// `networkSource` is catalog-level, so a per-endpoint relay that differs from
|
|
257
286
|
// it (another endpoint's, `amtFallback.relayDns`, or an explicit entry) would
|
|
258
287
|
// otherwise be dropped silently and that endpoint joins the wrong relay.
|
|
259
|
-
//
|
|
260
|
-
// A DRIAD entry does not count: both readers skip it, so its `relay` is a
|
|
261
|
-
// discovery hint, not a relay the catalog carries. Without this the derived
|
|
262
|
-
// path merges `amtFallback: {discovery: "driad"}` with an endpoint's
|
|
263
|
-
// `relayAddress` into a driad entry holding that relay, the check passes, and
|
|
264
|
-
// the join silently falls through to DRIAD -- where the explicit form of the
|
|
265
|
-
// same input already fails closed here.
|
|
288
|
+
// A DRIAD entry carries no relay (`validateNetworkSourceEntry`).
|
|
266
289
|
const amtRelays = new Set(
|
|
267
290
|
networkSource
|
|
268
|
-
.flatMap((s) => (s.type === "amt" && s.
|
|
291
|
+
.flatMap((s) => (s.type === "amt" && s.relay?.trim() ? [s.relay.trim()] : []))
|
|
269
292
|
// Only the first, because it is the only one either reader can
|
|
270
293
|
// deliver: `catalogAmtNetworkSource` returns on it and `findAmtRelay`
|
|
271
294
|
// uses `.find`. Collecting every entry accepts an endpoint naming a
|
|
272
295
|
// second manual entry, which then joins the first -- the same silent
|
|
273
|
-
// wrong-relay join this guard exists to prevent
|
|
274
|
-
// shape the DRIAD filter does not cover. It also keeps the `(...)`
|
|
296
|
+
// wrong-relay join this guard exists to prevent. It also keeps the `(...)`
|
|
275
297
|
// listing below honest. Sliced rather than `.find`ed so the `amt`
|
|
276
298
|
// narrowing stays inside the callback.
|
|
277
299
|
.slice(0, 1),
|
|
@@ -279,48 +301,21 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
279
301
|
input.endpoints.forEach((ep, idx) => {
|
|
280
302
|
const relay = ep.relayAddress?.trim();
|
|
281
303
|
if (!relay || amtRelays.has(relay)) return;
|
|
282
|
-
//
|
|
283
|
-
//
|
|
284
|
-
// it -- the entry is present and demoted, so reporting the set as
|
|
285
|
-
// "(none)" sends the operator looking for an entry they already wrote.
|
|
286
|
-
// Name the demotion and the two-entry shape that escapes it; both
|
|
287
|
-
// readers take the first non-DRIAD AMT entry
|
|
288
|
-
// (`catalog-network-source.ts` `catalogAmtNetworkSource`,
|
|
289
|
-
// `multicast-catalog-policy.ts` `findAmtRelay`) and
|
|
290
|
-
// `validateNetworkSourceEntry` has no duplicate-type rule, so a manual
|
|
291
|
-
// entry beside the DRIAD one is joined while the DRIAD one is kept.
|
|
292
|
-
const demoted = networkSource.some(
|
|
293
|
-
(s) => s.type === "amt" && s.discovery === "driad" && s.relay?.trim() === relay,
|
|
294
|
-
);
|
|
295
|
-
// Same "written down but undeliverable" family as `demoted`, different
|
|
296
|
-
// reason and so a different fix: there the entry is skipped for its
|
|
297
|
-
// discovery, here for its position. Reachable only on the explicit
|
|
304
|
+
// The entry is written down but undeliverable for its position: both
|
|
305
|
+
// readers join the first AMT entry. Reachable only on the explicit
|
|
298
306
|
// path -- `resolveNetworkSource` emits at most one entry -- so there is
|
|
299
307
|
// no provenance clause to add, and saying "is not the relay of any AMT
|
|
300
308
|
// entry" here would be plainly false: the operator can see the entry.
|
|
301
309
|
// `amtRelays` holds only the first joinable relay, so reaching this
|
|
302
310
|
// throw at all already means this one is not it.
|
|
303
311
|
const shadowed = networkSource.some(
|
|
304
|
-
(s) => s.type === "amt" && s.
|
|
312
|
+
(s) => s.type === "amt" && s.relay?.trim() === relay,
|
|
305
313
|
);
|
|
306
314
|
// The derived and env paths never wrote `networkSource` at all -- it was
|
|
307
|
-
// synthesised
|
|
308
|
-
//
|
|
309
|
-
//
|
|
310
|
-
//
|
|
311
|
-
// reproduces the misdiagnosis the other arm was written to fix.
|
|
312
|
-
//
|
|
313
|
-
// The two arms are about different values, so they name different
|
|
314
|
-
// fields. The demoted arm is about `discovery`: a derived entry is only
|
|
315
|
-
// `"driad"` when `amtFallback.discovery` said so (the default is
|
|
316
|
-
// `"manual"`), so `amtFallback` is always the actionable field there.
|
|
317
|
-
// The set clause is about the *relay*, which `resolveNetworkSource`
|
|
318
|
-
// takes from `amtFallback.relayDns` or from the endpoint
|
|
319
|
-
// `relayAddress` values -- and saying "amtFallback" to an operator who
|
|
320
|
-
// never wrote one is the same defect one level down. Read that source
|
|
321
|
-
// from `relayFrom` rather than re-inferring it: three review rounds
|
|
322
|
-
// found a local re-inference here drifting from the rule above it.
|
|
323
|
-
const derived = input.networkSource === undefined;
|
|
315
|
+
// synthesised in `resolveNetworkSource` -- so name the input that
|
|
316
|
+
// supplied the relay. Read that source from `relayFrom` rather than
|
|
317
|
+
// re-inferring it: three review rounds found a local re-inference here
|
|
318
|
+
// drifting from the rule above it.
|
|
324
319
|
const fromAmtFallback = ", derived from amtFallback/MOQCAST_MULTICAST_AMT_*";
|
|
325
320
|
const fromRelay =
|
|
326
321
|
relayFrom === "amtFallback.relayDns"
|
|
@@ -332,31 +327,23 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
332
327
|
// the derived path the set can be non-empty and still not hold this
|
|
333
328
|
// relay. Blaming per-endpoint representation there is wrong twice over:
|
|
334
329
|
// there may be only one endpoint, and the field that actually won is
|
|
335
|
-
// `relayDns`, which is the one the operator can act on.
|
|
336
|
-
// `amtRelays` instead would miss the case where the winning entry is
|
|
337
|
-
// `discovery: "driad"` and so filtered out of that set entirely.
|
|
330
|
+
// `relayDns`, which is the one the operator can act on.
|
|
338
331
|
const relayDns = input.amtFallback?.relayDns?.trim();
|
|
339
332
|
const outranked = relayFrom === "amtFallback.relayDns" && relayDns !== relay;
|
|
340
333
|
throw new MulticastInputError(
|
|
341
334
|
"conflicting_amt_relay",
|
|
342
335
|
idx,
|
|
343
336
|
`endpoint[${idx}] relayAddress ${JSON.stringify(relay)} ` +
|
|
344
|
-
(
|
|
345
|
-
? `is carried
|
|
346
|
-
|
|
347
|
-
"
|
|
348
|
-
|
|
349
|
-
`[
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
"
|
|
354
|
-
: `is not the relay of any multicast.networkSource AMT entry ` +
|
|
355
|
-
`(${[...amtRelays].join(", ") || "none"})${fromRelay}; ` +
|
|
356
|
-
(outranked
|
|
357
|
-
? `amtFallback.relayDns/MOQCAST_MULTICAST_AMT_RELAY_DNS (${relayDns}) outranks an ` +
|
|
358
|
-
"endpoint relay when networkSource is derived -- drop one, or make them agree"
|
|
359
|
-
: "networkSource is catalog-level and cannot represent per-endpoint relays")),
|
|
337
|
+
(shadowed
|
|
338
|
+
? `is carried by a multicast.networkSource AMT entry that is not the first one: ` +
|
|
339
|
+
`both readers join the first AMT entry (${[...amtRelays].join(", ")}) and ignore ` +
|
|
340
|
+
"the rest, so this relay is never joined; keep a single AMT entry, or put this one first"
|
|
341
|
+
: `is not the relay of any multicast.networkSource AMT entry ` +
|
|
342
|
+
`(${[...amtRelays].join(", ") || "none"})${fromRelay}; ` +
|
|
343
|
+
(outranked
|
|
344
|
+
? `amtFallback.relayDns/MOQCAST_MULTICAST_AMT_RELAY_DNS (${relayDns}) outranks an ` +
|
|
345
|
+
"endpoint relay when networkSource is derived -- drop one, or make them agree"
|
|
346
|
+
: "networkSource is catalog-level and cannot represent per-endpoint relays")),
|
|
360
347
|
);
|
|
361
348
|
});
|
|
362
349
|
|
|
@@ -375,11 +362,35 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
375
362
|
`endpoint[${idx}] protocol=${ep.protocol} requires a multicast.networkSource entry of ` +
|
|
376
363
|
`type "${ep.protocol}"` +
|
|
377
364
|
(ep.protocol === "atsc3"
|
|
378
|
-
? " carrying
|
|
365
|
+
? " carrying at least its frequency (kHz) — an ATSC3 endpoint is not tunable without it"
|
|
379
366
|
: ""),
|
|
380
367
|
);
|
|
381
368
|
});
|
|
382
369
|
|
|
370
|
+
// Draft -01 4.2: a bearer is a networkSource entry. An endpoint that named
|
|
371
|
+
// one as its protocol gets that type's entries as its own networkSource.
|
|
372
|
+
// They are copied, not moved: the catalog-level array already applied to
|
|
373
|
+
// every endpoint under -00 readers, and still does under -01.
|
|
374
|
+
input.endpoints.forEach((ep, idx) => {
|
|
375
|
+
if (ep.protocol !== "amt" && ep.protocol !== "atsc3") return;
|
|
376
|
+
endpoints[idx]!.networkSource = networkSource.filter((s) => s.type === ep.protocol).map((s) => ({ ...s }));
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
if (input.auth !== undefined) out.auth = input.auth;
|
|
380
|
+
const [issue] = multicastCatalogIssues({ multicast: out });
|
|
381
|
+
if (issue) {
|
|
382
|
+
const kind: MulticastInputErrorKind =
|
|
383
|
+
issue.code === "multicast_auth"
|
|
384
|
+
? "invalid_multicast_auth"
|
|
385
|
+
: issue.code === "multicast_endpoint_auth"
|
|
386
|
+
? "invalid_endpoint_auth"
|
|
387
|
+
: issue.path.endsWith(".port")
|
|
388
|
+
? "duplicate_endpoint_tuple"
|
|
389
|
+
: "protocol_source_mismatch";
|
|
390
|
+
const where = issue.endpointIndex === undefined ? "" : `endpoint[${issue.endpointIndex}] `;
|
|
391
|
+
throw new MulticastInputError(kind, issue.endpointIndex ?? null, `${where}${issue.path.replace("$.multicast.", "")}: ${issue.message}`);
|
|
392
|
+
}
|
|
393
|
+
|
|
383
394
|
if (input.enabled !== undefined) out.enabled = input.enabled;
|
|
384
395
|
if (input.version !== undefined) out.version = input.version;
|
|
385
396
|
if (input.validUntil !== undefined) out.validUntil = input.validUntil;
|
|
@@ -391,9 +402,10 @@ export function multicastFromConfig(input: MulticastInput): MulticastCatalogConf
|
|
|
391
402
|
*
|
|
392
403
|
* An explicit `input.networkSource` is authoritative and used as given.
|
|
393
404
|
* Otherwise one AMT entry is derived from the deprecated inputs it replaces:
|
|
394
|
-
* `amtFallback.discovery`/`relayDns` and any endpoint `relayAddress
|
|
395
|
-
* `discovery`
|
|
396
|
-
*
|
|
405
|
+
* `amtFallback.discovery`/`relayDns` and any endpoint `relayAddress`.
|
|
406
|
+
* `discovery` is copied only when given: draft-ramadan-moq-multicast-01 4.2.1
|
|
407
|
+
* reads an omitted `discovery` with a hostname `relay` as `"dns"`, so no
|
|
408
|
+
* default is written. Endpoint relays that disagree with the result
|
|
397
409
|
* are rejected by `multicastFromConfig`, not resolved here.
|
|
398
410
|
*
|
|
399
411
|
* `relayFrom` reports which deprecated input supplied the derived relay, so
|
|
@@ -411,10 +423,10 @@ function resolveNetworkSource(input: MulticastInput): {
|
|
|
411
423
|
|
|
412
424
|
const relayDns = input.amtFallback?.relayDns?.trim();
|
|
413
425
|
const relay = relayDns || input.endpoints.map((ep) => ep.relayAddress?.trim()).find((r) => !!r);
|
|
414
|
-
const discovery = input.amtFallback?.discovery
|
|
415
|
-
if (discovery === undefined) return { entries: [], relayFrom: null };
|
|
426
|
+
const discovery = input.amtFallback?.discovery;
|
|
427
|
+
if (discovery === undefined && !relay) return { entries: [], relayFrom: null };
|
|
416
428
|
return {
|
|
417
|
-
entries: [{ type: "amt", discovery, ...(relay ? { relay } : {}) }],
|
|
429
|
+
entries: [{ type: "amt", ...(discovery ? { discovery } : {}), ...(relay ? { relay } : {}) }],
|
|
418
430
|
relayFrom: !relay ? null : relayDns ? "amtFallback.relayDns" : "endpoint.relayAddress",
|
|
419
431
|
};
|
|
420
432
|
}
|
|
@@ -425,7 +437,7 @@ const ATSC3_SOURCE_KEYS = new Set(["type", "frequency", "plpId", "serviceId", "s
|
|
|
425
437
|
/**
|
|
426
438
|
* One `networkSource[]` entry against `catalog.schema.json` `$defs/networkSource`
|
|
427
439
|
* (and moq-rs `NetworkSource`), plus the one semantic rule the schema leaves
|
|
428
|
-
* out: `discovery: "manual"`
|
|
440
|
+
* out: `discovery: "dns"` and `"manual"` name their relay. These helpers are consumed
|
|
429
441
|
* out-of-tree from plain JS, so the `NetworkSource` type is no guarantee.
|
|
430
442
|
*/
|
|
431
443
|
function validateNetworkSourceEntry(s: NetworkSource, i: number): void {
|
|
@@ -443,8 +455,11 @@ function validateNetworkSourceEntry(s: NetworkSource, i: number): void {
|
|
|
443
455
|
if (extra.length > 0) throw err("invalid_network_source", `has keys the schema rejects: ${extra.join(", ")}`);
|
|
444
456
|
|
|
445
457
|
if (s.type === "amt") {
|
|
446
|
-
if (s.discovery !== "driad" && s.discovery !== "manual") {
|
|
447
|
-
throw err(
|
|
458
|
+
if (s.discovery !== undefined && s.discovery !== "dns" && s.discovery !== "driad" && s.discovery !== "manual") {
|
|
459
|
+
throw err(
|
|
460
|
+
"invalid_amt_discovery",
|
|
461
|
+
`discovery must be "dns", "driad" or "manual" when present; got ${JSON.stringify(s.discovery)}`,
|
|
462
|
+
);
|
|
448
463
|
}
|
|
449
464
|
if (s.relay !== undefined) {
|
|
450
465
|
// Canonicalize, don't just check: the conflict guard in
|
|
@@ -459,8 +474,15 @@ function validateNetworkSourceEntry(s: NetworkSource, i: number): void {
|
|
|
459
474
|
}
|
|
460
475
|
s.relay = relay;
|
|
461
476
|
}
|
|
462
|
-
if (s.discovery === "manual" && s.relay === undefined) {
|
|
463
|
-
throw err("amt_requires_relay", `discovery="
|
|
477
|
+
if ((s.discovery === "dns" || s.discovery === "manual") && s.relay === undefined) {
|
|
478
|
+
throw err("amt_requires_relay", `discovery="${s.discovery}" requires a relay ("driad" resolves it at runtime)`);
|
|
479
|
+
}
|
|
480
|
+
if (s.discovery === "driad" && s.relay !== undefined) {
|
|
481
|
+
throw err(
|
|
482
|
+
"invalid_network_source",
|
|
483
|
+
`discovery="driad" must omit relay: DRIAD supplies the relay candidates (draft -01 4.2.1); ` +
|
|
484
|
+
`drop the relay (amtFallback.relayDns / endpoint relayAddress on the derived path), or use "dns" or "manual"`,
|
|
485
|
+
);
|
|
464
486
|
}
|
|
465
487
|
if (s.port !== undefined && (!Number.isInteger(s.port) || s.port < 1 || s.port > 65535)) {
|
|
466
488
|
throw err("invalid_port", `port must be 1..65535; got ${s.port}`);
|
|
@@ -469,13 +491,16 @@ function validateNetworkSourceEntry(s: NetworkSource, i: number): void {
|
|
|
469
491
|
}
|
|
470
492
|
const inRange = (v: number, min: number, max: number) => Number.isInteger(v) && v >= min && v <= max;
|
|
471
493
|
if (!inRange(s.frequency, 1, Number.MAX_SAFE_INTEGER)) {
|
|
472
|
-
throw err("invalid_network_source", `frequency must be a positive integer; got ${s.frequency}`);
|
|
494
|
+
throw err("invalid_network_source", `frequency must be a positive integer in kHz; got ${s.frequency}`);
|
|
495
|
+
}
|
|
496
|
+
// Draft -01 4.2.2: only frequency (kHz) is REQUIRED; the rest are checked when set.
|
|
497
|
+
if (s.plpId !== undefined && !inRange(s.plpId, 0, 63)) {
|
|
498
|
+
throw err("invalid_network_source", `plpId must be 0..63; got ${s.plpId}`);
|
|
473
499
|
}
|
|
474
|
-
if (!inRange(s.
|
|
475
|
-
if (!inRange(s.serviceId, 0, 65535)) {
|
|
500
|
+
if (s.serviceId !== undefined && !inRange(s.serviceId, 0, 65535)) {
|
|
476
501
|
throw err("invalid_network_source", `serviceId must be 0..65535; got ${s.serviceId}`);
|
|
477
502
|
}
|
|
478
|
-
if (typeof s.slsUri !== "string" || !isAbsoluteUri(s.slsUri)) {
|
|
503
|
+
if (s.slsUri !== undefined && (typeof s.slsUri !== "string" || !isAbsoluteUri(s.slsUri))) {
|
|
479
504
|
throw err("invalid_network_source", `slsUri must be an absolute URI; got ${JSON.stringify(s.slsUri)}`);
|
|
480
505
|
}
|
|
481
506
|
}
|
|
@@ -489,11 +514,7 @@ function isAbsoluteUri(value: string): boolean {
|
|
|
489
514
|
}
|
|
490
515
|
}
|
|
491
516
|
|
|
492
|
-
function validateEndpoint(
|
|
493
|
-
ep: MulticastEndpointInput,
|
|
494
|
-
idx: number,
|
|
495
|
-
seenTuples: Set<string>,
|
|
496
|
-
): MulticastEndpoint {
|
|
517
|
+
function validateEndpoint(ep: MulticastEndpointInput, idx: number): MulticastEndpoint {
|
|
497
518
|
if (ep.protocol === "ssm" && (!ep.sourceAddress || ep.sourceAddress.length === 0)) {
|
|
498
519
|
throw new MulticastInputError(
|
|
499
520
|
"ssm_requires_source",
|
|
@@ -501,6 +522,13 @@ function validateEndpoint(
|
|
|
501
522
|
`endpoint[${idx}] protocol=ssm requires sourceAddress`,
|
|
502
523
|
);
|
|
503
524
|
}
|
|
525
|
+
if (ep.protocol === "asm" && ep.sourceAddress !== undefined) {
|
|
526
|
+
throw new MulticastInputError(
|
|
527
|
+
"protocol_source_mismatch",
|
|
528
|
+
idx,
|
|
529
|
+
`endpoint[${idx}] protocol=asm with sourceAddress "${ep.sourceAddress}"; sourceAddress selects SSM (draft -01 4.1)`,
|
|
530
|
+
);
|
|
531
|
+
}
|
|
504
532
|
// NOTE: `protocol: "amt"` no longer requires a per-endpoint relay here. The
|
|
505
533
|
// relay is catalog-level (`multicast.networkSource`), which this function
|
|
506
534
|
// cannot see; `multicastFromConfig` enforces it once both halves are in hand.
|
|
@@ -570,18 +598,12 @@ function validateEndpoint(
|
|
|
570
598
|
);
|
|
571
599
|
}
|
|
572
600
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
idx,
|
|
578
|
-
`endpoint[${idx}] duplicates (sourceAddress, groupAddress, port) tuple "${tupleKey}"`,
|
|
579
|
-
);
|
|
580
|
-
}
|
|
581
|
-
seenTuples.add(tupleKey);
|
|
582
|
-
|
|
601
|
+
// Tuple uniqueness is keyed on S, which needs `auth`; `multicastFromConfig`
|
|
602
|
+
// checks it with the rest of draft -01 4.1 once the catalog is composed.
|
|
603
|
+
// The emitted protocol restates the mode `sourceAddress` selects; a bearer
|
|
604
|
+
// input protocol is never emitted.
|
|
583
605
|
const out: MulticastEndpoint = {
|
|
584
|
-
protocol: ep.
|
|
606
|
+
protocol: ep.sourceAddress === undefined ? "asm" : "ssm",
|
|
585
607
|
groupAddress: ep.groupAddress,
|
|
586
608
|
port: ep.port,
|
|
587
609
|
tracks: ep.tracks.map((t) => ({ name: t.name, packetId: t.packetId })),
|
|
@@ -590,6 +612,7 @@ function validateEndpoint(
|
|
|
590
612
|
// `relayAddress` is deliberately NOT copied: the relay is lifted to
|
|
591
613
|
// catalog-level `multicast.networkSource` by `multicastFromConfig`.
|
|
592
614
|
if (ep.bandwidth !== undefined) out.bandwidth = ep.bandwidth;
|
|
615
|
+
if (ep.auth !== undefined) out.auth = { ...ep.auth };
|
|
593
616
|
return out;
|
|
594
617
|
}
|
|
595
618
|
|
|
@@ -640,8 +663,9 @@ function isSsmGroupAddress(addr: string): boolean {
|
|
|
640
663
|
* MOQCAST_MULTICAST[_<idx>]_TRACKS=video:1,audio:3
|
|
641
664
|
* MOQCAST_MULTICAST[_<idx>]_BANDWIDTH=8000000 (optional, bps)
|
|
642
665
|
*
|
|
643
|
-
* MOQCAST_MULTICAST_AMT_DISCOVERY=
|
|
644
|
-
* MOQCAST_MULTICAST_AMT_RELAY_DNS=relay.example.com (catalog-level
|
|
666
|
+
* MOQCAST_MULTICAST_AMT_DISCOVERY=dns (catalog-level)
|
|
667
|
+
* MOQCAST_MULTICAST_AMT_RELAY_DNS=relay.example.com (catalog-level;
|
|
668
|
+
* must be unset with discovery=driad)
|
|
645
669
|
*
|
|
646
670
|
* The unindexed form (`MOQCAST_MULTICAST_GROUP`) is exactly index 0;
|
|
647
671
|
* mixing it with explicit `_0_` keys is rejected as ambiguous. Indices
|
|
@@ -689,9 +713,9 @@ export function multicastFromEnv(
|
|
|
689
713
|
...(hasCatalogAmt
|
|
690
714
|
? {
|
|
691
715
|
amtFallback: {
|
|
692
|
-
//
|
|
693
|
-
//
|
|
694
|
-
discovery:
|
|
716
|
+
// No default: an omitted discovery with a relay hostname is
|
|
717
|
+
// "dns" (draft-ramadan-moq-multicast-01 4.2.1).
|
|
718
|
+
...(amtDiscovery ? { discovery: amtDiscovery as AmtDiscovery } : {}),
|
|
695
719
|
...(amtRelayDns ? { relayDns: amtRelayDns } : {}),
|
|
696
720
|
},
|
|
697
721
|
}
|
|
@@ -757,7 +781,7 @@ function readEndpointAt(env: Record<string, string | undefined>, idx: number): M
|
|
|
757
781
|
const relay = lookup("RELAY");
|
|
758
782
|
|
|
759
783
|
return {
|
|
760
|
-
protocol: lookup("PROTOCOL") as
|
|
784
|
+
protocol: lookup("PROTOCOL") as MulticastInputProtocol,
|
|
761
785
|
groupAddress: lookup("GROUP") ?? "",
|
|
762
786
|
port,
|
|
763
787
|
tracks,
|