moqtail 0.14.0 → 0.16.0
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 +153 -473
- package/dist/{client-Z7egUKTO.cjs → client-DQ5aGbLR.cjs} +1100 -1099
- package/dist/client-DUzLw_Y8.d.cts +1932 -0
- package/dist/{client-BW1agDFV.mjs → client-DVi4Nh1J.mjs} +942 -947
- package/dist/client-epHqMdHm.d.mts +1932 -0
- package/dist/client.cjs +121 -4
- package/dist/client.d.cts +23 -1933
- package/dist/client.d.mts +23 -1933
- package/dist/client.mjs +117 -2
- package/dist/emitter-UbeRcbuf.mjs +109 -0
- package/dist/{logger-c2NoQqtx.cjs → emitter-qNJYD3yQ.cjs} +61 -2
- package/dist/index-B-BMK-b6.d.mts +2090 -0
- package/dist/index-BtemTtwe.d.cts +2090 -0
- package/dist/{index-DBbxKcc1.d.cts → index-CNn9BgO6.d.mts} +168 -337
- package/dist/index.cjs +39 -34
- package/dist/index.d.cts +20 -4
- package/dist/index.d.mts +20 -4
- package/dist/index.mjs +5 -4
- package/dist/logger-B8IYkljn.d.cts +64 -0
- package/dist/logger-B8IYkljn.d.mts +64 -0
- package/dist/model.cjs +208 -359
- package/dist/model.d.cts +2896 -2
- package/dist/model.d.mts +17 -2
- package/dist/model.mjs +207 -359
- package/dist/player/component.cjs +317 -0
- package/dist/player/component.d.cts +50 -0
- package/dist/player/component.d.mts +50 -0
- package/dist/player/component.mjs +315 -0
- package/dist/player-CJayEzwt.cjs +6750 -0
- package/dist/player-DcctWhyM.mjs +6599 -0
- package/dist/player.cjs +27 -0
- package/dist/player.d.cts +17 -0
- package/dist/player.d.mts +17 -0
- package/dist/player.mjs +1 -0
- package/dist/rolldown-runtime-CmQyd0Gu.cjs +27 -0
- package/dist/util.cjs +9 -10
- package/dist/util.d.cts +20 -13
- package/dist/util.d.mts +20 -13
- package/dist/util.mjs +4 -6
- package/package.json +45 -5
- package/dist/index-DBbxKcc1.d.mts +0 -3051
- package/dist/logger-ByDB8lYF.mjs +0 -56
- package/dist/logger-dEoueCj7.d.cts +0 -35
- package/dist/logger-dEoueCj7.d.mts +0 -35
package/dist/model.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/model/error/error.ts
|
|
3
3
|
/**
|
|
4
4
|
* Copyright 2025 The MOQtail Authors
|
|
5
5
|
*
|
|
@@ -196,8 +196,7 @@ var TerminationError = class extends MOQtailError {
|
|
|
196
196
|
this.terminationCode = terminationCode;
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
|
-
|
|
200
|
-
//#region src/model/common/pair.ts
|
|
199
|
+
// src/model/common/pair.ts
|
|
201
200
|
/**
|
|
202
201
|
* Copyright 2025 The MOQtail Authors
|
|
203
202
|
*
|
|
@@ -450,8 +449,7 @@ function isVarInt(pair) {
|
|
|
450
449
|
function isBytes(pair) {
|
|
451
450
|
return pair.value instanceof Uint8Array;
|
|
452
451
|
}
|
|
453
|
-
|
|
454
|
-
//#region src/model/common/location.ts
|
|
452
|
+
// src/model/common/location.ts
|
|
455
453
|
/**
|
|
456
454
|
* Copyright 2025 The MOQtail Authors
|
|
457
455
|
*
|
|
@@ -537,8 +535,7 @@ var Location = class Location {
|
|
|
537
535
|
return 0;
|
|
538
536
|
}
|
|
539
537
|
};
|
|
540
|
-
|
|
541
|
-
//#region src/model/common/tuple.ts
|
|
538
|
+
// src/model/common/tuple.ts
|
|
542
539
|
/**
|
|
543
540
|
* Copyright 2025 The MOQtail Authors
|
|
544
541
|
*
|
|
@@ -707,8 +704,7 @@ var Tuple = class Tuple {
|
|
|
707
704
|
return this.fields.every((f, i) => f.value.toString() === other.fields[i].value.toString());
|
|
708
705
|
}
|
|
709
706
|
};
|
|
710
|
-
|
|
711
|
-
//#region src/model/common/reason_phrase.ts
|
|
707
|
+
// src/model/common/reason_phrase.ts
|
|
712
708
|
/**
|
|
713
709
|
* Copyright 2025 The MOQtail Authors
|
|
714
710
|
*
|
|
@@ -812,8 +808,7 @@ var ReasonPhrase = class ReasonPhrase {
|
|
|
812
808
|
}
|
|
813
809
|
}
|
|
814
810
|
};
|
|
815
|
-
|
|
816
|
-
//#region src/model/error/constant.ts
|
|
811
|
+
// src/model/error/constant.ts
|
|
817
812
|
/**
|
|
818
813
|
* Copyright 2025 The MOQtail Authors
|
|
819
814
|
*
|
|
@@ -880,8 +875,7 @@ let TerminationCode = /* @__PURE__ */ function(TerminationCode) {
|
|
|
880
875
|
}
|
|
881
876
|
_TerminationCode.tryFrom = tryFrom;
|
|
882
877
|
})(TerminationCode || (TerminationCode = {}));
|
|
883
|
-
|
|
884
|
-
//#region src/model/error/stream_reset.ts
|
|
878
|
+
// src/model/error/stream_reset.ts
|
|
885
879
|
/**
|
|
886
880
|
* Copyright 2026 The MOQtail Authors
|
|
887
881
|
*
|
|
@@ -935,8 +929,7 @@ let StreamResetCode = /* @__PURE__ */ function(StreamResetCode) {
|
|
|
935
929
|
}
|
|
936
930
|
_StreamResetCode.tryFrom = tryFrom;
|
|
937
931
|
})(StreamResetCode || (StreamResetCode = {}));
|
|
938
|
-
|
|
939
|
-
//#region src/model/data/constant.ts
|
|
932
|
+
// src/model/data/constant.ts
|
|
940
933
|
/**
|
|
941
934
|
* Copyright 2025 The MOQtail Authors
|
|
942
935
|
*
|
|
@@ -1240,8 +1233,7 @@ let ObjectStatus = /* @__PURE__ */ function(ObjectStatus) {
|
|
|
1240
1233
|
}
|
|
1241
1234
|
_ObjectStatus.tryFrom = tryFrom;
|
|
1242
1235
|
})(ObjectStatus || (ObjectStatus = {}));
|
|
1243
|
-
|
|
1244
|
-
//#region src/model/data/datagram.ts
|
|
1236
|
+
// src/model/data/datagram.ts
|
|
1245
1237
|
/**
|
|
1246
1238
|
* Copyright 2026 The MOQtail Authors
|
|
1247
1239
|
*
|
|
@@ -1350,8 +1342,7 @@ var Datagram = class Datagram {
|
|
|
1350
1342
|
return new Datagram(msgType, trackAlias, new Location(groupId, objectId), publisherPriority, properties, payload, objectStatus, endOfGroup);
|
|
1351
1343
|
}
|
|
1352
1344
|
};
|
|
1353
|
-
|
|
1354
|
-
//#region src/model/data/fetch_header.ts
|
|
1345
|
+
// src/model/data/fetch_header.ts
|
|
1355
1346
|
/**
|
|
1356
1347
|
* Copyright 2025 The MOQtail Authors
|
|
1357
1348
|
*
|
|
@@ -1387,8 +1378,7 @@ var FetchHeader = class FetchHeader {
|
|
|
1387
1378
|
return new FetchHeader(type, requestId);
|
|
1388
1379
|
}
|
|
1389
1380
|
};
|
|
1390
|
-
|
|
1391
|
-
//#region src/model/control/constant.ts
|
|
1381
|
+
// src/model/control/constant.ts
|
|
1392
1382
|
/**
|
|
1393
1383
|
* Copyright 2025 The MOQtail Authors
|
|
1394
1384
|
*
|
|
@@ -1683,8 +1673,7 @@ let RequestErrorCode = /* @__PURE__ */ function(RequestErrorCode) {
|
|
|
1683
1673
|
}
|
|
1684
1674
|
_RequestErrorCode.fromWire = fromWire;
|
|
1685
1675
|
})(RequestErrorCode || (RequestErrorCode = {}));
|
|
1686
|
-
|
|
1687
|
-
//#region src/model/data/fetch_object.ts
|
|
1676
|
+
// src/model/data/fetch_object.ts
|
|
1688
1677
|
/**
|
|
1689
1678
|
* Copyright 2025 The MOQtail Authors
|
|
1690
1679
|
*
|
|
@@ -1712,13 +1701,21 @@ const SUBGROUP_MODE_PRIOR_PLUS_ONE = 2;
|
|
|
1712
1701
|
const SUBGROUP_MODE_PRESENT = 3;
|
|
1713
1702
|
const END_OF_NON_EXISTENT_RANGE = 140n;
|
|
1714
1703
|
const END_OF_UNKNOWN_RANGE = 268n;
|
|
1704
|
+
const END_OF_TIMED_OUT_RANGE = 524n;
|
|
1715
1705
|
const MAX_VARINT = 2n ** 64n - 1n;
|
|
1716
1706
|
/**
|
|
1717
|
-
* Kind discriminator for End-of-Range markers
|
|
1707
|
+
* Kind discriminator for End-of-Range markers.
|
|
1718
1708
|
*/
|
|
1719
1709
|
let EndOfRangeKind = /* @__PURE__ */ function(EndOfRangeKind) {
|
|
1710
|
+
/** Serialization Flags = 0x8C: all objects in the range are known not to exist. */
|
|
1720
1711
|
EndOfRangeKind[EndOfRangeKind["NonExistent"] = 140] = "NonExistent";
|
|
1712
|
+
/** Serialization Flags = 0x10C: the range is cache-unknown. */
|
|
1721
1713
|
EndOfRangeKind[EndOfRangeKind["Unknown"] = 268] = "Unknown";
|
|
1714
|
+
/**
|
|
1715
|
+
* Serialization Flags = 0x20C: the range timed out, e.g. a relay ran out of its
|
|
1716
|
+
* fill budget before it could retrieve it.
|
|
1717
|
+
*/
|
|
1718
|
+
EndOfRangeKind[EndOfRangeKind["TimedOut"] = 524] = "TimedOut";
|
|
1722
1719
|
return EndOfRangeKind;
|
|
1723
1720
|
}({});
|
|
1724
1721
|
/**
|
|
@@ -1753,11 +1750,20 @@ var FetchObject = class FetchObject {
|
|
|
1753
1750
|
return this.location.object;
|
|
1754
1751
|
}
|
|
1755
1752
|
/**
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1753
|
+
* What the entry after this one is encoded against, given what this one was
|
|
1754
|
+
* encoded against (`prev`).
|
|
1755
|
+
*
|
|
1756
|
+
* After an Object, that is the Object itself. After an End of Range marker, it is
|
|
1757
|
+
* the marker's Group and Object IDs, with the Subgroup ID and priority still those
|
|
1758
|
+
* of the last Object before the marker, or none if no Object came before it.
|
|
1758
1759
|
*/
|
|
1759
|
-
|
|
1760
|
-
if (this.kind === "end_of_range") return
|
|
1760
|
+
nextContext(prev) {
|
|
1761
|
+
if (this.kind === "end_of_range") return {
|
|
1762
|
+
groupId: this.groupId,
|
|
1763
|
+
subgroupId: prev?.subgroupId ?? null,
|
|
1764
|
+
objectId: this.objectId,
|
|
1765
|
+
publisherPriority: prev?.publisherPriority ?? null
|
|
1766
|
+
};
|
|
1761
1767
|
return {
|
|
1762
1768
|
groupId: this.groupId,
|
|
1763
1769
|
subgroupId: this.subgroupId,
|
|
@@ -1774,7 +1780,7 @@ var FetchObject = class FetchObject {
|
|
|
1774
1780
|
serialize(prev, groupOrder = 0) {
|
|
1775
1781
|
const buf = new ByteBuffer();
|
|
1776
1782
|
if (this.kind === "end_of_range") {
|
|
1777
|
-
buf.putVI(this.endOfRange
|
|
1783
|
+
buf.putVI(BigInt(this.endOfRange));
|
|
1778
1784
|
buf.putVI(this.groupId);
|
|
1779
1785
|
buf.putVI(this.objectId);
|
|
1780
1786
|
return buf.freeze();
|
|
@@ -1800,7 +1806,7 @@ var FetchObject = class FetchObject {
|
|
|
1800
1806
|
let subgroupMode;
|
|
1801
1807
|
if (isDatagram || this.subgroupId === 0n) subgroupMode = SUBGROUP_MODE_ZERO;
|
|
1802
1808
|
else if (prev && prev.subgroupId === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR;
|
|
1803
|
-
else if (prev && prev.subgroupId + 1n === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR_PLUS_ONE;
|
|
1809
|
+
else if (prev && prev.subgroupId !== null && prev.subgroupId + 1n === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR_PLUS_ONE;
|
|
1804
1810
|
else subgroupMode = SUBGROUP_MODE_PRESENT;
|
|
1805
1811
|
let flags = subgroupMode & FLAG_SUBGROUP_MODE_MASK;
|
|
1806
1812
|
if (objectDelta !== null) flags |= FLAG_OBJECT_ID_PRESENT;
|
|
@@ -1824,6 +1830,7 @@ var FetchObject = class FetchObject {
|
|
|
1824
1830
|
let kind;
|
|
1825
1831
|
if (flagsRaw === END_OF_NON_EXISTENT_RANGE) kind = 140;
|
|
1826
1832
|
else if (flagsRaw === END_OF_UNKNOWN_RANGE) kind = 268;
|
|
1833
|
+
else if (flagsRaw === END_OF_TIMED_OUT_RANGE) kind = 524;
|
|
1827
1834
|
else throw new ProtocolViolationError("FetchObject.deserialize", `invalid Serialization Flags value 0x${flagsRaw.toString(16)}`);
|
|
1828
1835
|
const groupId = buf.getVI();
|
|
1829
1836
|
const objectId = buf.getVI();
|
|
@@ -1859,11 +1866,11 @@ var FetchObject = class FetchObject {
|
|
|
1859
1866
|
subgroupId = 0n;
|
|
1860
1867
|
break;
|
|
1861
1868
|
case SUBGROUP_MODE_PRIOR:
|
|
1862
|
-
if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
|
|
1869
|
+
if (!prev || prev.subgroupId === null) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
|
|
1863
1870
|
subgroupId = prev.subgroupId;
|
|
1864
1871
|
break;
|
|
1865
1872
|
case SUBGROUP_MODE_PRIOR_PLUS_ONE:
|
|
1866
|
-
if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
|
|
1873
|
+
if (!prev || prev.subgroupId === null) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
|
|
1867
1874
|
subgroupId = prev.subgroupId + 1n;
|
|
1868
1875
|
break;
|
|
1869
1876
|
case SUBGROUP_MODE_PRESENT:
|
|
@@ -1885,7 +1892,7 @@ var FetchObject = class FetchObject {
|
|
|
1885
1892
|
if (objectId > MAX_VARINT) throw new ProtocolViolationError("FetchObject.deserialize", `object id wraps: prior=${prev.objectId} +1`);
|
|
1886
1893
|
}
|
|
1887
1894
|
const publisherPriority = hasPriority ? buf.getU8() : (() => {
|
|
1888
|
-
if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "priority inherited but no prior object");
|
|
1895
|
+
if (!prev || prev.publisherPriority === null) throw new ProtocolViolationError("FetchObject.deserialize", "priority inherited but no prior object");
|
|
1889
1896
|
return prev.publisherPriority;
|
|
1890
1897
|
})();
|
|
1891
1898
|
let properties = null;
|
|
@@ -1900,8 +1907,7 @@ var FetchObject = class FetchObject {
|
|
|
1900
1907
|
return FetchObject.newObject(groupId, resolvedSubgroupId, objectId, publisherPriority, forwardingPreference, properties, payload);
|
|
1901
1908
|
}
|
|
1902
1909
|
};
|
|
1903
|
-
|
|
1904
|
-
//#region src/model/data/full_track_name.ts
|
|
1910
|
+
// src/model/data/full_track_name.ts
|
|
1905
1911
|
/**
|
|
1906
1912
|
* Copyright 2025 The MOQtail Authors
|
|
1907
1913
|
*
|
|
@@ -2002,8 +2008,7 @@ var FullTrackName = class FullTrackName {
|
|
|
2002
2008
|
return new FullTrackName(namespace, name);
|
|
2003
2009
|
}
|
|
2004
2010
|
};
|
|
2005
|
-
|
|
2006
|
-
//#region src/model/property/constant.ts
|
|
2011
|
+
// src/model/property/constant.ts
|
|
2007
2012
|
/**
|
|
2008
2013
|
* Copyright 2025 The MOQtail Authors
|
|
2009
2014
|
*
|
|
@@ -2020,11 +2025,12 @@ var FullTrackName = class FullTrackName {
|
|
|
2020
2025
|
* limitations under the License.
|
|
2021
2026
|
*/
|
|
2022
2027
|
let LOCPropertyId = /* @__PURE__ */ function(LOCPropertyId) {
|
|
2023
|
-
LOCPropertyId[LOCPropertyId["Timestamp"] = 6] = "Timestamp";
|
|
2024
2028
|
LOCPropertyId[LOCPropertyId["Timescale"] = 8] = "Timescale";
|
|
2025
|
-
LOCPropertyId[LOCPropertyId["VideoFrameMarking"] =
|
|
2029
|
+
LOCPropertyId[LOCPropertyId["VideoFrameMarking"] = 9] = "VideoFrameMarking";
|
|
2026
2030
|
LOCPropertyId[LOCPropertyId["AudioLevel"] = 12] = "AudioLevel";
|
|
2027
2031
|
LOCPropertyId[LOCPropertyId["VideoConfig"] = 13] = "VideoConfig";
|
|
2032
|
+
LOCPropertyId[LOCPropertyId["AudioConfig"] = 15] = "AudioConfig";
|
|
2033
|
+
LOCPropertyId[LOCPropertyId["Timestamp"] = 16] = "Timestamp";
|
|
2028
2034
|
return LOCPropertyId;
|
|
2029
2035
|
}({});
|
|
2030
2036
|
let TrackPropertyType = /* @__PURE__ */ function(TrackPropertyType) {
|
|
@@ -2041,11 +2047,12 @@ let TrackPropertyType = /* @__PURE__ */ function(TrackPropertyType) {
|
|
|
2041
2047
|
}({});
|
|
2042
2048
|
function locPropertyIdFromNumber(value) {
|
|
2043
2049
|
switch (value) {
|
|
2044
|
-
case 6: return 6;
|
|
2045
2050
|
case 8: return 8;
|
|
2046
|
-
case
|
|
2051
|
+
case 9: return 9;
|
|
2047
2052
|
case 12: return 12;
|
|
2048
2053
|
case 13: return 13;
|
|
2054
|
+
case 15: return 15;
|
|
2055
|
+
case 16: return 16;
|
|
2049
2056
|
default: throw new InvalidTypeError("locPropertyIdFromNumber", `Invalid LOC property id: ${value}`);
|
|
2050
2057
|
}
|
|
2051
2058
|
}
|
|
@@ -2095,8 +2102,7 @@ function isApplicationSpecificProperty(typeValue) {
|
|
|
2095
2102
|
const v = BigInt(typeValue);
|
|
2096
2103
|
return inRange(PropertyRanges.AppSpecific1Byte, v) || inRange(PropertyRanges.AppSpecific2Byte, v);
|
|
2097
2104
|
}
|
|
2098
|
-
|
|
2099
|
-
//#region src/model/property/timestamp.ts
|
|
2105
|
+
// src/model/property/timestamp.ts
|
|
2100
2106
|
/**
|
|
2101
2107
|
* Copyright 2025 The MOQtail Authors
|
|
2102
2108
|
*
|
|
@@ -2114,7 +2120,7 @@ function isApplicationSpecificProperty(typeValue) {
|
|
|
2114
2120
|
*/
|
|
2115
2121
|
var Timestamp = class Timestamp {
|
|
2116
2122
|
timestamp;
|
|
2117
|
-
static TYPE =
|
|
2123
|
+
static TYPE = 16;
|
|
2118
2124
|
constructor(timestamp) {
|
|
2119
2125
|
this.timestamp = timestamp;
|
|
2120
2126
|
}
|
|
@@ -2125,8 +2131,7 @@ var Timestamp = class Timestamp {
|
|
|
2125
2131
|
if (Number(pair.typeValue) === Timestamp.TYPE && typeof pair.value === "bigint") return new Timestamp(pair.value);
|
|
2126
2132
|
}
|
|
2127
2133
|
};
|
|
2128
|
-
|
|
2129
|
-
//#region src/model/property/timescale.ts
|
|
2134
|
+
// src/model/property/timescale.ts
|
|
2130
2135
|
/**
|
|
2131
2136
|
* Copyright 2026 The MOQtail Authors
|
|
2132
2137
|
*
|
|
@@ -2155,8 +2160,7 @@ var Timescale = class Timescale {
|
|
|
2155
2160
|
if (Number(pair.typeValue) === Timescale.TYPE && typeof pair.value === "bigint") return new Timescale(pair.value);
|
|
2156
2161
|
}
|
|
2157
2162
|
};
|
|
2158
|
-
|
|
2159
|
-
//#region src/model/property/video_frame_marking.ts
|
|
2163
|
+
// src/model/property/video_frame_marking.ts
|
|
2160
2164
|
/**
|
|
2161
2165
|
* Copyright 2025 The MOQtail Authors
|
|
2162
2166
|
*
|
|
@@ -2172,21 +2176,27 @@ var Timescale = class Timescale {
|
|
|
2172
2176
|
* See the License for the specific language governing permissions and
|
|
2173
2177
|
* limitations under the License.
|
|
2174
2178
|
*/
|
|
2179
|
+
/** The I (independent frame) bit of the RFC 9626 flag octet. */
|
|
2180
|
+
const INDEPENDENT = 32;
|
|
2175
2181
|
var VideoFrameMarking = class VideoFrameMarking {
|
|
2176
2182
|
value;
|
|
2177
|
-
static TYPE =
|
|
2183
|
+
static TYPE = 9;
|
|
2184
|
+
/** The RFC 9626 frame-marking octets (1 to 4), without the length prefix. */
|
|
2178
2185
|
constructor(value) {
|
|
2179
2186
|
this.value = value;
|
|
2180
2187
|
}
|
|
2188
|
+
/** True if the frame decodes without temporally prior frames (the I bit). */
|
|
2189
|
+
get independent() {
|
|
2190
|
+
return ((this.value[0] ?? 0) & INDEPENDENT) !== 0;
|
|
2191
|
+
}
|
|
2181
2192
|
toKeyValuePair() {
|
|
2182
|
-
return KeyValuePair.
|
|
2193
|
+
return KeyValuePair.tryNewBytes(VideoFrameMarking.TYPE, this.value);
|
|
2183
2194
|
}
|
|
2184
2195
|
static fromKeyValuePair(pair) {
|
|
2185
|
-
if (Number(pair.typeValue) === VideoFrameMarking.TYPE &&
|
|
2196
|
+
if (Number(pair.typeValue) === VideoFrameMarking.TYPE && pair.value instanceof Uint8Array) return new VideoFrameMarking(pair.value);
|
|
2186
2197
|
}
|
|
2187
2198
|
};
|
|
2188
|
-
|
|
2189
|
-
//#region src/model/property/audio_level.ts
|
|
2199
|
+
// src/model/property/audio_level.ts
|
|
2190
2200
|
/**
|
|
2191
2201
|
* Copyright 2025 The MOQtail Authors
|
|
2192
2202
|
*
|
|
@@ -2215,8 +2225,7 @@ var AudioLevel = class AudioLevel {
|
|
|
2215
2225
|
if (Number(pair.typeValue) === AudioLevel.TYPE && typeof pair.value === "bigint") return new AudioLevel(pair.value);
|
|
2216
2226
|
}
|
|
2217
2227
|
};
|
|
2218
|
-
|
|
2219
|
-
//#region src/model/property/video_config.ts
|
|
2228
|
+
// src/model/property/video_config.ts
|
|
2220
2229
|
/**
|
|
2221
2230
|
* Copyright 2025 The MOQtail Authors
|
|
2222
2231
|
*
|
|
@@ -2245,12 +2254,40 @@ var VideoConfig = class VideoConfig {
|
|
|
2245
2254
|
if (Number(pair.typeValue) === VideoConfig.TYPE && pair.value instanceof Uint8Array) return new VideoConfig(pair.value);
|
|
2246
2255
|
}
|
|
2247
2256
|
};
|
|
2248
|
-
|
|
2249
|
-
|
|
2257
|
+
// src/model/property/audio_config.ts
|
|
2258
|
+
/**
|
|
2259
|
+
* Copyright 2026 The MOQtail Authors
|
|
2260
|
+
*
|
|
2261
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2262
|
+
* you may not use this file except in compliance with the License.
|
|
2263
|
+
* You may obtain a copy of the License at
|
|
2264
|
+
*
|
|
2265
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2266
|
+
*
|
|
2267
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2268
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2269
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2270
|
+
* See the License for the specific language governing permissions and
|
|
2271
|
+
* limitations under the License.
|
|
2272
|
+
*/
|
|
2273
|
+
var AudioConfig = class AudioConfig {
|
|
2274
|
+
config;
|
|
2275
|
+
static TYPE = 15;
|
|
2276
|
+
constructor(config) {
|
|
2277
|
+
this.config = config;
|
|
2278
|
+
}
|
|
2279
|
+
toKeyValuePair() {
|
|
2280
|
+
return KeyValuePair.tryNewBytes(AudioConfig.TYPE, this.config);
|
|
2281
|
+
}
|
|
2282
|
+
static fromKeyValuePair(pair) {
|
|
2283
|
+
if (Number(pair.typeValue) === AudioConfig.TYPE && pair.value instanceof Uint8Array) return new AudioConfig(pair.value);
|
|
2284
|
+
}
|
|
2285
|
+
};
|
|
2286
|
+
// src/model/property/loc.ts
|
|
2250
2287
|
let LOCProperty;
|
|
2251
2288
|
(function(_LOCProperty) {
|
|
2252
2289
|
function fromKeyValuePair(pair) {
|
|
2253
|
-
return Timestamp.fromKeyValuePair(pair) || Timescale.fromKeyValuePair(pair) || VideoFrameMarking.fromKeyValuePair(pair) || AudioLevel.fromKeyValuePair(pair) || VideoConfig.fromKeyValuePair(pair);
|
|
2290
|
+
return Timestamp.fromKeyValuePair(pair) || Timescale.fromKeyValuePair(pair) || VideoFrameMarking.fromKeyValuePair(pair) || AudioLevel.fromKeyValuePair(pair) || VideoConfig.fromKeyValuePair(pair) || AudioConfig.fromKeyValuePair(pair);
|
|
2254
2291
|
}
|
|
2255
2292
|
_LOCProperty.fromKeyValuePair = fromKeyValuePair;
|
|
2256
2293
|
function toKeyValuePair(header) {
|
|
@@ -2277,6 +2314,10 @@ let LOCProperty;
|
|
|
2277
2314
|
return header instanceof VideoConfig;
|
|
2278
2315
|
}
|
|
2279
2316
|
_LOCProperty.isVideoConfig = isVideoConfig;
|
|
2317
|
+
function isAudioConfig(header) {
|
|
2318
|
+
return header instanceof AudioConfig;
|
|
2319
|
+
}
|
|
2320
|
+
_LOCProperty.isAudioConfig = isAudioConfig;
|
|
2280
2321
|
})(LOCProperty || (LOCProperty = {}));
|
|
2281
2322
|
var LOCProperties = class {
|
|
2282
2323
|
kvps = [];
|
|
@@ -2288,8 +2329,9 @@ var LOCProperties = class {
|
|
|
2288
2329
|
this.kvps.push(new Timescale(BigInt(timescale)).toKeyValuePair());
|
|
2289
2330
|
return this;
|
|
2290
2331
|
}
|
|
2291
|
-
|
|
2292
|
-
|
|
2332
|
+
/** Marks a whole, non-scalable frame (RFC 9626 short form): S and E set, I set on a keyframe. */
|
|
2333
|
+
addVideoFrameMarking(isKey) {
|
|
2334
|
+
this.kvps.push(new VideoFrameMarking(new Uint8Array([isKey ? 224 : 192])).toKeyValuePair());
|
|
2293
2335
|
return this;
|
|
2294
2336
|
}
|
|
2295
2337
|
addAudioLevel(audioLevel) {
|
|
@@ -2300,6 +2342,10 @@ var LOCProperties = class {
|
|
|
2300
2342
|
this.kvps.push(new VideoConfig(config).toKeyValuePair());
|
|
2301
2343
|
return this;
|
|
2302
2344
|
}
|
|
2345
|
+
addAudioConfig(config) {
|
|
2346
|
+
this.kvps.push(new AudioConfig(config).toKeyValuePair());
|
|
2347
|
+
return this;
|
|
2348
|
+
}
|
|
2303
2349
|
addRaw(pair) {
|
|
2304
2350
|
this.kvps.push(pair);
|
|
2305
2351
|
return this;
|
|
@@ -2316,8 +2362,7 @@ var LOCProperties = class {
|
|
|
2316
2362
|
return result;
|
|
2317
2363
|
}
|
|
2318
2364
|
};
|
|
2319
|
-
|
|
2320
|
-
//#region src/model/common/grease.ts
|
|
2365
|
+
// src/model/common/grease.ts
|
|
2321
2366
|
/**
|
|
2322
2367
|
* Copyright 2026 The MOQtail Authors
|
|
2323
2368
|
*
|
|
@@ -2363,8 +2408,7 @@ function greaseValue(n) {
|
|
|
2363
2408
|
const value = GREASE_STEP * BigInt(n) + GREASE_BASE;
|
|
2364
2409
|
return value > GREASE_MAX ? void 0 : value;
|
|
2365
2410
|
}
|
|
2366
|
-
|
|
2367
|
-
//#region src/model/property/track_property.ts
|
|
2411
|
+
// src/model/property/track_property.ts
|
|
2368
2412
|
/**
|
|
2369
2413
|
* Copyright 2026 The MOQtail Authors
|
|
2370
2414
|
*
|
|
@@ -2544,8 +2588,7 @@ let TrackProperty;
|
|
|
2544
2588
|
}
|
|
2545
2589
|
_TrackProperty.isUnknown = isUnknown;
|
|
2546
2590
|
})(TrackProperty || (TrackProperty = {}));
|
|
2547
|
-
|
|
2548
|
-
//#region src/model/property/object_property.ts
|
|
2591
|
+
// src/model/property/object_property.ts
|
|
2549
2592
|
/**
|
|
2550
2593
|
* Copyright 2026 The MOQtail Authors
|
|
2551
2594
|
*
|
|
@@ -2649,8 +2692,41 @@ let ObjectProperty;
|
|
|
2649
2692
|
}
|
|
2650
2693
|
_ObjectProperty.isUnknown = isUnknown;
|
|
2651
2694
|
})(ObjectProperty || (ObjectProperty = {}));
|
|
2652
|
-
|
|
2653
|
-
|
|
2695
|
+
// src/model/property/find.ts
|
|
2696
|
+
/**
|
|
2697
|
+
* Copyright 2026 The MOQtail Authors
|
|
2698
|
+
*
|
|
2699
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2700
|
+
* you may not use this file except in compliance with the License.
|
|
2701
|
+
* You may obtain a copy of the License at
|
|
2702
|
+
*
|
|
2703
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2704
|
+
*
|
|
2705
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2706
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2707
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2708
|
+
* See the License for the specific language governing permissions and
|
|
2709
|
+
* limitations under the License.
|
|
2710
|
+
*/
|
|
2711
|
+
/**
|
|
2712
|
+
* @public
|
|
2713
|
+
* Finds the first property of `reader`'s type in a track or object property list and
|
|
2714
|
+
* returns it typed, or `undefined`. Unknown properties keep their raw key-value pair, so
|
|
2715
|
+
* a type the model doesn't know is still found.
|
|
2716
|
+
*
|
|
2717
|
+
* @example
|
|
2718
|
+
* ```ts
|
|
2719
|
+
* const timeout = findProperty(subscribeOk.trackProperties, ObjectDeliveryTimeoutProperty)
|
|
2720
|
+
* ```
|
|
2721
|
+
*/
|
|
2722
|
+
function findProperty(properties, reader) {
|
|
2723
|
+
const type = BigInt(reader.TYPE);
|
|
2724
|
+
for (const property of properties ?? []) {
|
|
2725
|
+
const pair = property instanceof KeyValuePair ? property : property.toKeyValuePair();
|
|
2726
|
+
if (pair.typeValue === type) return reader.fromKeyValuePair(pair);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
// src/model/data/subgroup_object.ts
|
|
2654
2730
|
/**
|
|
2655
2731
|
* Copyright 2025 The MOQtail Authors
|
|
2656
2732
|
*
|
|
@@ -2715,8 +2791,7 @@ var SubgroupObject = class SubgroupObject {
|
|
|
2715
2791
|
return new SubgroupObject(objectId, normalizeProperties(properties), objectStatus, payload);
|
|
2716
2792
|
}
|
|
2717
2793
|
};
|
|
2718
|
-
|
|
2719
|
-
//#region src/model/data/object.ts
|
|
2794
|
+
// src/model/data/object.ts
|
|
2720
2795
|
var MoqtObject = class MoqtObject {
|
|
2721
2796
|
fullTrackName;
|
|
2722
2797
|
publisherPriority;
|
|
@@ -2836,8 +2911,7 @@ var MoqtObject = class MoqtObject {
|
|
|
2836
2911
|
else return SubgroupObject.newWithStatus(this.location.object, this.properties, this.objectStatus);
|
|
2837
2912
|
}
|
|
2838
2913
|
};
|
|
2839
|
-
|
|
2840
|
-
//#region src/model/data/subgroup_header.ts
|
|
2914
|
+
// src/model/data/subgroup_header.ts
|
|
2841
2915
|
/**
|
|
2842
2916
|
* Copyright 2025 The MOQtail Authors
|
|
2843
2917
|
*
|
|
@@ -2908,8 +2982,7 @@ var SubgroupHeader = class SubgroupHeader {
|
|
|
2908
2982
|
if (this.subgroupId === void 0 && SubgroupHeaderType.isSubgroupIdFirstObjectId(this.type)) this.subgroupId = firstObjectId;
|
|
2909
2983
|
}
|
|
2910
2984
|
};
|
|
2911
|
-
|
|
2912
|
-
//#region src/model/data/request_id.ts
|
|
2985
|
+
// src/model/data/request_id.ts
|
|
2913
2986
|
/**
|
|
2914
2987
|
* Copyright 2025 The MOQtail Authors
|
|
2915
2988
|
*
|
|
@@ -3027,8 +3100,7 @@ var RequestIdMap = class {
|
|
|
3027
3100
|
return this.nameToRequestId.has(name);
|
|
3028
3101
|
}
|
|
3029
3102
|
};
|
|
3030
|
-
|
|
3031
|
-
//#region src/model/data/header.ts
|
|
3103
|
+
// src/model/data/header.ts
|
|
3032
3104
|
/**
|
|
3033
3105
|
* Copyright 2025 The MOQtail Authors
|
|
3034
3106
|
*
|
|
@@ -3076,8 +3148,7 @@ let Header;
|
|
|
3076
3148
|
}
|
|
3077
3149
|
_Header.deserialize = deserialize;
|
|
3078
3150
|
})(Header || (Header = {}));
|
|
3079
|
-
|
|
3080
|
-
//#region src/model/common/byte_buffer.ts
|
|
3151
|
+
// src/model/common/byte_buffer.ts
|
|
3081
3152
|
/**
|
|
3082
3153
|
* Copyright 2025 The MOQtail Authors
|
|
3083
3154
|
*
|
|
@@ -3320,8 +3391,7 @@ var FrozenByteBuffer = class extends BaseByteBuffer {
|
|
|
3320
3391
|
return this.buf.length;
|
|
3321
3392
|
}
|
|
3322
3393
|
};
|
|
3323
|
-
|
|
3324
|
-
//#region src/model/control/publish_skipped.ts
|
|
3394
|
+
// src/model/control/publish_skipped.ts
|
|
3325
3395
|
/**
|
|
3326
3396
|
* Copyright 2026 The MOQtail Authors
|
|
3327
3397
|
*
|
|
@@ -3373,8 +3443,7 @@ var PublishSkipped = class PublishSkipped {
|
|
|
3373
3443
|
return new PublishSkipped(trackNamespaceSuffix, trackName);
|
|
3374
3444
|
}
|
|
3375
3445
|
};
|
|
3376
|
-
|
|
3377
|
-
//#region src/model/parameter/constant.ts
|
|
3446
|
+
// src/model/parameter/constant.ts
|
|
3378
3447
|
/**
|
|
3379
3448
|
* Copyright 2026 The MOQtail Authors
|
|
3380
3449
|
*
|
|
@@ -3498,8 +3567,7 @@ function tokenAliasTypeFromNumber(value) {
|
|
|
3498
3567
|
default: throw new InvalidTypeError("tokenAliasTypeFromNumber", `Invalid token alias type: ${value}`);
|
|
3499
3568
|
}
|
|
3500
3569
|
}
|
|
3501
|
-
|
|
3502
|
-
//#region src/model/common/moqt_url.ts
|
|
3570
|
+
// src/model/common/moqt_url.ts
|
|
3503
3571
|
/**
|
|
3504
3572
|
* Copyright 2026 The MOQtail Authors
|
|
3505
3573
|
*
|
|
@@ -3515,6 +3583,8 @@ function tokenAliasTypeFromNumber(value) {
|
|
|
3515
3583
|
* See the License for the specific language governing permissions and
|
|
3516
3584
|
* limitations under the License.
|
|
3517
3585
|
*/
|
|
3586
|
+
/** URI schemes are case-insensitive (RFC 3986 §3.1, MSF 11.1). */
|
|
3587
|
+
const MOQT_SCHEME = /^moqt:\/\//i;
|
|
3518
3588
|
/**
|
|
3519
3589
|
* @public
|
|
3520
3590
|
* A parsed `moqt://authority/path[?query][#fragment]` URI.
|
|
@@ -3538,7 +3608,7 @@ var MoqtUrl = class MoqtUrl {
|
|
|
3538
3608
|
this.fragment = fragment;
|
|
3539
3609
|
}
|
|
3540
3610
|
static parse(input) {
|
|
3541
|
-
if (!
|
|
3611
|
+
if (!MOQT_SCHEME.test(input)) throw new ProtocolViolationError("MoqtUrl.parse", `URL must use the moqt:// scheme: ${input}`);
|
|
3542
3612
|
let rest = input.slice(7);
|
|
3543
3613
|
let fragment;
|
|
3544
3614
|
const hashIdx = rest.indexOf("#");
|
|
@@ -3594,7 +3664,7 @@ function parseFragment(fragment) {
|
|
|
3594
3664
|
*/
|
|
3595
3665
|
function resolveTransportUrl(url) {
|
|
3596
3666
|
const raw = typeof url === "string" ? url : url.toString();
|
|
3597
|
-
if (!
|
|
3667
|
+
if (!MOQT_SCHEME.test(raw)) return {
|
|
3598
3668
|
transportUrl: raw,
|
|
3599
3669
|
moqtUrl: void 0
|
|
3600
3670
|
};
|
|
@@ -3604,8 +3674,7 @@ function resolveTransportUrl(url) {
|
|
|
3604
3674
|
moqtUrl
|
|
3605
3675
|
};
|
|
3606
3676
|
}
|
|
3607
|
-
|
|
3608
|
-
//#region src/model/common/redirect.ts
|
|
3677
|
+
// src/model/common/redirect.ts
|
|
3609
3678
|
/**
|
|
3610
3679
|
* Copyright 2026 The MOQtail Authors
|
|
3611
3680
|
*
|
|
@@ -3656,8 +3725,7 @@ var Redirect = class Redirect {
|
|
|
3656
3725
|
return new Redirect(connectUri, trackNamespace, trackName);
|
|
3657
3726
|
}
|
|
3658
3727
|
};
|
|
3659
|
-
|
|
3660
|
-
//#region src/model/parameter/common/authorization_token.ts
|
|
3728
|
+
// src/model/parameter/common/authorization_token.ts
|
|
3661
3729
|
/**
|
|
3662
3730
|
* Copyright 2026 The MOQtail Authors
|
|
3663
3731
|
*
|
|
@@ -3724,7 +3792,6 @@ var AuthorizationToken = class AuthorizationToken {
|
|
|
3724
3792
|
case 3:
|
|
3725
3793
|
payload.putVI(this.variant.tokenType);
|
|
3726
3794
|
payload.putBytes(this.variant.tokenValue);
|
|
3727
|
-
break;
|
|
3728
3795
|
}
|
|
3729
3796
|
return KeyValuePair.tryNewBytes(AuthorizationToken.TYPE, payload.toUint8Array());
|
|
3730
3797
|
}
|
|
@@ -3770,8 +3837,7 @@ var AuthorizationToken = class AuthorizationToken {
|
|
|
3770
3837
|
}
|
|
3771
3838
|
}
|
|
3772
3839
|
};
|
|
3773
|
-
|
|
3774
|
-
//#region src/model/parameter/message/fill_timeout.ts
|
|
3840
|
+
// src/model/parameter/message/fill_timeout.ts
|
|
3775
3841
|
/**
|
|
3776
3842
|
* Copyright 2026 The MOQtail Authors
|
|
3777
3843
|
*
|
|
@@ -3805,8 +3871,7 @@ var FillTimeout = class FillTimeout {
|
|
|
3805
3871
|
return new FillTimeout(pair.value);
|
|
3806
3872
|
}
|
|
3807
3873
|
};
|
|
3808
|
-
|
|
3809
|
-
//#region src/model/parameter/message/object_delivery_timeout.ts
|
|
3874
|
+
// src/model/parameter/message/object_delivery_timeout.ts
|
|
3810
3875
|
/**
|
|
3811
3876
|
* Copyright 2026 The MOQtail Authors
|
|
3812
3877
|
*
|
|
@@ -3842,8 +3907,7 @@ var ObjectDeliveryTimeout = class ObjectDeliveryTimeout {
|
|
|
3842
3907
|
return new ObjectDeliveryTimeout(pair.value);
|
|
3843
3908
|
}
|
|
3844
3909
|
};
|
|
3845
|
-
|
|
3846
|
-
//#region src/model/parameter/message/rendezvous_timeout.ts
|
|
3910
|
+
// src/model/parameter/message/rendezvous_timeout.ts
|
|
3847
3911
|
/**
|
|
3848
3912
|
* Copyright 2026 The MOQtail Authors
|
|
3849
3913
|
*
|
|
@@ -3877,8 +3941,7 @@ var RendezvousTimeout = class RendezvousTimeout {
|
|
|
3877
3941
|
return new RendezvousTimeout(pair.value);
|
|
3878
3942
|
}
|
|
3879
3943
|
};
|
|
3880
|
-
|
|
3881
|
-
//#region src/model/parameter/message/subgroup_delivery_timeout.ts
|
|
3944
|
+
// src/model/parameter/message/subgroup_delivery_timeout.ts
|
|
3882
3945
|
/**
|
|
3883
3946
|
* Copyright 2026 The MOQtail Authors
|
|
3884
3947
|
*
|
|
@@ -3912,8 +3975,7 @@ var SubgroupDeliveryTimeout = class SubgroupDeliveryTimeout {
|
|
|
3912
3975
|
return new SubgroupDeliveryTimeout(pair.value);
|
|
3913
3976
|
}
|
|
3914
3977
|
};
|
|
3915
|
-
|
|
3916
|
-
//#region src/model/parameter/message/expires.ts
|
|
3978
|
+
// src/model/parameter/message/expires.ts
|
|
3917
3979
|
/**
|
|
3918
3980
|
* Copyright 2026 The MOQtail Authors
|
|
3919
3981
|
*
|
|
@@ -3948,8 +4010,7 @@ var Expires = class Expires {
|
|
|
3948
4010
|
return new Expires(pair.value);
|
|
3949
4011
|
}
|
|
3950
4012
|
};
|
|
3951
|
-
|
|
3952
|
-
//#region src/model/parameter/message/forward.ts
|
|
4013
|
+
// src/model/parameter/message/forward.ts
|
|
3953
4014
|
/**
|
|
3954
4015
|
* Copyright 2026 The MOQtail Authors
|
|
3955
4016
|
*
|
|
@@ -3986,8 +4047,7 @@ var Forward = class Forward {
|
|
|
3986
4047
|
return new Forward(pair.value === 1n);
|
|
3987
4048
|
}
|
|
3988
4049
|
};
|
|
3989
|
-
|
|
3990
|
-
//#region src/model/parameter/message/include_properties.ts
|
|
4050
|
+
// src/model/parameter/message/include_properties.ts
|
|
3991
4051
|
/**
|
|
3992
4052
|
* Copyright 2026 The MOQtail Authors
|
|
3993
4053
|
*
|
|
@@ -4025,8 +4085,7 @@ var IncludeProperties = class IncludeProperties {
|
|
|
4025
4085
|
return new IncludeProperties(pair.value === 1n);
|
|
4026
4086
|
}
|
|
4027
4087
|
};
|
|
4028
|
-
|
|
4029
|
-
//#region src/model/parameter/message/group_order_param.ts
|
|
4088
|
+
// src/model/parameter/message/group_order_param.ts
|
|
4030
4089
|
/**
|
|
4031
4090
|
* Copyright 2026 The MOQtail Authors
|
|
4032
4091
|
*
|
|
@@ -4063,8 +4122,7 @@ var GroupOrderParam = class GroupOrderParam {
|
|
|
4063
4122
|
return new GroupOrderParam(Number(pair.value));
|
|
4064
4123
|
}
|
|
4065
4124
|
};
|
|
4066
|
-
|
|
4067
|
-
//#region src/model/parameter/message/largest_object.ts
|
|
4125
|
+
// src/model/parameter/message/largest_object.ts
|
|
4068
4126
|
/**
|
|
4069
4127
|
* Copyright 2026 The MOQtail Authors
|
|
4070
4128
|
*
|
|
@@ -4105,8 +4163,7 @@ var LargestObject = class LargestObject {
|
|
|
4105
4163
|
return new LargestObject(location);
|
|
4106
4164
|
}
|
|
4107
4165
|
};
|
|
4108
|
-
|
|
4109
|
-
//#region src/model/parameter/message/new_group_request.ts
|
|
4166
|
+
// src/model/parameter/message/new_group_request.ts
|
|
4110
4167
|
/**
|
|
4111
4168
|
* Copyright 2026 The MOQtail Authors
|
|
4112
4169
|
*
|
|
@@ -4141,8 +4198,7 @@ var NewGroupRequest = class NewGroupRequest {
|
|
|
4141
4198
|
return new NewGroupRequest(pair.value);
|
|
4142
4199
|
}
|
|
4143
4200
|
};
|
|
4144
|
-
|
|
4145
|
-
//#region src/model/parameter/message/switching_set_assignment.ts
|
|
4201
|
+
// src/model/parameter/message/switching_set_assignment.ts
|
|
4146
4202
|
/**
|
|
4147
4203
|
* Copyright 2026 The MOQtail Authors
|
|
4148
4204
|
*
|
|
@@ -4209,8 +4265,7 @@ var SwitchingSetAssignment = class SwitchingSetAssignment {
|
|
|
4209
4265
|
return new SwitchingSetAssignment(switchingSetId, algorithmId, throughputThresholdKbps, setThroughputWeight, activateSwitching, setRank);
|
|
4210
4266
|
}
|
|
4211
4267
|
};
|
|
4212
|
-
|
|
4213
|
-
//#region src/model/parameter/message/subscriber_priority.ts
|
|
4268
|
+
// src/model/parameter/message/subscriber_priority.ts
|
|
4214
4269
|
/**
|
|
4215
4270
|
* Copyright 2026 The MOQtail Authors
|
|
4216
4271
|
*
|
|
@@ -4247,8 +4302,7 @@ var SubscriberPriority = class SubscriberPriority {
|
|
|
4247
4302
|
return new SubscriberPriority(Number(pair.value));
|
|
4248
4303
|
}
|
|
4249
4304
|
};
|
|
4250
|
-
|
|
4251
|
-
//#region src/model/parameter/message/location_filter.ts
|
|
4305
|
+
// src/model/parameter/message/location_filter.ts
|
|
4252
4306
|
/**
|
|
4253
4307
|
* Copyright 2026 The MOQtail Authors
|
|
4254
4308
|
*
|
|
@@ -4422,8 +4476,7 @@ var LocationFilter = class LocationFilter {
|
|
|
4422
4476
|
return filter;
|
|
4423
4477
|
}
|
|
4424
4478
|
};
|
|
4425
|
-
|
|
4426
|
-
//#region src/model/parameter/message/switch_from.ts
|
|
4479
|
+
// src/model/parameter/message/switch_from.ts
|
|
4427
4480
|
/**
|
|
4428
4481
|
* Copyright 2026 The MOQtail Authors
|
|
4429
4482
|
*
|
|
@@ -4474,8 +4527,7 @@ var SwitchFrom = class SwitchFrom {
|
|
|
4474
4527
|
return new SwitchFrom(requestId, Number(modeValue), (flags & 128) !== 0);
|
|
4475
4528
|
}
|
|
4476
4529
|
};
|
|
4477
|
-
|
|
4478
|
-
//#region src/model/parameter/message/fill_parameters.ts
|
|
4530
|
+
// src/model/parameter/message/fill_parameters.ts
|
|
4479
4531
|
/**
|
|
4480
4532
|
* Copyright 2026 The MOQtail Authors
|
|
4481
4533
|
*
|
|
@@ -4533,8 +4585,7 @@ var FillParameters = class FillParameters {
|
|
|
4533
4585
|
return new FillParameters(MessageParameters.fromKeyValuePairs(pairs));
|
|
4534
4586
|
}
|
|
4535
4587
|
};
|
|
4536
|
-
|
|
4537
|
-
//#region src/model/parameter/message/range_filter.ts
|
|
4588
|
+
// src/model/parameter/message/range_filter.ts
|
|
4538
4589
|
/**
|
|
4539
4590
|
* Copyright 2026 The MOQtail Authors
|
|
4540
4591
|
*
|
|
@@ -4726,8 +4777,7 @@ var RangeFilter = class RangeFilter {
|
|
|
4726
4777
|
return new RangeFilter(kind, setId, propertyType, deltas);
|
|
4727
4778
|
}
|
|
4728
4779
|
};
|
|
4729
|
-
|
|
4730
|
-
//#region src/model/parameter/message_parameter.ts
|
|
4780
|
+
// src/model/parameter/message_parameter.ts
|
|
4731
4781
|
/**
|
|
4732
4782
|
* Copyright 2026 The MOQtail Authors
|
|
4733
4783
|
*
|
|
@@ -4950,9 +5000,7 @@ function serializeMessageParameterKvps(items) {
|
|
|
4950
5000
|
case 4:
|
|
4951
5001
|
if (isBytes(kvp)) buf.putLengthPrefixedBytes(kvp.value);
|
|
4952
5002
|
break;
|
|
4953
|
-
case 0:
|
|
4954
|
-
if (isVarInt(kvp)) buf.putVI(kvp.value);
|
|
4955
|
-
break;
|
|
5003
|
+
case 0: if (isVarInt(kvp)) buf.putVI(kvp.value);
|
|
4956
5004
|
}
|
|
4957
5005
|
prevType = kvp.typeValue;
|
|
4958
5006
|
}
|
|
@@ -4989,9 +5037,7 @@ function readMessageParameterKvps(buf, more) {
|
|
|
4989
5037
|
case 4:
|
|
4990
5038
|
items.push(KeyValuePair.deserializeBytesValue(buf, typeValue));
|
|
4991
5039
|
break;
|
|
4992
|
-
case 0:
|
|
4993
|
-
items.push(KeyValuePair.tryNewVarInt(typeValue, buf.getVI()));
|
|
4994
|
-
break;
|
|
5040
|
+
case 0: items.push(KeyValuePair.tryNewVarInt(typeValue, buf.getVI()));
|
|
4995
5041
|
}
|
|
4996
5042
|
prevType = typeValue;
|
|
4997
5043
|
}
|
|
@@ -5012,8 +5058,7 @@ function applyMessageParameterUpdate(current, updates) {
|
|
|
5012
5058
|
const kept = current.filter((p) => !updated.has(typeOf(p)));
|
|
5013
5059
|
current.splice(0, current.length, ...kept, ...updates.filter((u) => !(u instanceof RangeFilter && u.isRemoval)));
|
|
5014
5060
|
}
|
|
5015
|
-
|
|
5016
|
-
//#region src/model/control/publish_namespace.ts
|
|
5061
|
+
// src/model/control/publish_namespace.ts
|
|
5017
5062
|
/**
|
|
5018
5063
|
* Copyright 2025 The MOQtail Authors
|
|
5019
5064
|
*
|
|
@@ -5097,8 +5142,7 @@ var PublishNamespace = class PublishNamespace {
|
|
|
5097
5142
|
return new PublishNamespace(requestId, trackNamespace, parameters);
|
|
5098
5143
|
}
|
|
5099
5144
|
};
|
|
5100
|
-
|
|
5101
|
-
//#region src/model/control/namespace.ts
|
|
5145
|
+
// src/model/control/namespace.ts
|
|
5102
5146
|
/**
|
|
5103
5147
|
* Copyright 2025 The MOQtail Authors
|
|
5104
5148
|
*
|
|
@@ -5143,8 +5187,7 @@ var Namespace = class Namespace {
|
|
|
5143
5187
|
return new Namespace(trackNamespaceSuffix);
|
|
5144
5188
|
}
|
|
5145
5189
|
};
|
|
5146
|
-
|
|
5147
|
-
//#region src/model/control/namespace_done.ts
|
|
5190
|
+
// src/model/control/namespace_done.ts
|
|
5148
5191
|
/**
|
|
5149
5192
|
* Copyright 2025 The MOQtail Authors
|
|
5150
5193
|
*
|
|
@@ -5189,8 +5232,7 @@ var NamespaceDone = class NamespaceDone {
|
|
|
5189
5232
|
return new NamespaceDone(trackNamespaceSuffix);
|
|
5190
5233
|
}
|
|
5191
5234
|
};
|
|
5192
|
-
|
|
5193
|
-
//#region src/model/control/setup.ts
|
|
5235
|
+
// src/model/control/setup.ts
|
|
5194
5236
|
/**
|
|
5195
5237
|
* Copyright 2026 The MOQtail Authors
|
|
5196
5238
|
*
|
|
@@ -5239,8 +5281,7 @@ var Setup = class Setup {
|
|
|
5239
5281
|
return new Setup(setupOptions);
|
|
5240
5282
|
}
|
|
5241
5283
|
};
|
|
5242
|
-
|
|
5243
|
-
//#region src/model/control/fetch.ts
|
|
5284
|
+
// src/model/control/fetch.ts
|
|
5244
5285
|
/**
|
|
5245
5286
|
* Copyright 2025 The MOQtail Authors
|
|
5246
5287
|
*
|
|
@@ -5297,8 +5338,7 @@ var Fetch = class Fetch {
|
|
|
5297
5338
|
return new Fetch(requestId, fullTrackName, parameters);
|
|
5298
5339
|
}
|
|
5299
5340
|
};
|
|
5300
|
-
|
|
5301
|
-
//#region src/model/control/fetch_ok.ts
|
|
5341
|
+
// src/model/control/fetch_ok.ts
|
|
5302
5342
|
/**
|
|
5303
5343
|
* Copyright 2025 The MOQtail Authors
|
|
5304
5344
|
*
|
|
@@ -5362,8 +5402,7 @@ var FetchOk = class FetchOk {
|
|
|
5362
5402
|
return new FetchOk(endOfTrack, endLocation, parameters, trackProperties);
|
|
5363
5403
|
}
|
|
5364
5404
|
};
|
|
5365
|
-
|
|
5366
|
-
//#region src/model/control/goaway.ts
|
|
5405
|
+
// src/model/control/goaway.ts
|
|
5367
5406
|
/**
|
|
5368
5407
|
* Copyright 2025 The MOQtail Authors
|
|
5369
5408
|
*
|
|
@@ -5438,8 +5477,7 @@ var GoAway = class GoAway {
|
|
|
5438
5477
|
return new GoAway(newSessionUri, timeout);
|
|
5439
5478
|
}
|
|
5440
5479
|
};
|
|
5441
|
-
|
|
5442
|
-
//#region src/model/control/subscribe.ts
|
|
5480
|
+
// src/model/control/subscribe.ts
|
|
5443
5481
|
/**
|
|
5444
5482
|
* Copyright 2025 The MOQtail Authors
|
|
5445
5483
|
*
|
|
@@ -5492,8 +5530,7 @@ var Subscribe = class Subscribe {
|
|
|
5492
5530
|
return new Subscribe(requestId, fullTrackName, parameters);
|
|
5493
5531
|
}
|
|
5494
5532
|
};
|
|
5495
|
-
|
|
5496
|
-
//#region src/model/control/publish_done.ts
|
|
5533
|
+
// src/model/control/publish_done.ts
|
|
5497
5534
|
/**
|
|
5498
5535
|
* Copyright 2025 The MOQtail Authors
|
|
5499
5536
|
*
|
|
@@ -5549,8 +5586,7 @@ var PublishDone = class PublishDone {
|
|
|
5549
5586
|
return new PublishDone(statusCode, streamCount, errorReason);
|
|
5550
5587
|
}
|
|
5551
5588
|
};
|
|
5552
|
-
|
|
5553
|
-
//#region src/model/control/publish.ts
|
|
5589
|
+
// src/model/control/publish.ts
|
|
5554
5590
|
/**
|
|
5555
5591
|
* Copyright 2025 The MOQtail Authors
|
|
5556
5592
|
*
|
|
@@ -5608,8 +5644,7 @@ var Publish = class Publish {
|
|
|
5608
5644
|
return new Publish(requestId, fullTrackName, trackAlias, parameters, trackProperties);
|
|
5609
5645
|
}
|
|
5610
5646
|
};
|
|
5611
|
-
|
|
5612
|
-
//#region src/model/control/subscribe_ok.ts
|
|
5647
|
+
// src/model/control/subscribe_ok.ts
|
|
5613
5648
|
/**
|
|
5614
5649
|
* Copyright 2025 The MOQtail Authors
|
|
5615
5650
|
*
|
|
@@ -5667,8 +5702,7 @@ var SubscribeOk = class SubscribeOk {
|
|
|
5667
5702
|
return new SubscribeOk(trackAlias, parameters, trackProperties);
|
|
5668
5703
|
}
|
|
5669
5704
|
};
|
|
5670
|
-
|
|
5671
|
-
//#region src/model/control/request_update.ts
|
|
5705
|
+
// src/model/control/request_update.ts
|
|
5672
5706
|
/**
|
|
5673
5707
|
* Copyright 2025 The MOQtail Authors
|
|
5674
5708
|
*
|
|
@@ -5732,8 +5766,7 @@ var RequestUpdate = class RequestUpdate {
|
|
|
5732
5766
|
return true;
|
|
5733
5767
|
}
|
|
5734
5768
|
};
|
|
5735
|
-
|
|
5736
|
-
//#region src/model/control/track_status.ts
|
|
5769
|
+
// src/model/control/track_status.ts
|
|
5737
5770
|
/**
|
|
5738
5771
|
* Copyright 2025 The MOQtail Authors
|
|
5739
5772
|
*
|
|
@@ -5802,8 +5835,7 @@ var TrackStatus = class TrackStatus {
|
|
|
5802
5835
|
return new TrackStatus(requestId, trackAlias, fullTrackName, subscriberPriority, groupOrder, forward, locationFilter, subscribeParameters);
|
|
5803
5836
|
}
|
|
5804
5837
|
};
|
|
5805
|
-
|
|
5806
|
-
//#region src/model/control/subscribe_namespace.ts
|
|
5838
|
+
// src/model/control/subscribe_namespace.ts
|
|
5807
5839
|
/**
|
|
5808
5840
|
* Copyright 2025 The MOQtail Authors
|
|
5809
5841
|
*
|
|
@@ -5853,8 +5885,7 @@ var SubscribeNamespace = class SubscribeNamespace {
|
|
|
5853
5885
|
return new SubscribeNamespace(requestId, trackNamespacePrefix, parameters);
|
|
5854
5886
|
}
|
|
5855
5887
|
};
|
|
5856
|
-
|
|
5857
|
-
//#region src/model/control/subscribe_tracks.ts
|
|
5888
|
+
// src/model/control/subscribe_tracks.ts
|
|
5858
5889
|
/**
|
|
5859
5890
|
* Copyright 2026 The MOQtail Authors
|
|
5860
5891
|
*
|
|
@@ -5911,8 +5942,7 @@ var SubscribeTracks = class SubscribeTracks {
|
|
|
5911
5942
|
return new SubscribeTracks(requestId, trackNamespacePrefix, parameters);
|
|
5912
5943
|
}
|
|
5913
5944
|
};
|
|
5914
|
-
|
|
5915
|
-
//#region src/model/control/request_ok.ts
|
|
5945
|
+
// src/model/control/request_ok.ts
|
|
5916
5946
|
/**
|
|
5917
5947
|
* Copyright 2026 The MOQtail Authors
|
|
5918
5948
|
*
|
|
@@ -5995,8 +6025,7 @@ var RequestOk = class RequestOk {
|
|
|
5995
6025
|
return new RequestOk(parameters, trackProperties);
|
|
5996
6026
|
}
|
|
5997
6027
|
};
|
|
5998
|
-
|
|
5999
|
-
//#region src/model/control/request_error.ts
|
|
6028
|
+
// src/model/control/request_error.ts
|
|
6000
6029
|
/**
|
|
6001
6030
|
* Copyright 2025 The MOQtail Authors
|
|
6002
6031
|
*
|
|
@@ -6058,8 +6087,7 @@ var RequestError = class RequestError {
|
|
|
6058
6087
|
return new RequestError(errorCode, retryInterval, reasonPhrase, redirect);
|
|
6059
6088
|
}
|
|
6060
6089
|
};
|
|
6061
|
-
|
|
6062
|
-
//#region src/model/control/control_message.ts
|
|
6090
|
+
// src/model/control/control_message.ts
|
|
6063
6091
|
/**
|
|
6064
6092
|
* Copyright 2025 The MOQtail Authors
|
|
6065
6093
|
*
|
|
@@ -6112,176 +6140,7 @@ let ControlMessage;
|
|
|
6112
6140
|
}
|
|
6113
6141
|
_ControlMessage.serialize = serialize;
|
|
6114
6142
|
})(ControlMessage || (ControlMessage = {}));
|
|
6115
|
-
|
|
6116
|
-
//#region src/model/catalog/cmsf.ts
|
|
6117
|
-
function isString(v) {
|
|
6118
|
-
return typeof v === "string";
|
|
6119
|
-
}
|
|
6120
|
-
function isNumber(v) {
|
|
6121
|
-
return typeof v === "number";
|
|
6122
|
-
}
|
|
6123
|
-
function isStringArray(v) {
|
|
6124
|
-
return Array.isArray(v) && v.every((item) => isString(item));
|
|
6125
|
-
}
|
|
6126
|
-
function isValidPackaging(v) {
|
|
6127
|
-
return v === "cmaf" || v === "chunk-per-object" || v === "timeline";
|
|
6128
|
-
}
|
|
6129
|
-
function isValidRole(v) {
|
|
6130
|
-
return v === "video" || v === "audio" || v === "timeline";
|
|
6131
|
-
}
|
|
6132
|
-
function isValidBase64(str) {
|
|
6133
|
-
try {
|
|
6134
|
-
return btoa(atob(str)) === str;
|
|
6135
|
-
} catch {
|
|
6136
|
-
return false;
|
|
6137
|
-
}
|
|
6138
|
-
}
|
|
6139
|
-
function validateTrack(track) {
|
|
6140
|
-
if (typeof track !== "object" || track === null) throw new Error("Track must be an object");
|
|
6141
|
-
const t = track;
|
|
6142
|
-
if (!isString(t["name"])) throw new Error("Track.name must be a string");
|
|
6143
|
-
if (!isValidPackaging(t["packaging"])) throw new Error("Track.packaging must be 'cmaf', 'chunk-per-object', or 'timeline'");
|
|
6144
|
-
if (!isValidRole(t["role"])) throw new Error("Track.role must be 'video', 'audio', or 'timeline'");
|
|
6145
|
-
const name = t["name"];
|
|
6146
|
-
const packaging = t["packaging"];
|
|
6147
|
-
const role = t["role"];
|
|
6148
|
-
let codec;
|
|
6149
|
-
if (t["codec"] !== void 0) {
|
|
6150
|
-
if (!isString(t["codec"])) throw new Error("Track.codec must be a string");
|
|
6151
|
-
codec = t["codec"];
|
|
6152
|
-
}
|
|
6153
|
-
let depends;
|
|
6154
|
-
if (t["depends"] !== void 0) {
|
|
6155
|
-
if (!isStringArray(t["depends"])) throw new Error("Track.depends must be an array of strings");
|
|
6156
|
-
depends = t["depends"];
|
|
6157
|
-
}
|
|
6158
|
-
let mimeType;
|
|
6159
|
-
if (t["mimeType"] !== void 0) {
|
|
6160
|
-
if (!isString(t["mimeType"])) throw new Error("Track.mimeType must be a string");
|
|
6161
|
-
mimeType = t["mimeType"];
|
|
6162
|
-
}
|
|
6163
|
-
let width;
|
|
6164
|
-
if (t["width"] !== void 0) {
|
|
6165
|
-
if (!isNumber(t["width"])) throw new Error("Track.width must be a number");
|
|
6166
|
-
width = t["width"];
|
|
6167
|
-
}
|
|
6168
|
-
let height;
|
|
6169
|
-
if (t["height"] !== void 0) {
|
|
6170
|
-
if (!isNumber(t["height"])) throw new Error("Track.height must be a number");
|
|
6171
|
-
height = t["height"];
|
|
6172
|
-
}
|
|
6173
|
-
let timescale;
|
|
6174
|
-
if (t["timescale"] !== void 0) {
|
|
6175
|
-
if (!isNumber(t["timescale"])) throw new Error("Track.timescale must be a number");
|
|
6176
|
-
timescale = t["timescale"];
|
|
6177
|
-
}
|
|
6178
|
-
let bitrate;
|
|
6179
|
-
if (t["bitrate"] !== void 0) {
|
|
6180
|
-
if (!isNumber(t["bitrate"])) throw new Error("Track.bitrate must be a number");
|
|
6181
|
-
bitrate = t["bitrate"];
|
|
6182
|
-
}
|
|
6183
|
-
let initData;
|
|
6184
|
-
if (t["initData"] !== void 0) {
|
|
6185
|
-
if (!isString(t["initData"])) throw new Error("Track.initData must be a string");
|
|
6186
|
-
if (!isValidBase64(t["initData"])) throw new Error("Track.initData must be a valid base64 string");
|
|
6187
|
-
initData = t["initData"];
|
|
6188
|
-
}
|
|
6189
|
-
if (packaging === "cmaf" && (!codec || codec.length === 0)) throw new Error("codec is required when packaging is 'cmaf'");
|
|
6190
|
-
if (packaging === "timeline" && mimeType !== "text/csv") throw new Error("mimeType must be 'text/csv' when packaging is 'timeline'");
|
|
6191
|
-
if (packaging === "timeline" && (!depends || depends.length === 0)) throw new Error("At least one dependee must be present when packaging is 'timeline'");
|
|
6192
|
-
const result = {
|
|
6193
|
-
name,
|
|
6194
|
-
packaging,
|
|
6195
|
-
role
|
|
6196
|
-
};
|
|
6197
|
-
if (codec !== void 0) result.codec = codec;
|
|
6198
|
-
if (depends !== void 0) result.depends = depends;
|
|
6199
|
-
if (mimeType !== void 0) result.mimeType = mimeType;
|
|
6200
|
-
if (width !== void 0) result.width = width;
|
|
6201
|
-
if (height !== void 0) result.height = height;
|
|
6202
|
-
if (timescale !== void 0) result.timescale = timescale;
|
|
6203
|
-
if (bitrate !== void 0) result.bitrate = bitrate;
|
|
6204
|
-
if (initData !== void 0) result.initData = initData;
|
|
6205
|
-
return result;
|
|
6206
|
-
}
|
|
6207
|
-
function validateCMSF(obj) {
|
|
6208
|
-
if (typeof obj !== "object" || obj === null) throw new Error("CMSF must be an object");
|
|
6209
|
-
const o = obj;
|
|
6210
|
-
if (!isString(o["version"])) throw new Error("CMSF.version must be a string");
|
|
6211
|
-
if (!Array.isArray(o["tracks"])) throw new Error("CMSF.tracks must be an array");
|
|
6212
|
-
return {
|
|
6213
|
-
version: o["version"],
|
|
6214
|
-
tracks: o["tracks"].map(validateTrack)
|
|
6215
|
-
};
|
|
6216
|
-
}
|
|
6217
|
-
var CMSFCatalog = class CMSFCatalog {
|
|
6218
|
-
#catalog;
|
|
6219
|
-
constructor(catalog) {
|
|
6220
|
-
this.#catalog = catalog;
|
|
6221
|
-
}
|
|
6222
|
-
static from(payload) {
|
|
6223
|
-
const json = new TextDecoder().decode(payload);
|
|
6224
|
-
const catalog = validateCMSF(JSON.parse(json));
|
|
6225
|
-
return new CMSFCatalog(catalog);
|
|
6226
|
-
}
|
|
6227
|
-
getByTrackName(trackName) {
|
|
6228
|
-
return this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName));
|
|
6229
|
-
}
|
|
6230
|
-
getTracks(role) {
|
|
6231
|
-
if (role) return this.#catalog.tracks.filter((track) => track.role === role);
|
|
6232
|
-
return this.#catalog.tracks;
|
|
6233
|
-
}
|
|
6234
|
-
getVideo(index = 0) {
|
|
6235
|
-
const videos = this.#catalog.tracks.filter((track) => track.role === "video");
|
|
6236
|
-
if (index < 0 || index >= videos.length) return void 0;
|
|
6237
|
-
return videos[index];
|
|
6238
|
-
}
|
|
6239
|
-
getAudio(index = 0) {
|
|
6240
|
-
const audios = this.#catalog.tracks.filter((track) => track.role === "audio");
|
|
6241
|
-
if (index < 0 || index >= audios.length) return void 0;
|
|
6242
|
-
return audios[index];
|
|
6243
|
-
}
|
|
6244
|
-
getTimeline(index = 0) {
|
|
6245
|
-
const timelines = this.#catalog.tracks.filter((track) => track.role === "timeline");
|
|
6246
|
-
if (index < 0 || index >= timelines.length) return void 0;
|
|
6247
|
-
return timelines[index];
|
|
6248
|
-
}
|
|
6249
|
-
getCodecString(trackName) {
|
|
6250
|
-
const track = this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName));
|
|
6251
|
-
if (!track) return void 0;
|
|
6252
|
-
if (!track.codec) throw new Error(`Track ${trackName} does not have a codec`);
|
|
6253
|
-
return track.codec;
|
|
6254
|
-
}
|
|
6255
|
-
getRole(trackName) {
|
|
6256
|
-
const track = this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName));
|
|
6257
|
-
if (!track) return void 0;
|
|
6258
|
-
return track.role;
|
|
6259
|
-
}
|
|
6260
|
-
getPackaging(trackName) {
|
|
6261
|
-
const track = this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName));
|
|
6262
|
-
if (!track) return void 0;
|
|
6263
|
-
return track.packaging;
|
|
6264
|
-
}
|
|
6265
|
-
isCMAF(trackName) {
|
|
6266
|
-
const packaging = this.getPackaging(trackName);
|
|
6267
|
-
return packaging === "cmaf" || packaging === "chunk-per-object";
|
|
6268
|
-
}
|
|
6269
|
-
getTimescale(trackName) {
|
|
6270
|
-
return this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName))?.timescale;
|
|
6271
|
-
}
|
|
6272
|
-
getInitData(trackName) {
|
|
6273
|
-
const track = this.#catalog.tracks.find((track) => track.name === this.extractTrackName(trackName));
|
|
6274
|
-
if (!track) return void 0;
|
|
6275
|
-
if (!track.initData) throw new Error(`Track ${trackName} does not have initData`);
|
|
6276
|
-
return new Uint8Array(atob(track.initData).split("").map((c) => c.charCodeAt(0)));
|
|
6277
|
-
}
|
|
6278
|
-
extractTrackName(input) {
|
|
6279
|
-
const parts = input.split("/");
|
|
6280
|
-
return parts[parts.length - 1];
|
|
6281
|
-
}
|
|
6282
|
-
};
|
|
6283
|
-
//#endregion
|
|
6284
|
-
//#region src/model/parameter/setup/path.ts
|
|
6143
|
+
// src/model/parameter/setup/path.ts
|
|
6285
6144
|
/**
|
|
6286
6145
|
* Copyright 2025 The MOQtail Authors
|
|
6287
6146
|
*
|
|
@@ -6313,8 +6172,7 @@ var Path = class Path {
|
|
|
6313
6172
|
return new Path(moqtPath);
|
|
6314
6173
|
}
|
|
6315
6174
|
};
|
|
6316
|
-
|
|
6317
|
-
//#region src/model/parameter/setup/max_auth_token_cache_size.ts
|
|
6175
|
+
// src/model/parameter/setup/max_auth_token_cache_size.ts
|
|
6318
6176
|
/**
|
|
6319
6177
|
* Copyright 2025 The MOQtail Authors
|
|
6320
6178
|
*
|
|
@@ -6344,8 +6202,7 @@ var MaxAuthTokenCacheSize = class MaxAuthTokenCacheSize {
|
|
|
6344
6202
|
return new MaxAuthTokenCacheSize(pair.value);
|
|
6345
6203
|
}
|
|
6346
6204
|
};
|
|
6347
|
-
|
|
6348
|
-
//#region src/model/parameter/setup/authority.ts
|
|
6205
|
+
// src/model/parameter/setup/authority.ts
|
|
6349
6206
|
/**
|
|
6350
6207
|
* Copyright 2026 The MOQtail Authors
|
|
6351
6208
|
*
|
|
@@ -6367,7 +6224,7 @@ var MaxAuthTokenCacheSize = class MaxAuthTokenCacheSize {
|
|
|
6367
6224
|
*
|
|
6368
6225
|
* Client-only; MUST NOT be sent by a server or over WebTransport. moqtail-ts always
|
|
6369
6226
|
* connects over WebTransport, so its own handshake never sends this — see
|
|
6370
|
-
* `MOQtailClient.
|
|
6227
|
+
* `MOQtailClient.init`.
|
|
6371
6228
|
*/
|
|
6372
6229
|
var Authority = class Authority {
|
|
6373
6230
|
authority;
|
|
@@ -6385,8 +6242,7 @@ var Authority = class Authority {
|
|
|
6385
6242
|
return new Authority(authority);
|
|
6386
6243
|
}
|
|
6387
6244
|
};
|
|
6388
|
-
|
|
6389
|
-
//#region src/model/parameter/setup/max_filter_ranges.ts
|
|
6245
|
+
// src/model/parameter/setup/max_filter_ranges.ts
|
|
6390
6246
|
/**
|
|
6391
6247
|
* Copyright 2026 The MOQtail Authors
|
|
6392
6248
|
*
|
|
@@ -6421,8 +6277,7 @@ var MaxFilterRanges = class MaxFilterRanges {
|
|
|
6421
6277
|
return new MaxFilterRanges(pair.value);
|
|
6422
6278
|
}
|
|
6423
6279
|
};
|
|
6424
|
-
|
|
6425
|
-
//#region src/model/parameter/setup/moqt_implementation.ts
|
|
6280
|
+
// src/model/parameter/setup/moqt_implementation.ts
|
|
6426
6281
|
/**
|
|
6427
6282
|
* Copyright 2026 The MOQtail Authors
|
|
6428
6283
|
*
|
|
@@ -6458,8 +6313,7 @@ var MoqtImplementation = class MoqtImplementation {
|
|
|
6458
6313
|
return new MoqtImplementation(info);
|
|
6459
6314
|
}
|
|
6460
6315
|
};
|
|
6461
|
-
|
|
6462
|
-
//#region src/model/parameter/setup/max_request_updates.ts
|
|
6316
|
+
// src/model/parameter/setup/max_request_updates.ts
|
|
6463
6317
|
/**
|
|
6464
6318
|
* Copyright 2026 The MOQtail Authors
|
|
6465
6319
|
*
|
|
@@ -6494,8 +6348,7 @@ var MaxRequestUpdates = class MaxRequestUpdates {
|
|
|
6494
6348
|
return new MaxRequestUpdates(pair.value);
|
|
6495
6349
|
}
|
|
6496
6350
|
};
|
|
6497
|
-
|
|
6498
|
-
//#region src/model/parameter/setup/ssts_algorithms.ts
|
|
6351
|
+
// src/model/parameter/setup/ssts_algorithms.ts
|
|
6499
6352
|
/**
|
|
6500
6353
|
* Copyright 2026 The MOQtail Authors
|
|
6501
6354
|
*
|
|
@@ -6539,8 +6392,7 @@ var SstsAlgorithms = class SstsAlgorithms {
|
|
|
6539
6392
|
return new SstsAlgorithms(algorithms);
|
|
6540
6393
|
}
|
|
6541
6394
|
};
|
|
6542
|
-
|
|
6543
|
-
//#region src/model/parameter/setup_option.ts
|
|
6395
|
+
// src/model/parameter/setup_option.ts
|
|
6544
6396
|
let SetupOption;
|
|
6545
6397
|
(function(_SetupOption) {
|
|
6546
6398
|
function fromKeyValuePair(pair) {
|
|
@@ -6634,8 +6486,7 @@ var SetupOptions = class {
|
|
|
6634
6486
|
return result;
|
|
6635
6487
|
}
|
|
6636
6488
|
};
|
|
6637
|
-
|
|
6638
|
-
//#region src/model/parameter/message/combined_filter.ts
|
|
6489
|
+
// src/model/parameter/message/combined_filter.ts
|
|
6639
6490
|
/**
|
|
6640
6491
|
* Copyright 2026 The MOQtail Authors
|
|
6641
6492
|
*
|
|
@@ -6698,9 +6549,7 @@ var CombinedFilter = class {
|
|
|
6698
6549
|
case RangeFilterKind.Priority:
|
|
6699
6550
|
set.priority = ranges;
|
|
6700
6551
|
break;
|
|
6701
|
-
case RangeFilterKind.ObjectProperty:
|
|
6702
|
-
set.properties.set(filter.propertyType, ranges);
|
|
6703
|
-
break;
|
|
6552
|
+
case RangeFilterKind.ObjectProperty: set.properties.set(filter.propertyType, ranges);
|
|
6704
6553
|
}
|
|
6705
6554
|
}
|
|
6706
6555
|
this.rangeCount = rangeCount;
|
|
@@ -6753,13 +6602,12 @@ function propertiesPass(required, properties) {
|
|
|
6753
6602
|
}
|
|
6754
6603
|
return true;
|
|
6755
6604
|
}
|
|
6756
|
-
|
|
6605
|
+
exports.AudioConfig = AudioConfig;
|
|
6757
6606
|
exports.AudioLevel = AudioLevel;
|
|
6758
6607
|
exports.Authority = Authority;
|
|
6759
6608
|
exports.AuthorizationToken = AuthorizationToken;
|
|
6760
6609
|
exports.BaseByteBuffer = BaseByteBuffer;
|
|
6761
6610
|
exports.ByteBuffer = ByteBuffer;
|
|
6762
|
-
exports.CMSFCatalog = CMSFCatalog;
|
|
6763
6611
|
exports.CastingError = CastingError;
|
|
6764
6612
|
exports.CombinedFilter = CombinedFilter;
|
|
6765
6613
|
Object.defineProperty(exports, "ControlMessage", {
|
|
@@ -7000,6 +6848,7 @@ exports.deserializeKvpList = deserializeKvpList;
|
|
|
7000
6848
|
exports.deserializeKvpListUntilEmpty = deserializeKvpListUntilEmpty;
|
|
7001
6849
|
exports.deserializeMessageParameterKvps = deserializeMessageParameterKvps;
|
|
7002
6850
|
exports.encodeRanges = encodeRanges;
|
|
6851
|
+
exports.findProperty = findProperty;
|
|
7003
6852
|
exports.greaseValue = greaseValue;
|
|
7004
6853
|
exports.isApplicationSpecificProperty = isApplicationSpecificProperty;
|
|
7005
6854
|
exports.isBytes = isBytes;
|