@blockcast/mmt-container 2.2.0-main.e1bebe787bc9 → 2.2.0-main.ea9223dc11de
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/dist/block-policy.d.ts +33 -3
- package/dist/block-policy.d.ts.map +1 -1
- package/dist/block-policy.js +60 -24
- package/dist/block-policy.js.map +3 -3
- package/dist/browser-runtime.js +1034 -126
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +40 -1
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +163 -10
- package/dist/carp-catalog.js.map +4 -4
- package/dist/catalog-fec-params.js +34 -0
- package/dist/catalog-fec-params.js.map +3 -3
- package/dist/catalog-network-source.js +34 -0
- package/dist/catalog-network-source.js.map +3 -3
- package/dist/datagram-leg-deadline.d.ts +138 -0
- package/dist/datagram-leg-deadline.d.ts.map +1 -0
- package/dist/datagram-leg-deadline.js +229 -0
- package/dist/datagram-leg-deadline.js.map +7 -0
- package/dist/delivery-catalog.js +68 -0
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/delta-fallback-config.js +34 -0
- package/dist/delta-fallback-config.js.map +3 -3
- package/dist/fec-manager.d.ts +117 -13
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +358 -42
- package/dist/fec-manager.js.map +4 -4
- package/dist/fec-state.d.ts +17 -5
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +36 -0
- package/dist/fec-state.js.map +3 -3
- package/dist/fec-worker-setup.js +34 -0
- package/dist/fec-worker-setup.js.map +3 -3
- package/dist/held-layer-admission.js +34 -0
- package/dist/held-layer-admission.js.map +3 -3
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.d.ts +16 -0
- package/dist/iso-block-locator.d.ts.map +1 -1
- package/dist/iso-block-locator.js +62 -0
- package/dist/iso-block-locator.js.map +3 -3
- package/dist/mfu-reassembler.js +34 -0
- package/dist/mfu-reassembler.js.map +3 -3
- package/dist/mmtp-container-parser.d.ts +6 -3
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +34 -0
- package/dist/mmtp-container-parser.js.map +3 -3
- package/dist/mmtp-container-parser.no-modules.js +167 -13
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +34 -0
- package/dist/mmtp-decode-pipeline.js.map +3 -3
- package/dist/mmtp-fec-session.js +34 -0
- package/dist/mmtp-fec-session.js.map +3 -3
- package/dist/mmtp-mode-selection.d.ts +48 -0
- package/dist/mmtp-mode-selection.d.ts.map +1 -0
- package/dist/mmtp-mode-selection.js +79 -0
- package/dist/mmtp-mode-selection.js.map +7 -0
- package/dist/mmtp-router.d.ts +66 -10
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +204 -30
- package/dist/mmtp-router.js.map +4 -4
- package/dist/multicast-auth-catalog.js +42 -2
- package/dist/multicast-auth-catalog.js.map +3 -3
- package/dist/multicast-input.js +42 -2
- package/dist/multicast-input.js.map +3 -3
- package/dist/multicast-manager.d.ts +95 -1
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +613 -92
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.js +68 -0
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +34 -0
- package/dist/multicast-unwrap.js.map +3 -3
- package/dist/no-modules.js +167 -13
- package/dist/no-modules.js.map +4 -4
- package/dist/phase14-catalog-override.d.ts +2 -1
- package/dist/phase14-catalog-override.d.ts.map +1 -1
- package/dist/phase14-catalog-override.js +69 -2
- package/dist/phase14-catalog-override.js.map +3 -3
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +50 -0
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layer-subscriptions.js +34 -0
- package/dist/repair-layer-subscriptions.js.map +3 -3
- package/dist/signaling.js +34 -0
- package/dist/signaling.js.map +3 -3
- package/dist/timestamp-codec.js +34 -0
- package/dist/timestamp-codec.js.map +3 -3
- package/dist/wasm-mfu-reassembler.js +34 -0
- package/dist/wasm-mfu-reassembler.js.map +3 -3
- package/dist/wasm-mmtp-container-parser.js +34 -0
- package/dist/wasm-mmtp-container-parser.js.map +3 -3
- package/package.json +5 -5
- package/schemas/catalog.schema.json +2 -2
- package/src/block-policy.ts +108 -31
- package/src/carp-catalog.ts +165 -5
- package/src/datagram-leg-deadline.ts +370 -0
- package/src/fec-manager.ts +345 -33
- package/src/fec-state.ts +21 -5
- package/src/index.ts +37 -0
- package/src/iso-block-locator.ts +34 -0
- package/src/mmtp-container-parser.ts +6 -4
- package/src/mmtp-mode-selection.ts +80 -0
- package/src/mmtp-router.ts +226 -45
- package/src/multicast-manager.ts +126 -0
- package/src/phase14-catalog-override.ts +14 -3
- package/src/repair-fetch.ts +23 -0
- package/test-vectors/catalog/README.md +36 -2
- package/test-vectors/catalog/mmtp-siblings/ambiguous-sibling.json +158 -0
- package/test-vectors/catalog/mmtp-siblings/ladder-bitrate-only.json +231 -0
- package/test-vectors/catalog/mmtp-siblings/ladder-four-rungs.json +405 -0
- package/test-vectors/catalog/mmtp-siblings/ladder-other-names.json +231 -0
- package/test-vectors/catalog/mmtp-siblings/mmtp-mode-unknown.json +143 -0
- package/test-vectors/catalog/mmtp-siblings/multicast-endpoint-lists-datagram-track.json +143 -0
- package/test-vectors/catalog/mmtp-siblings/no-sibling.json +79 -0
- package/test-vectors/catalog/mmtp-siblings/rendition-mismatch.json +143 -0
- package/test-vectors/catalog/mmtp-siblings/stream-delivery-mode.json +143 -0
- package/test-vectors/catalog/mmtp-siblings/timescale-mismatch.json +143 -0
- package/test-vectors/catalog/mmtp-siblings/valid-pair.json +142 -0
- package/test-vectors/catalog/section-codes.json +3 -3
- package/test-vectors/catalog-timing.json +742 -1
- package/test-vectors/catalog-validation.json +266 -7
- package/test-vectors/moq/mmtp-mode-selection.json +259 -0
package/dist/no-modules.js
CHANGED
|
@@ -1011,6 +1011,66 @@ function geometry(o, instanceId, symbolTrack) {
|
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
|
+
// ../mmt-base/dist/mmtp-siblings.js
|
|
1015
|
+
var MMTP_MODES = Object.freeze(["mfu", "mfu-datagram"]);
|
|
1016
|
+
function isMmtpMode(value) {
|
|
1017
|
+
return typeof value === "string" && MMTP_MODES.includes(value);
|
|
1018
|
+
}
|
|
1019
|
+
var MMTP_SIBLING_HARD_FIELDS = Object.freeze([
|
|
1020
|
+
"namespace",
|
|
1021
|
+
"timescale",
|
|
1022
|
+
"presentationAnchorTicks",
|
|
1023
|
+
"groupDuration"
|
|
1024
|
+
]);
|
|
1025
|
+
var MMTP_SIBLING_RENDITION_FIELDS = Object.freeze([
|
|
1026
|
+
"codec",
|
|
1027
|
+
"width",
|
|
1028
|
+
"height",
|
|
1029
|
+
"framerate",
|
|
1030
|
+
"bitrate",
|
|
1031
|
+
"samplerate",
|
|
1032
|
+
"channelConfig",
|
|
1033
|
+
"lang"
|
|
1034
|
+
]);
|
|
1035
|
+
var MMTP_SIBLING_SOFT_FIELDS = Object.freeze([
|
|
1036
|
+
"initRef",
|
|
1037
|
+
"keyframeIntervalMs",
|
|
1038
|
+
"keyframeIntervalTicks",
|
|
1039
|
+
"isLive",
|
|
1040
|
+
"altGroup"
|
|
1041
|
+
]);
|
|
1042
|
+
function fields(track) {
|
|
1043
|
+
return track;
|
|
1044
|
+
}
|
|
1045
|
+
function groupDurationTicks(track) {
|
|
1046
|
+
const ticks = track["groupDurationTicks"];
|
|
1047
|
+
if (Number.isSafeInteger(ticks))
|
|
1048
|
+
return BigInt(ticks);
|
|
1049
|
+
const ms = track["groupDurationMs"];
|
|
1050
|
+
const timescale = track["timescale"];
|
|
1051
|
+
if (!Number.isSafeInteger(ms) || !Number.isSafeInteger(timescale))
|
|
1052
|
+
return void 0;
|
|
1053
|
+
return BigInt(ms) * BigInt(timescale) / 1000n;
|
|
1054
|
+
}
|
|
1055
|
+
function identityEqual(a, b) {
|
|
1056
|
+
return a["namespace"] === b["namespace"] && a["timescale"] === b["timescale"] && a["presentationAnchorTicks"] === b["presentationAnchorTicks"] && groupDurationTicks(a) === groupDurationTicks(b) && MMTP_SIBLING_RENDITION_FIELDS.every((field) => a[field] === b[field]);
|
|
1057
|
+
}
|
|
1058
|
+
function isMmtpTrack(track, mode) {
|
|
1059
|
+
return typeof track === "object" && track !== null && !Array.isArray(track) && fields(track)["packaging"] === "mmtp" && fields(track)["mmtpMode"] === mode;
|
|
1060
|
+
}
|
|
1061
|
+
function mmtpSiblingCandidates(tracks, datagram) {
|
|
1062
|
+
const own = fields(datagram);
|
|
1063
|
+
return tracks.filter((track) => isMmtpTrack(track, "mfu") && identityEqual(fields(track), own));
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
// ../mmt-base/dist/datagram-leg-size.js
|
|
1067
|
+
var DATAGRAM_LEG_UDP_FLOOR = 1200;
|
|
1068
|
+
var DATAGRAM_LEG_QUIC_WT_FRAMING = 48;
|
|
1069
|
+
var DATAGRAM_LEG_OBJECT_HEADER = 13;
|
|
1070
|
+
var DATAGRAM_LEG_RELAY_ROOM = 16;
|
|
1071
|
+
var DATAGRAM_LEG_DATAGRAM_MAX = DATAGRAM_LEG_UDP_FLOOR - DATAGRAM_LEG_QUIC_WT_FRAMING;
|
|
1072
|
+
var DATAGRAM_LEG_BODY_MAX = DATAGRAM_LEG_DATAGRAM_MAX - DATAGRAM_LEG_OBJECT_HEADER - DATAGRAM_LEG_RELAY_ROOM;
|
|
1073
|
+
|
|
1014
1074
|
// src/mfu-reassembler.ts
|
|
1015
1075
|
function fragmentProvenance(fragment) {
|
|
1016
1076
|
if (fragment.deliveryProvenance !== void 0) return fragment.deliveryProvenance;
|
|
@@ -8139,13 +8199,13 @@ function validateCmsfMmtpCatalog(value, _options = {}) {
|
|
|
8139
8199
|
}
|
|
8140
8200
|
const timescale = track["timescale"];
|
|
8141
8201
|
const groupDurationMs = track["groupDurationMs"];
|
|
8142
|
-
const
|
|
8202
|
+
const groupDurationTicks2 = track["groupDurationTicks"];
|
|
8143
8203
|
const keyframeIntervalMs = track["keyframeIntervalMs"];
|
|
8144
8204
|
const keyframeIntervalTicks = track["keyframeIntervalTicks"];
|
|
8145
8205
|
if (groupDurationMs !== void 0 && !positiveInteger(groupDurationMs)) {
|
|
8146
8206
|
catalogError("track_group_duration_ms", `${path}.groupDurationMs`, "must be a positive integer");
|
|
8147
8207
|
}
|
|
8148
|
-
if (
|
|
8208
|
+
if (groupDurationTicks2 !== void 0 && !positiveInteger(groupDurationTicks2)) {
|
|
8149
8209
|
catalogError("track_group_duration_ticks", `${path}.groupDurationTicks`, "must be a positive integer");
|
|
8150
8210
|
}
|
|
8151
8211
|
if (keyframeIntervalMs !== void 0 && !positiveNumber(keyframeIntervalMs) || keyframeIntervalTicks !== void 0 && !positiveInteger(keyframeIntervalTicks)) {
|
|
@@ -8160,20 +8220,17 @@ function validateCmsfMmtpCatalog(value, _options = {}) {
|
|
|
8160
8220
|
catalogError("track_init_ref", `${path}.initRef`, "must be a non-empty string");
|
|
8161
8221
|
}
|
|
8162
8222
|
if (packaging === "mmtp") {
|
|
8163
|
-
if (track["mmtpMode"] !== "mfu") {
|
|
8164
|
-
catalogError("track_mmtp_mode", `${path}.mmtpMode`, "must be mfu");
|
|
8165
|
-
}
|
|
8166
8223
|
if (!positiveInteger(timescale)) {
|
|
8167
8224
|
catalogError("track_timescale", `${path}.timescale`, "must be a positive integer");
|
|
8168
8225
|
}
|
|
8169
|
-
if (groupDurationMs === void 0 &&
|
|
8226
|
+
if (groupDurationMs === void 0 && groupDurationTicks2 === void 0) {
|
|
8170
8227
|
catalogError(
|
|
8171
8228
|
"track_group_duration_ms",
|
|
8172
8229
|
path,
|
|
8173
8230
|
"groupDurationMs or groupDurationTicks must be a positive integer"
|
|
8174
8231
|
);
|
|
8175
8232
|
}
|
|
8176
|
-
if (
|
|
8233
|
+
if (groupDurationTicks2 === void 0 && BigInt(groupDurationMs) * BigInt(timescale) % 1000n !== 0n) {
|
|
8177
8234
|
catalogError("track_group_duration_exact", `${path}.groupDurationMs`, "does not resolve to an exact integer tick count");
|
|
8178
8235
|
}
|
|
8179
8236
|
}
|
|
@@ -8255,8 +8312,103 @@ function validateCmsfMmtpCatalog(value, _options = {}) {
|
|
|
8255
8312
|
}
|
|
8256
8313
|
}
|
|
8257
8314
|
validateArchive(catalog);
|
|
8315
|
+
dropRejectedMmtpTracks(catalog);
|
|
8258
8316
|
return catalog;
|
|
8259
8317
|
}
|
|
8318
|
+
function dropRejectedMmtpTracks(catalog) {
|
|
8319
|
+
const rejected = mmtpTrackIssues(catalog);
|
|
8320
|
+
if (rejected.length === 0) return;
|
|
8321
|
+
const tracks = catalog["tracks"];
|
|
8322
|
+
const rejectedIndexes = new Set(rejected.map((issue) => issue.index));
|
|
8323
|
+
const nameOf = (track) => track?.["name"];
|
|
8324
|
+
const mediaNames = new Set(tracks.filter((_, index) => !rejectedIndexes.has(index)).map(nameOf));
|
|
8325
|
+
const kept = tracks.filter((track, index) => {
|
|
8326
|
+
if (rejectedIndexes.has(index)) return false;
|
|
8327
|
+
const t = track;
|
|
8328
|
+
return !(t?.["packaging"] === "fec-repair" && typeof t["source"] === "string" && !mediaNames.has(t["source"]) && rejected.some((issue) => issue.name === t["source"]));
|
|
8329
|
+
});
|
|
8330
|
+
catalog["tracks"] = kept;
|
|
8331
|
+
const keptNames = new Set(kept.map(nameOf));
|
|
8332
|
+
const endpoints = catalog["multicast"]?.["endpoints"];
|
|
8333
|
+
if (Array.isArray(endpoints)) {
|
|
8334
|
+
for (const endpoint of endpoints) {
|
|
8335
|
+
const refs = endpoint?.["tracks"];
|
|
8336
|
+
if (!endpoint || !Array.isArray(refs)) continue;
|
|
8337
|
+
endpoint["tracks"] = refs.filter((ref) => keptNames.has(typeof ref === "object" ? nameOf(ref) : ref));
|
|
8338
|
+
}
|
|
8339
|
+
}
|
|
8340
|
+
Object.defineProperty(catalog, "rejectedTracks", { value: rejected, enumerable: false, configurable: true, writable: true });
|
|
8341
|
+
}
|
|
8342
|
+
function mmtpTrackIssues(catalog) {
|
|
8343
|
+
if (typeof catalog !== "object" || catalog === null || Array.isArray(catalog)) return [];
|
|
8344
|
+
const tracks = catalog["tracks"];
|
|
8345
|
+
if (!Array.isArray(tracks)) return [];
|
|
8346
|
+
const records = tracks.filter(
|
|
8347
|
+
(track) => typeof track === "object" && track !== null && !Array.isArray(track)
|
|
8348
|
+
);
|
|
8349
|
+
const issues = [];
|
|
8350
|
+
const streamPaths = (track) => {
|
|
8351
|
+
const name = typeof track["name"] === "string" ? track["name"] : "";
|
|
8352
|
+
return [track, ...records.filter((repair) => repair["packaging"] === "fec-repair" && repair["source"] === name)].filter((declaring) => declaring["deliveryMode"] === "stream").map((declaring) => `$.tracks[${tracks.indexOf(declaring)}]`);
|
|
8353
|
+
};
|
|
8354
|
+
const candidatesOf = /* @__PURE__ */ new Map();
|
|
8355
|
+
const mirrorsOf = /* @__PURE__ */ new Map();
|
|
8356
|
+
for (const track of records) {
|
|
8357
|
+
if (track["packaging"] !== "mmtp" || track["mmtpMode"] !== "mfu-datagram") continue;
|
|
8358
|
+
const candidates = mmtpSiblingCandidates(records, track);
|
|
8359
|
+
candidatesOf.set(track, candidates);
|
|
8360
|
+
if (candidates.length === 1 && streamPaths(track).length === 0) {
|
|
8361
|
+
mirrorsOf.set(candidates[0], [...mirrorsOf.get(candidates[0]) ?? [], track]);
|
|
8362
|
+
}
|
|
8363
|
+
}
|
|
8364
|
+
for (const track of records) {
|
|
8365
|
+
const index = tracks.indexOf(track);
|
|
8366
|
+
const path = `$.tracks[${index}]`;
|
|
8367
|
+
const name = typeof track["name"] === "string" ? track["name"] : "";
|
|
8368
|
+
if (track["packaging"] !== "mmtp") continue;
|
|
8369
|
+
const mode = track["mmtpMode"];
|
|
8370
|
+
if (!isMmtpMode(mode)) {
|
|
8371
|
+
issues.push({
|
|
8372
|
+
code: "track_mmtp_mode",
|
|
8373
|
+
path: `${path}.mmtpMode`,
|
|
8374
|
+
message: `mmtpMode must be "mfu" or "mfu-datagram", got ${JSON.stringify(mode)}; a subscriber rejects the track (draft-ramadan-moq-mmt-02 13.1)`,
|
|
8375
|
+
name,
|
|
8376
|
+
index
|
|
8377
|
+
});
|
|
8378
|
+
continue;
|
|
8379
|
+
}
|
|
8380
|
+
if (mode !== "mfu-datagram") continue;
|
|
8381
|
+
const conflict = (at) => issues.push({
|
|
8382
|
+
code: "track_delivery_mode_conflict",
|
|
8383
|
+
path: `${at}.deliveryMode`,
|
|
8384
|
+
message: `"mfu-datagram" track ${JSON.stringify(name)} and its repair tracks are sent as datagrams; deliveryMode "stream" would subscribe no repair (draft-ramadan-moq-mmt-02 4.3.1)`,
|
|
8385
|
+
name,
|
|
8386
|
+
index
|
|
8387
|
+
});
|
|
8388
|
+
const streams = streamPaths(track);
|
|
8389
|
+
for (const at of streams) conflict(at);
|
|
8390
|
+
const candidates = candidatesOf.get(track) ?? [];
|
|
8391
|
+
const rivals = candidates.length === 1 && streams.length === 0 ? (mirrorsOf.get(candidates[0]) ?? []).filter((other) => other !== track) : [];
|
|
8392
|
+
if (rivals.length > 0) {
|
|
8393
|
+
issues.push({
|
|
8394
|
+
code: "track_mmtp_sibling",
|
|
8395
|
+
path,
|
|
8396
|
+
message: `"mfu-datagram" track ${JSON.stringify(name)} mirrors "mfu" track ${JSON.stringify(candidates[0]["name"])}, and so ${rivals.length === 1 ? "does" : "do"} ${rivals.map((rival) => JSON.stringify(rival["name"])).join(", ")}; the catalog does not say which one mirrors it, so a subscriber pairs none (draft-ramadan-moq-mmt-02 4.3.1)`,
|
|
8397
|
+
name,
|
|
8398
|
+
index
|
|
8399
|
+
});
|
|
8400
|
+
} else if (candidates.length !== 1) {
|
|
8401
|
+
issues.push({
|
|
8402
|
+
code: "track_mmtp_sibling",
|
|
8403
|
+
path,
|
|
8404
|
+
message: candidates.length === 0 ? `"mfu-datagram" track ${JSON.stringify(name)} mirrors no "mfu" track of its namespace with the same timescale, presentationAnchorTicks, group duration and rendition fields (${MMTP_SIBLING_RENDITION_FIELDS.join(", ")}), each equal or absent on both (draft-ramadan-moq-mmt-02 4.3.1, 13.1)` : `"mfu-datagram" track ${JSON.stringify(name)} could mirror ${candidates.length} "mfu" tracks (${candidates.map((c) => JSON.stringify(c["name"])).join(", ")}) that carry one description; the pair is ambiguous`,
|
|
8405
|
+
name,
|
|
8406
|
+
index
|
|
8407
|
+
});
|
|
8408
|
+
}
|
|
8409
|
+
}
|
|
8410
|
+
return issues;
|
|
8411
|
+
}
|
|
8260
8412
|
|
|
8261
8413
|
// src/no-modules.ts
|
|
8262
8414
|
import { catalogFecInterleaveMs as catalogFecInterleaveMs2, fecBlockBudgetMs as fecBlockBudgetMs2, fecBlockDeadlineMs } from "@blockcast/mmt-fec";
|
|
@@ -8289,6 +8441,7 @@ function resolveFecState(evidence) {
|
|
|
8289
8441
|
const catalogFec = requireBoolean(evidence.catalogFec, "catalogFec");
|
|
8290
8442
|
const bridgeAvailable = requireBoolean(evidence.bridgeAvailable, "bridgeAvailable");
|
|
8291
8443
|
const multicastLegJoined = requireBoolean(evidence.multicastLegJoined, "multicastLegJoined");
|
|
8444
|
+
const datagramLegJoined = evidence.datagramLegJoined === void 0 ? false : requireBoolean(evidence.datagramLegJoined, "datagramLegJoined");
|
|
8292
8445
|
const { transportPolicy, stats } = evidence;
|
|
8293
8446
|
if (typeof transportPolicy !== "string" || !TRANSPORT_POLICIES.has(transportPolicy)) {
|
|
8294
8447
|
throw new TypeError(`resolveFecState: unsupported transportPolicy ${JSON.stringify(transportPolicy)}`);
|
|
@@ -8297,6 +8450,7 @@ function resolveFecState(evidence) {
|
|
|
8297
8450
|
throw new TypeError("resolveFecState: stats must be a plain object, null or undefined");
|
|
8298
8451
|
}
|
|
8299
8452
|
if (!catalogFec) return INACTIVE["no-catalog-fec"];
|
|
8453
|
+
if (datagramLegJoined) return { ...stats ?? {}, state: "active" };
|
|
8300
8454
|
if (transportPolicy === "moq-only") return INACTIVE["reliable-moq"];
|
|
8301
8455
|
if (!bridgeAvailable) return INACTIVE["no-multicast-bridge"];
|
|
8302
8456
|
if (transportPolicy === "multicast-only" || multicastLegJoined) {
|
|
@@ -10236,12 +10390,12 @@ function validPort(value) {
|
|
|
10236
10390
|
return Number.isInteger(value) && value >= 0 && value <= 65535;
|
|
10237
10391
|
}
|
|
10238
10392
|
function parseIpv4(address) {
|
|
10239
|
-
const
|
|
10240
|
-
if (
|
|
10393
|
+
const fields2 = address.split(".");
|
|
10394
|
+
if (fields2.length !== 4 || fields2.some((field) => !/^\d+$/.test(field))) {
|
|
10241
10395
|
throw new Error(`invalid IPv4 address ${address}`);
|
|
10242
10396
|
}
|
|
10243
|
-
const values =
|
|
10244
|
-
if (values.some((value, index) => value > 255 || String(value) !==
|
|
10397
|
+
const values = fields2.map(Number);
|
|
10398
|
+
if (values.some((value, index) => value > 255 || String(value) !== fields2[index])) {
|
|
10245
10399
|
throw new Error(`invalid IPv4 address ${address}`);
|
|
10246
10400
|
}
|
|
10247
10401
|
return Uint8Array.from(values);
|
|
@@ -10455,7 +10609,7 @@ function bitLen(n) {
|
|
|
10455
10609
|
return len;
|
|
10456
10610
|
}
|
|
10457
10611
|
var bitMask = (n) => (_1n << BigInt(n)) - _1n;
|
|
10458
|
-
function _validateObject(object,
|
|
10612
|
+
function _validateObject(object, fields2, optFields = {}) {
|
|
10459
10613
|
if (!object || typeof object !== "object")
|
|
10460
10614
|
throw new Error("expected valid options object");
|
|
10461
10615
|
function checkField(fieldName, expectedType, isOpt) {
|
|
@@ -10466,7 +10620,7 @@ function _validateObject(object, fields, optFields = {}) {
|
|
|
10466
10620
|
if (current !== expectedType || val === null)
|
|
10467
10621
|
throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
|
|
10468
10622
|
}
|
|
10469
|
-
Object.entries(
|
|
10623
|
+
Object.entries(fields2).forEach(([k, v]) => checkField(k, v, false));
|
|
10470
10624
|
Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));
|
|
10471
10625
|
}
|
|
10472
10626
|
var notImplemented = () => {
|