@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
|
@@ -1076,6 +1076,66 @@ var BlockcastMmt = (() => {
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
+
// ../mmt-base/dist/mmtp-siblings.js
|
|
1080
|
+
var MMTP_MODES = Object.freeze(["mfu", "mfu-datagram"]);
|
|
1081
|
+
function isMmtpMode(value) {
|
|
1082
|
+
return typeof value === "string" && MMTP_MODES.includes(value);
|
|
1083
|
+
}
|
|
1084
|
+
var MMTP_SIBLING_HARD_FIELDS = Object.freeze([
|
|
1085
|
+
"namespace",
|
|
1086
|
+
"timescale",
|
|
1087
|
+
"presentationAnchorTicks",
|
|
1088
|
+
"groupDuration"
|
|
1089
|
+
]);
|
|
1090
|
+
var MMTP_SIBLING_RENDITION_FIELDS = Object.freeze([
|
|
1091
|
+
"codec",
|
|
1092
|
+
"width",
|
|
1093
|
+
"height",
|
|
1094
|
+
"framerate",
|
|
1095
|
+
"bitrate",
|
|
1096
|
+
"samplerate",
|
|
1097
|
+
"channelConfig",
|
|
1098
|
+
"lang"
|
|
1099
|
+
]);
|
|
1100
|
+
var MMTP_SIBLING_SOFT_FIELDS = Object.freeze([
|
|
1101
|
+
"initRef",
|
|
1102
|
+
"keyframeIntervalMs",
|
|
1103
|
+
"keyframeIntervalTicks",
|
|
1104
|
+
"isLive",
|
|
1105
|
+
"altGroup"
|
|
1106
|
+
]);
|
|
1107
|
+
function fields(track) {
|
|
1108
|
+
return track;
|
|
1109
|
+
}
|
|
1110
|
+
function groupDurationTicks(track) {
|
|
1111
|
+
const ticks = track["groupDurationTicks"];
|
|
1112
|
+
if (Number.isSafeInteger(ticks))
|
|
1113
|
+
return BigInt(ticks);
|
|
1114
|
+
const ms = track["groupDurationMs"];
|
|
1115
|
+
const timescale = track["timescale"];
|
|
1116
|
+
if (!Number.isSafeInteger(ms) || !Number.isSafeInteger(timescale))
|
|
1117
|
+
return void 0;
|
|
1118
|
+
return BigInt(ms) * BigInt(timescale) / 1000n;
|
|
1119
|
+
}
|
|
1120
|
+
function identityEqual(a, b) {
|
|
1121
|
+
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]);
|
|
1122
|
+
}
|
|
1123
|
+
function isMmtpTrack(track, mode) {
|
|
1124
|
+
return typeof track === "object" && track !== null && !Array.isArray(track) && fields(track)["packaging"] === "mmtp" && fields(track)["mmtpMode"] === mode;
|
|
1125
|
+
}
|
|
1126
|
+
function mmtpSiblingCandidates(tracks, datagram) {
|
|
1127
|
+
const own = fields(datagram);
|
|
1128
|
+
return tracks.filter((track) => isMmtpTrack(track, "mfu") && identityEqual(fields(track), own));
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
// ../mmt-base/dist/datagram-leg-size.js
|
|
1132
|
+
var DATAGRAM_LEG_UDP_FLOOR = 1200;
|
|
1133
|
+
var DATAGRAM_LEG_QUIC_WT_FRAMING = 48;
|
|
1134
|
+
var DATAGRAM_LEG_OBJECT_HEADER = 13;
|
|
1135
|
+
var DATAGRAM_LEG_RELAY_ROOM = 16;
|
|
1136
|
+
var DATAGRAM_LEG_DATAGRAM_MAX = DATAGRAM_LEG_UDP_FLOOR - DATAGRAM_LEG_QUIC_WT_FRAMING;
|
|
1137
|
+
var DATAGRAM_LEG_BODY_MAX = DATAGRAM_LEG_DATAGRAM_MAX - DATAGRAM_LEG_OBJECT_HEADER - DATAGRAM_LEG_RELAY_ROOM;
|
|
1138
|
+
|
|
1079
1139
|
// src/mfu-reassembler.ts
|
|
1080
1140
|
function fragmentProvenance(fragment) {
|
|
1081
1141
|
if (fragment.deliveryProvenance !== void 0) return fragment.deliveryProvenance;
|
|
@@ -8240,13 +8300,13 @@ var BlockcastMmt = (() => {
|
|
|
8240
8300
|
}
|
|
8241
8301
|
const timescale = track["timescale"];
|
|
8242
8302
|
const groupDurationMs = track["groupDurationMs"];
|
|
8243
|
-
const
|
|
8303
|
+
const groupDurationTicks2 = track["groupDurationTicks"];
|
|
8244
8304
|
const keyframeIntervalMs = track["keyframeIntervalMs"];
|
|
8245
8305
|
const keyframeIntervalTicks = track["keyframeIntervalTicks"];
|
|
8246
8306
|
if (groupDurationMs !== void 0 && !positiveInteger(groupDurationMs)) {
|
|
8247
8307
|
catalogError("track_group_duration_ms", `${path}.groupDurationMs`, "must be a positive integer");
|
|
8248
8308
|
}
|
|
8249
|
-
if (
|
|
8309
|
+
if (groupDurationTicks2 !== void 0 && !positiveInteger(groupDurationTicks2)) {
|
|
8250
8310
|
catalogError("track_group_duration_ticks", `${path}.groupDurationTicks`, "must be a positive integer");
|
|
8251
8311
|
}
|
|
8252
8312
|
if (keyframeIntervalMs !== void 0 && !positiveNumber(keyframeIntervalMs) || keyframeIntervalTicks !== void 0 && !positiveInteger(keyframeIntervalTicks)) {
|
|
@@ -8261,20 +8321,17 @@ var BlockcastMmt = (() => {
|
|
|
8261
8321
|
catalogError("track_init_ref", `${path}.initRef`, "must be a non-empty string");
|
|
8262
8322
|
}
|
|
8263
8323
|
if (packaging === "mmtp") {
|
|
8264
|
-
if (track["mmtpMode"] !== "mfu") {
|
|
8265
|
-
catalogError("track_mmtp_mode", `${path}.mmtpMode`, "must be mfu");
|
|
8266
|
-
}
|
|
8267
8324
|
if (!positiveInteger(timescale)) {
|
|
8268
8325
|
catalogError("track_timescale", `${path}.timescale`, "must be a positive integer");
|
|
8269
8326
|
}
|
|
8270
|
-
if (groupDurationMs === void 0 &&
|
|
8327
|
+
if (groupDurationMs === void 0 && groupDurationTicks2 === void 0) {
|
|
8271
8328
|
catalogError(
|
|
8272
8329
|
"track_group_duration_ms",
|
|
8273
8330
|
path,
|
|
8274
8331
|
"groupDurationMs or groupDurationTicks must be a positive integer"
|
|
8275
8332
|
);
|
|
8276
8333
|
}
|
|
8277
|
-
if (
|
|
8334
|
+
if (groupDurationTicks2 === void 0 && BigInt(groupDurationMs) * BigInt(timescale) % 1000n !== 0n) {
|
|
8278
8335
|
catalogError("track_group_duration_exact", `${path}.groupDurationMs`, "does not resolve to an exact integer tick count");
|
|
8279
8336
|
}
|
|
8280
8337
|
}
|
|
@@ -8356,8 +8413,103 @@ var BlockcastMmt = (() => {
|
|
|
8356
8413
|
}
|
|
8357
8414
|
}
|
|
8358
8415
|
validateArchive(catalog);
|
|
8416
|
+
dropRejectedMmtpTracks(catalog);
|
|
8359
8417
|
return catalog;
|
|
8360
8418
|
}
|
|
8419
|
+
function dropRejectedMmtpTracks(catalog) {
|
|
8420
|
+
const rejected = mmtpTrackIssues(catalog);
|
|
8421
|
+
if (rejected.length === 0) return;
|
|
8422
|
+
const tracks = catalog["tracks"];
|
|
8423
|
+
const rejectedIndexes = new Set(rejected.map((issue) => issue.index));
|
|
8424
|
+
const nameOf = (track) => track?.["name"];
|
|
8425
|
+
const mediaNames = new Set(tracks.filter((_, index) => !rejectedIndexes.has(index)).map(nameOf));
|
|
8426
|
+
const kept = tracks.filter((track, index) => {
|
|
8427
|
+
if (rejectedIndexes.has(index)) return false;
|
|
8428
|
+
const t = track;
|
|
8429
|
+
return !(t?.["packaging"] === "fec-repair" && typeof t["source"] === "string" && !mediaNames.has(t["source"]) && rejected.some((issue) => issue.name === t["source"]));
|
|
8430
|
+
});
|
|
8431
|
+
catalog["tracks"] = kept;
|
|
8432
|
+
const keptNames = new Set(kept.map(nameOf));
|
|
8433
|
+
const endpoints = catalog["multicast"]?.["endpoints"];
|
|
8434
|
+
if (Array.isArray(endpoints)) {
|
|
8435
|
+
for (const endpoint of endpoints) {
|
|
8436
|
+
const refs = endpoint?.["tracks"];
|
|
8437
|
+
if (!endpoint || !Array.isArray(refs)) continue;
|
|
8438
|
+
endpoint["tracks"] = refs.filter((ref) => keptNames.has(typeof ref === "object" ? nameOf(ref) : ref));
|
|
8439
|
+
}
|
|
8440
|
+
}
|
|
8441
|
+
Object.defineProperty(catalog, "rejectedTracks", { value: rejected, enumerable: false, configurable: true, writable: true });
|
|
8442
|
+
}
|
|
8443
|
+
function mmtpTrackIssues(catalog) {
|
|
8444
|
+
if (typeof catalog !== "object" || catalog === null || Array.isArray(catalog)) return [];
|
|
8445
|
+
const tracks = catalog["tracks"];
|
|
8446
|
+
if (!Array.isArray(tracks)) return [];
|
|
8447
|
+
const records = tracks.filter(
|
|
8448
|
+
(track) => typeof track === "object" && track !== null && !Array.isArray(track)
|
|
8449
|
+
);
|
|
8450
|
+
const issues = [];
|
|
8451
|
+
const streamPaths = (track) => {
|
|
8452
|
+
const name = typeof track["name"] === "string" ? track["name"] : "";
|
|
8453
|
+
return [track, ...records.filter((repair) => repair["packaging"] === "fec-repair" && repair["source"] === name)].filter((declaring) => declaring["deliveryMode"] === "stream").map((declaring) => `$.tracks[${tracks.indexOf(declaring)}]`);
|
|
8454
|
+
};
|
|
8455
|
+
const candidatesOf = /* @__PURE__ */ new Map();
|
|
8456
|
+
const mirrorsOf = /* @__PURE__ */ new Map();
|
|
8457
|
+
for (const track of records) {
|
|
8458
|
+
if (track["packaging"] !== "mmtp" || track["mmtpMode"] !== "mfu-datagram") continue;
|
|
8459
|
+
const candidates = mmtpSiblingCandidates(records, track);
|
|
8460
|
+
candidatesOf.set(track, candidates);
|
|
8461
|
+
if (candidates.length === 1 && streamPaths(track).length === 0) {
|
|
8462
|
+
mirrorsOf.set(candidates[0], [...mirrorsOf.get(candidates[0]) ?? [], track]);
|
|
8463
|
+
}
|
|
8464
|
+
}
|
|
8465
|
+
for (const track of records) {
|
|
8466
|
+
const index = tracks.indexOf(track);
|
|
8467
|
+
const path = `$.tracks[${index}]`;
|
|
8468
|
+
const name = typeof track["name"] === "string" ? track["name"] : "";
|
|
8469
|
+
if (track["packaging"] !== "mmtp") continue;
|
|
8470
|
+
const mode = track["mmtpMode"];
|
|
8471
|
+
if (!isMmtpMode(mode)) {
|
|
8472
|
+
issues.push({
|
|
8473
|
+
code: "track_mmtp_mode",
|
|
8474
|
+
path: `${path}.mmtpMode`,
|
|
8475
|
+
message: `mmtpMode must be "mfu" or "mfu-datagram", got ${JSON.stringify(mode)}; a subscriber rejects the track (draft-ramadan-moq-mmt-02 13.1)`,
|
|
8476
|
+
name,
|
|
8477
|
+
index
|
|
8478
|
+
});
|
|
8479
|
+
continue;
|
|
8480
|
+
}
|
|
8481
|
+
if (mode !== "mfu-datagram") continue;
|
|
8482
|
+
const conflict = (at) => issues.push({
|
|
8483
|
+
code: "track_delivery_mode_conflict",
|
|
8484
|
+
path: `${at}.deliveryMode`,
|
|
8485
|
+
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)`,
|
|
8486
|
+
name,
|
|
8487
|
+
index
|
|
8488
|
+
});
|
|
8489
|
+
const streams = streamPaths(track);
|
|
8490
|
+
for (const at of streams) conflict(at);
|
|
8491
|
+
const candidates = candidatesOf.get(track) ?? [];
|
|
8492
|
+
const rivals = candidates.length === 1 && streams.length === 0 ? (mirrorsOf.get(candidates[0]) ?? []).filter((other) => other !== track) : [];
|
|
8493
|
+
if (rivals.length > 0) {
|
|
8494
|
+
issues.push({
|
|
8495
|
+
code: "track_mmtp_sibling",
|
|
8496
|
+
path,
|
|
8497
|
+
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)`,
|
|
8498
|
+
name,
|
|
8499
|
+
index
|
|
8500
|
+
});
|
|
8501
|
+
} else if (candidates.length !== 1) {
|
|
8502
|
+
issues.push({
|
|
8503
|
+
code: "track_mmtp_sibling",
|
|
8504
|
+
path,
|
|
8505
|
+
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`,
|
|
8506
|
+
name,
|
|
8507
|
+
index
|
|
8508
|
+
});
|
|
8509
|
+
}
|
|
8510
|
+
}
|
|
8511
|
+
return issues;
|
|
8512
|
+
}
|
|
8361
8513
|
|
|
8362
8514
|
// ../fec/dist/oti.js
|
|
8363
8515
|
function catalogFecInterleaveMs(fec) {
|
|
@@ -8436,6 +8588,7 @@ var BlockcastMmt = (() => {
|
|
|
8436
8588
|
const catalogFec = requireBoolean(evidence.catalogFec, "catalogFec");
|
|
8437
8589
|
const bridgeAvailable = requireBoolean(evidence.bridgeAvailable, "bridgeAvailable");
|
|
8438
8590
|
const multicastLegJoined = requireBoolean(evidence.multicastLegJoined, "multicastLegJoined");
|
|
8591
|
+
const datagramLegJoined = evidence.datagramLegJoined === void 0 ? false : requireBoolean(evidence.datagramLegJoined, "datagramLegJoined");
|
|
8439
8592
|
const { transportPolicy, stats } = evidence;
|
|
8440
8593
|
if (typeof transportPolicy !== "string" || !TRANSPORT_POLICIES.has(transportPolicy)) {
|
|
8441
8594
|
throw new TypeError(`resolveFecState: unsupported transportPolicy ${JSON.stringify(transportPolicy)}`);
|
|
@@ -8444,6 +8597,7 @@ var BlockcastMmt = (() => {
|
|
|
8444
8597
|
throw new TypeError("resolveFecState: stats must be a plain object, null or undefined");
|
|
8445
8598
|
}
|
|
8446
8599
|
if (!catalogFec) return INACTIVE["no-catalog-fec"];
|
|
8600
|
+
if (datagramLegJoined) return { ...stats ?? {}, state: "active" };
|
|
8447
8601
|
if (transportPolicy === "moq-only") return INACTIVE["reliable-moq"];
|
|
8448
8602
|
if (!bridgeAvailable) return INACTIVE["no-multicast-bridge"];
|
|
8449
8603
|
if (transportPolicy === "multicast-only" || multicastLegJoined) {
|
|
@@ -10418,12 +10572,12 @@ var BlockcastMmt = (() => {
|
|
|
10418
10572
|
return Number.isInteger(value) && value >= 0 && value <= 65535;
|
|
10419
10573
|
}
|
|
10420
10574
|
function parseIpv4(address) {
|
|
10421
|
-
const
|
|
10422
|
-
if (
|
|
10575
|
+
const fields2 = address.split(".");
|
|
10576
|
+
if (fields2.length !== 4 || fields2.some((field) => !/^\d+$/.test(field))) {
|
|
10423
10577
|
throw new Error(`invalid IPv4 address ${address}`);
|
|
10424
10578
|
}
|
|
10425
|
-
const values =
|
|
10426
|
-
if (values.some((value, index) => value > 255 || String(value) !==
|
|
10579
|
+
const values = fields2.map(Number);
|
|
10580
|
+
if (values.some((value, index) => value > 255 || String(value) !== fields2[index])) {
|
|
10427
10581
|
throw new Error(`invalid IPv4 address ${address}`);
|
|
10428
10582
|
}
|
|
10429
10583
|
return Uint8Array.from(values);
|
|
@@ -10637,7 +10791,7 @@ var BlockcastMmt = (() => {
|
|
|
10637
10791
|
return len;
|
|
10638
10792
|
}
|
|
10639
10793
|
var bitMask = (n) => (_1n << BigInt(n)) - _1n;
|
|
10640
|
-
function _validateObject(object,
|
|
10794
|
+
function _validateObject(object, fields2, optFields = {}) {
|
|
10641
10795
|
if (!object || typeof object !== "object")
|
|
10642
10796
|
throw new Error("expected valid options object");
|
|
10643
10797
|
function checkField(fieldName, expectedType, isOpt) {
|
|
@@ -10648,7 +10802,7 @@ var BlockcastMmt = (() => {
|
|
|
10648
10802
|
if (current !== expectedType || val === null)
|
|
10649
10803
|
throw new Error(`param "${fieldName}" is invalid: expected ${expectedType}, got ${current}`);
|
|
10650
10804
|
}
|
|
10651
|
-
Object.entries(
|
|
10805
|
+
Object.entries(fields2).forEach(([k, v]) => checkField(k, v, false));
|
|
10652
10806
|
Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));
|
|
10653
10807
|
}
|
|
10654
10808
|
var notImplemented = () => {
|