moqtail 0.14.0 → 0.15.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/dist/model.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as PropertyRange, $n as isVarInt, $t as Expires, A as RequestError, An as LocationFilterType, At as RequestIdError, B as GoAway, Bn as ObjectDatagramType, Bt as NewGroupRequest, C as Timestamp, Cn as MAX_FULL_TRACK_NAME_LENGTH, Ct as InvalidTypeError, D as CMSFTrack, Dn as FetchObjectContext, Dt as MOQtailError, E as CMSFCatalog, En as FetchObject, Et as LengthExceedsMaxError, F as RequestUpdate, Fn as TrackStatusCode, Ft as FillParameters, G as DynamicGroupsProperty, Gn as ReasonPhrase, Gt as resolveTransportUrl, H as FetchOk, Hn as ObjectStatus, Ht as Redirect, I as SubscribeOk, In as FetchHeader, It as SwitchFrom, J as ObjectDeliveryTimeoutProperty, Jn as Location, Jt as greaseValue, K as ImmutablePropertiesTrackProperty, Kn as Tuple, Kt as GREASE_BASE, L as Publish, Ln as Datagram, Lt as LocationFilter, M as SubscribeTracks, Mn as RequestErrorCode, Mt as TimeoutError, N as SubscribeNamespace, Nn as SUPPORTED_VERSIONS, Nt as TrackNameError, O as StreamResetCode, On as ControlMessageType, Ot as NotEnoughBytesError, P as TrackStatus, Pn as SwitchMode, Pt as VarIntOverflowError, Q as LOCPropertyId, Qn as isBytes, Qt as Forward, R as PublishDone, Rn as DEFAULT_PUBLISHER_PRIORITY, Rt as SubscriberPriority, S as Timescale, Sn as FullTrackName, St as InvalidEnumValue, T as CMSF, Tn as EndOfRangeKind, Tt as KeyValueFormattingError, U as DefaultPublisherGroupOrderProperty, Un as SubgroupHeaderType, Ut as MoqtFragment, V as MAX_NEW_SESSION_URI_LENGTH, Vn as ObjectForwardingPreference, Vt as LargestObject, W as DefaultPublisherPriorityProperty, Wn as MAX_REASON_PHRASE_LEN, Wt as MoqtUrl, X as TrackProperty, Xn as deserializeKvpList, Xt as GroupOrderParam, Y as SubgroupDeliveryTimeoutProperty, Yn as KeyValuePair, Yt as isGrease, Z as UnknownTrackProperty, Zn as deserializeKvpListUntilEmpty, Zt as IncludeProperties, _ as LOCProperties, _n as Header, _t as RangeFilter, a as SstsAlgorithms, an as AuthorizationToken, at as Setup, b as AudioLevel, bn as MoqtObject, bt as CastingError, c as MaxFilterRanges, cn as SetupOptionType, ct as PublishNamespace, d as Path, dn as setupOptionTypeFromNumber, dt as applyMessageParameterUpdate, en as SubgroupDeliveryTimeout, er as serializeKvpList, et as PropertyRanges, f as ImmutablePropertiesObjectProperty, fn as tokenAliasTypeFromNumber, ft as deserializeMessageParameterKvps, g as UnknownObjectProperty, gn as FrozenByteBuffer, gt as RangeDelta, h as PriorObjectIdGapProperty, hn as ByteBuffer, ht as Range, i as assertNoAuthorityOverWebTransport, in as AuthTokenVariant, it as Fetch, j as RequestOk, jn as PublishDoneStatusCode, jt as TerminationError, k as ControlMessage, kn as GroupOrder, kt as ProtocolViolationError, l as Authority, ln as TokenAliasType, lt as MessageParameter, m as PriorGroupIdGapProperty, mn as BaseByteBuffer, mt as InvalidFilterError, n as SetupOption, nn as ObjectDeliveryTimeout, nt as isApplicationSpecificProperty, o as MaxRequestUpdates, on as Parameter, ot as NamespaceDone, p as ObjectProperty, pn as PublishSkipped, pt as serializeMessageParameterKvps, q as MaxCacheDurationProperty, qn as TupleField, qt as GREASE_STEP, r as SetupOptions, rn as FillTimeout, rt as locPropertyIdFromNumber, s as MoqtImplementation, sn as MessageParameterType, st as Namespace, t as CombinedFilter, tn as RendezvousTimeout, tt as TrackPropertyType, u as MaxAuthTokenCacheSize, un as messageParameterTypeFromNumber, ut as MessageParameters, v as LOCProperty, vn as RequestIdMap, vt as RangeFilterKind, w as TerminationCode, wn as MAX_NAMESPACE_TUPLE_COUNT, wt as InvalidUTF8Error, x as VideoFrameMarking, xn as SubgroupObject, xt as InternalError, y as VideoConfig, yn as SubgroupHeader, yt as encodeRanges, z as Subscribe, zn as FetchHeaderType, zt as SwitchingSetAssignment } from "./index-DBbxKcc1.mjs";
2
- export { AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CMSF, CMSFCatalog, CMSFTrack, CastingError, CombinedFilter, ControlMessage, ControlMessageType, DEFAULT_PUBLISHER_PRIORITY, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchObjectContext, FetchOk, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, Location, LocationFilter, LocationFilterType, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailError, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MessageParameter, MessageParameterType, MessageParameters, MoqtFragment, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NewGroupRequest, NotEnoughBytesError, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectProperty, ObjectStatus, Parameter, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRange, PropertyRanges, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishSkipped, Range, RangeDelta, RangeFilter, RangeFilterKind, ReasonPhrase, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestUpdate, SUPPORTED_VERSIONS, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeOk, SubscribeTracks, SubscriberPriority, SwitchFrom, SwitchMode, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, TrackNameError, TrackProperty, TrackPropertyType, TrackStatus, TrackStatusCode, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
1
+ import { $ as LOCPropertyId, $n as isBytes, $t as Forward, A as ControlMessage, An as GroupOrder, At as ProtocolViolationError, B as Subscribe, Bn as FetchHeaderType, Bt as SwitchingSetAssignment, C as Timescale, Cn as FullTrackName, Ct as InvalidEnumValue, D as CMSFCatalog, Dn as FetchObject, Dt as LengthExceedsMaxError, E as CMSF, En as EndOfRangeKind, Et as KeyValueFormattingError, F as TrackStatus, Fn as SwitchMode, Ft as VarIntOverflowError, G as DefaultPublisherPriorityProperty, Gn as MAX_REASON_PHRASE_LEN, Gt as MoqtUrl, H as MAX_NEW_SESSION_URI_LENGTH, Hn as ObjectForwardingPreference, Ht as LargestObject, I as RequestUpdate, In as TrackStatusCode, It as FillParameters, J as MaxCacheDurationProperty, Jn as TupleField, Jt as GREASE_STEP, K as DynamicGroupsProperty, Kn as ReasonPhrase, Kt as resolveTransportUrl, L as SubscribeOk, Ln as FetchHeader, Lt as SwitchFrom, M as RequestOk, Mn as PublishDoneStatusCode, Mt as TerminationError, N as SubscribeTracks, Nn as RequestErrorCode, Nt as TimeoutError, O as CMSFTrack, On as FetchObjectContext, Ot as MOQtailError, P as SubscribeNamespace, Pn as SUPPORTED_VERSIONS, Pt as TrackNameError, Q as UnknownTrackProperty, Qn as deserializeKvpListUntilEmpty, Qt as IncludeProperties, R as Publish, Rn as Datagram, Rt as LocationFilter, S as VideoFrameMarking, Sn as SubgroupObject, St as InternalError, T as TerminationCode, Tn as MAX_NAMESPACE_TUPLE_COUNT, Tt as InvalidUTF8Error, U as FetchOk, Un as ObjectStatus, Ut as Redirect, V as GoAway, Vn as ObjectDatagramType, Vt as NewGroupRequest, W as DefaultPublisherGroupOrderProperty, Wn as SubgroupHeaderType, Wt as MoqtFragment, X as SubgroupDeliveryTimeoutProperty, Xn as KeyValuePair, Xt as isGrease, Y as ObjectDeliveryTimeoutProperty, Yn as Location, Yt as greaseValue, Z as TrackProperty, Zn as deserializeKvpList, Zt as GroupOrderParam, _ as LOCProperties, _n as FrozenByteBuffer, _t as RangeDelta, a as SstsAlgorithms, an as AuthTokenVariant, at as Fetch, b as VideoConfig, bn as SubgroupHeader, bt as encodeRanges, c as MaxFilterRanges, cn as MessageParameterType, ct as Namespace, d as Path, dn as messageParameterTypeFromNumber, dt as MessageParameters, en as Expires, er as isVarInt, et as PropertyRange, f as ImmutablePropertiesObjectProperty, fn as setupOptionTypeFromNumber, ft as applyMessageParameterUpdate, g as UnknownObjectProperty, gn as ByteBuffer, gt as Range, h as PriorObjectIdGapProperty, hn as BaseByteBuffer, ht as InvalidFilterError, i as assertNoAuthorityOverWebTransport, in as FillTimeout, it as locPropertyIdFromNumber, j as RequestError, jn as LocationFilterType, jt as RequestIdError, k as StreamResetCode, kn as ControlMessageType, kt as NotEnoughBytesError, l as Authority, ln as SetupOptionType, lt as PublishNamespace, m as PriorGroupIdGapProperty, mn as PublishSkipped, mt as serializeMessageParameterKvps, n as SetupOption, nn as RendezvousTimeout, nt as TrackPropertyType, o as MaxRequestUpdates, on as AuthorizationToken, ot as Setup, p as ObjectProperty, pn as tokenAliasTypeFromNumber, pt as deserializeMessageParameterKvps, q as ImmutablePropertiesTrackProperty, qn as Tuple, qt as GREASE_BASE, r as SetupOptions, rn as ObjectDeliveryTimeout, rt as isApplicationSpecificProperty, s as MoqtImplementation, sn as Parameter, st as NamespaceDone, t as CombinedFilter, tn as SubgroupDeliveryTimeout, tr as serializeKvpList, tt as PropertyRanges, u as MaxAuthTokenCacheSize, un as TokenAliasType, ut as MessageParameter, v as LOCProperty, vn as Header, vt as RangeFilter, w as Timestamp, wn as MAX_FULL_TRACK_NAME_LENGTH, wt as InvalidTypeError, x as AudioLevel, xn as MoqtObject, xt as CastingError, y as AudioConfig, yn as RequestIdMap, yt as RangeFilterKind, z as PublishDone, zn as DEFAULT_PUBLISHER_PRIORITY, zt as SubscriberPriority } from "./index-BY6e1obL.mjs";
2
+ export { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CMSF, CMSFCatalog, CMSFTrack, CastingError, CombinedFilter, ControlMessage, ControlMessageType, DEFAULT_PUBLISHER_PRIORITY, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchObjectContext, FetchOk, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, Location, LocationFilter, LocationFilterType, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailError, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MessageParameter, MessageParameterType, MessageParameters, MoqtFragment, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NewGroupRequest, NotEnoughBytesError, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectProperty, ObjectStatus, Parameter, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRange, PropertyRanges, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishSkipped, Range, RangeDelta, RangeFilter, RangeFilterKind, ReasonPhrase, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestUpdate, SUPPORTED_VERSIONS, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeOk, SubscribeTracks, SubscriberPriority, SwitchFrom, SwitchMode, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, TrackNameError, TrackProperty, TrackPropertyType, TrackStatus, TrackStatusCode, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
package/dist/model.mjs CHANGED
@@ -1711,13 +1711,21 @@ const SUBGROUP_MODE_PRIOR_PLUS_ONE = 2;
1711
1711
  const SUBGROUP_MODE_PRESENT = 3;
1712
1712
  const END_OF_NON_EXISTENT_RANGE = 140n;
1713
1713
  const END_OF_UNKNOWN_RANGE = 268n;
1714
+ const END_OF_TIMED_OUT_RANGE = 524n;
1714
1715
  const MAX_VARINT = 2n ** 64n - 1n;
1715
1716
  /**
1716
- * Kind discriminator for End-of-Range markers (§11.5).
1717
+ * Kind discriminator for End-of-Range markers.
1717
1718
  */
1718
1719
  let EndOfRangeKind = /* @__PURE__ */ function(EndOfRangeKind) {
1720
+ /** Serialization Flags = 0x8C: all objects in the range are known not to exist. */
1719
1721
  EndOfRangeKind[EndOfRangeKind["NonExistent"] = 140] = "NonExistent";
1722
+ /** Serialization Flags = 0x10C: the range is cache-unknown. */
1720
1723
  EndOfRangeKind[EndOfRangeKind["Unknown"] = 268] = "Unknown";
1724
+ /**
1725
+ * Serialization Flags = 0x20C: the range timed out, e.g. a relay ran out of its
1726
+ * fill budget before it could retrieve it.
1727
+ */
1728
+ EndOfRangeKind[EndOfRangeKind["TimedOut"] = 524] = "TimedOut";
1721
1729
  return EndOfRangeKind;
1722
1730
  }({});
1723
1731
  /**
@@ -1752,11 +1760,20 @@ var FetchObject = class FetchObject {
1752
1760
  return this.location.object;
1753
1761
  }
1754
1762
  /**
1755
- * Context to thread into the next call on this stream.
1756
- * Returns null for EndOfRange markers — they MUST NOT update prior state.
1763
+ * What the entry after this one is encoded against, given what this one was
1764
+ * encoded against (`prev`).
1765
+ *
1766
+ * After an Object, that is the Object itself. After an End of Range marker, it is
1767
+ * the marker's Group and Object IDs, with the Subgroup ID and priority still those
1768
+ * of the last Object before the marker, or none if no Object came before it.
1757
1769
  */
1758
- toContext() {
1759
- if (this.kind === "end_of_range") return null;
1770
+ nextContext(prev) {
1771
+ if (this.kind === "end_of_range") return {
1772
+ groupId: this.groupId,
1773
+ subgroupId: prev?.subgroupId ?? null,
1774
+ objectId: this.objectId,
1775
+ publisherPriority: prev?.publisherPriority ?? null
1776
+ };
1760
1777
  return {
1761
1778
  groupId: this.groupId,
1762
1779
  subgroupId: this.subgroupId,
@@ -1773,7 +1790,7 @@ var FetchObject = class FetchObject {
1773
1790
  serialize(prev, groupOrder = 0) {
1774
1791
  const buf = new ByteBuffer();
1775
1792
  if (this.kind === "end_of_range") {
1776
- buf.putVI(this.endOfRange === 140 ? END_OF_NON_EXISTENT_RANGE : END_OF_UNKNOWN_RANGE);
1793
+ buf.putVI(BigInt(this.endOfRange));
1777
1794
  buf.putVI(this.groupId);
1778
1795
  buf.putVI(this.objectId);
1779
1796
  return buf.freeze();
@@ -1799,7 +1816,7 @@ var FetchObject = class FetchObject {
1799
1816
  let subgroupMode;
1800
1817
  if (isDatagram || this.subgroupId === 0n) subgroupMode = SUBGROUP_MODE_ZERO;
1801
1818
  else if (prev && prev.subgroupId === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR;
1802
- else if (prev && prev.subgroupId + 1n === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR_PLUS_ONE;
1819
+ else if (prev && prev.subgroupId !== null && prev.subgroupId + 1n === this.subgroupId) subgroupMode = SUBGROUP_MODE_PRIOR_PLUS_ONE;
1803
1820
  else subgroupMode = SUBGROUP_MODE_PRESENT;
1804
1821
  let flags = subgroupMode & FLAG_SUBGROUP_MODE_MASK;
1805
1822
  if (objectDelta !== null) flags |= FLAG_OBJECT_ID_PRESENT;
@@ -1823,6 +1840,7 @@ var FetchObject = class FetchObject {
1823
1840
  let kind;
1824
1841
  if (flagsRaw === END_OF_NON_EXISTENT_RANGE) kind = 140;
1825
1842
  else if (flagsRaw === END_OF_UNKNOWN_RANGE) kind = 268;
1843
+ else if (flagsRaw === END_OF_TIMED_OUT_RANGE) kind = 524;
1826
1844
  else throw new ProtocolViolationError("FetchObject.deserialize", `invalid Serialization Flags value 0x${flagsRaw.toString(16)}`);
1827
1845
  const groupId = buf.getVI();
1828
1846
  const objectId = buf.getVI();
@@ -1858,11 +1876,11 @@ var FetchObject = class FetchObject {
1858
1876
  subgroupId = 0n;
1859
1877
  break;
1860
1878
  case SUBGROUP_MODE_PRIOR:
1861
- if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
1879
+ if (!prev || prev.subgroupId === null) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
1862
1880
  subgroupId = prev.subgroupId;
1863
1881
  break;
1864
1882
  case SUBGROUP_MODE_PRIOR_PLUS_ONE:
1865
- if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
1883
+ if (!prev || prev.subgroupId === null) throw new ProtocolViolationError("FetchObject.deserialize", "subgroup_id inherited but no prior object");
1866
1884
  subgroupId = prev.subgroupId + 1n;
1867
1885
  break;
1868
1886
  case SUBGROUP_MODE_PRESENT:
@@ -1884,7 +1902,7 @@ var FetchObject = class FetchObject {
1884
1902
  if (objectId > MAX_VARINT) throw new ProtocolViolationError("FetchObject.deserialize", `object id wraps: prior=${prev.objectId} +1`);
1885
1903
  }
1886
1904
  const publisherPriority = hasPriority ? buf.getU8() : (() => {
1887
- if (!prev) throw new ProtocolViolationError("FetchObject.deserialize", "priority inherited but no prior object");
1905
+ if (!prev || prev.publisherPriority === null) throw new ProtocolViolationError("FetchObject.deserialize", "priority inherited but no prior object");
1888
1906
  return prev.publisherPriority;
1889
1907
  })();
1890
1908
  let properties = null;
@@ -2019,11 +2037,12 @@ var FullTrackName = class FullTrackName {
2019
2037
  * limitations under the License.
2020
2038
  */
2021
2039
  let LOCPropertyId = /* @__PURE__ */ function(LOCPropertyId) {
2022
- LOCPropertyId[LOCPropertyId["Timestamp"] = 6] = "Timestamp";
2023
2040
  LOCPropertyId[LOCPropertyId["Timescale"] = 8] = "Timescale";
2024
- LOCPropertyId[LOCPropertyId["VideoFrameMarking"] = 10] = "VideoFrameMarking";
2041
+ LOCPropertyId[LOCPropertyId["VideoFrameMarking"] = 9] = "VideoFrameMarking";
2025
2042
  LOCPropertyId[LOCPropertyId["AudioLevel"] = 12] = "AudioLevel";
2026
2043
  LOCPropertyId[LOCPropertyId["VideoConfig"] = 13] = "VideoConfig";
2044
+ LOCPropertyId[LOCPropertyId["AudioConfig"] = 15] = "AudioConfig";
2045
+ LOCPropertyId[LOCPropertyId["Timestamp"] = 16] = "Timestamp";
2027
2046
  return LOCPropertyId;
2028
2047
  }({});
2029
2048
  let TrackPropertyType = /* @__PURE__ */ function(TrackPropertyType) {
@@ -2040,11 +2059,12 @@ let TrackPropertyType = /* @__PURE__ */ function(TrackPropertyType) {
2040
2059
  }({});
2041
2060
  function locPropertyIdFromNumber(value) {
2042
2061
  switch (value) {
2043
- case 6: return 6;
2044
2062
  case 8: return 8;
2045
- case 10: return 10;
2063
+ case 9: return 9;
2046
2064
  case 12: return 12;
2047
2065
  case 13: return 13;
2066
+ case 15: return 15;
2067
+ case 16: return 16;
2048
2068
  default: throw new InvalidTypeError("locPropertyIdFromNumber", `Invalid LOC property id: ${value}`);
2049
2069
  }
2050
2070
  }
@@ -2113,7 +2133,7 @@ function isApplicationSpecificProperty(typeValue) {
2113
2133
  */
2114
2134
  var Timestamp = class Timestamp {
2115
2135
  timestamp;
2116
- static TYPE = 6;
2136
+ static TYPE = 16;
2117
2137
  constructor(timestamp) {
2118
2138
  this.timestamp = timestamp;
2119
2139
  }
@@ -2171,17 +2191,24 @@ var Timescale = class Timescale {
2171
2191
  * See the License for the specific language governing permissions and
2172
2192
  * limitations under the License.
2173
2193
  */
2194
+ /** The I (independent frame) bit of the RFC 9626 flag octet. */
2195
+ const INDEPENDENT = 32;
2174
2196
  var VideoFrameMarking = class VideoFrameMarking {
2175
2197
  value;
2176
- static TYPE = 10;
2198
+ static TYPE = 9;
2199
+ /** The RFC 9626 frame-marking octets (1 to 4), without the length prefix. */
2177
2200
  constructor(value) {
2178
2201
  this.value = value;
2179
2202
  }
2203
+ /** True if the frame decodes without temporally prior frames (the I bit). */
2204
+ get independent() {
2205
+ return ((this.value[0] ?? 0) & INDEPENDENT) !== 0;
2206
+ }
2180
2207
  toKeyValuePair() {
2181
- return KeyValuePair.tryNewVarInt(VideoFrameMarking.TYPE, this.value);
2208
+ return KeyValuePair.tryNewBytes(VideoFrameMarking.TYPE, this.value);
2182
2209
  }
2183
2210
  static fromKeyValuePair(pair) {
2184
- if (Number(pair.typeValue) === VideoFrameMarking.TYPE && typeof pair.value === "bigint") return new VideoFrameMarking(pair.value);
2211
+ if (Number(pair.typeValue) === VideoFrameMarking.TYPE && pair.value instanceof Uint8Array) return new VideoFrameMarking(pair.value);
2185
2212
  }
2186
2213
  };
2187
2214
  //#endregion
@@ -2245,11 +2272,41 @@ var VideoConfig = class VideoConfig {
2245
2272
  }
2246
2273
  };
2247
2274
  //#endregion
2275
+ //#region src/model/property/audio_config.ts
2276
+ /**
2277
+ * Copyright 2026 The MOQtail Authors
2278
+ *
2279
+ * Licensed under the Apache License, Version 2.0 (the "License");
2280
+ * you may not use this file except in compliance with the License.
2281
+ * You may obtain a copy of the License at
2282
+ *
2283
+ * http://www.apache.org/licenses/LICENSE-2.0
2284
+ *
2285
+ * Unless required by applicable law or agreed to in writing, software
2286
+ * distributed under the License is distributed on an "AS IS" BASIS,
2287
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2288
+ * See the License for the specific language governing permissions and
2289
+ * limitations under the License.
2290
+ */
2291
+ var AudioConfig = class AudioConfig {
2292
+ config;
2293
+ static TYPE = 15;
2294
+ constructor(config) {
2295
+ this.config = config;
2296
+ }
2297
+ toKeyValuePair() {
2298
+ return KeyValuePair.tryNewBytes(AudioConfig.TYPE, this.config);
2299
+ }
2300
+ static fromKeyValuePair(pair) {
2301
+ if (Number(pair.typeValue) === AudioConfig.TYPE && pair.value instanceof Uint8Array) return new AudioConfig(pair.value);
2302
+ }
2303
+ };
2304
+ //#endregion
2248
2305
  //#region src/model/property/loc.ts
2249
2306
  let LOCProperty;
2250
2307
  (function(_LOCProperty) {
2251
2308
  function fromKeyValuePair(pair) {
2252
- return Timestamp.fromKeyValuePair(pair) || Timescale.fromKeyValuePair(pair) || VideoFrameMarking.fromKeyValuePair(pair) || AudioLevel.fromKeyValuePair(pair) || VideoConfig.fromKeyValuePair(pair);
2309
+ return Timestamp.fromKeyValuePair(pair) || Timescale.fromKeyValuePair(pair) || VideoFrameMarking.fromKeyValuePair(pair) || AudioLevel.fromKeyValuePair(pair) || VideoConfig.fromKeyValuePair(pair) || AudioConfig.fromKeyValuePair(pair);
2253
2310
  }
2254
2311
  _LOCProperty.fromKeyValuePair = fromKeyValuePair;
2255
2312
  function toKeyValuePair(header) {
@@ -2276,6 +2333,10 @@ let LOCProperty;
2276
2333
  return header instanceof VideoConfig;
2277
2334
  }
2278
2335
  _LOCProperty.isVideoConfig = isVideoConfig;
2336
+ function isAudioConfig(header) {
2337
+ return header instanceof AudioConfig;
2338
+ }
2339
+ _LOCProperty.isAudioConfig = isAudioConfig;
2279
2340
  })(LOCProperty || (LOCProperty = {}));
2280
2341
  var LOCProperties = class {
2281
2342
  kvps = [];
@@ -2287,8 +2348,9 @@ var LOCProperties = class {
2287
2348
  this.kvps.push(new Timescale(BigInt(timescale)).toKeyValuePair());
2288
2349
  return this;
2289
2350
  }
2290
- addVideoFrameMarking(marking) {
2291
- this.kvps.push(new VideoFrameMarking(BigInt(marking)).toKeyValuePair());
2351
+ /** Marks a whole, non-scalable frame (RFC 9626 short form): S and E set, I set on a keyframe. */
2352
+ addVideoFrameMarking(isKey) {
2353
+ this.kvps.push(new VideoFrameMarking(new Uint8Array([isKey ? 224 : 192])).toKeyValuePair());
2292
2354
  return this;
2293
2355
  }
2294
2356
  addAudioLevel(audioLevel) {
@@ -2299,6 +2361,10 @@ var LOCProperties = class {
2299
2361
  this.kvps.push(new VideoConfig(config).toKeyValuePair());
2300
2362
  return this;
2301
2363
  }
2364
+ addAudioConfig(config) {
2365
+ this.kvps.push(new AudioConfig(config).toKeyValuePair());
2366
+ return this;
2367
+ }
2302
2368
  addRaw(pair) {
2303
2369
  this.kvps.push(pair);
2304
2370
  return this;
@@ -6753,4 +6819,4 @@ function propertiesPass(required, properties) {
6753
6819
  return true;
6754
6820
  }
6755
6821
  //#endregion
6756
- export { AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CMSFCatalog, CastingError, CombinedFilter, ControlMessage, ControlMessageType, DEFAULT_PUBLISHER_PRIORITY, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchOk, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, Location, LocationFilter, LocationFilterType, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailError, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MessageParameter, MessageParameterType, MessageParameters, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NewGroupRequest, NotEnoughBytesError, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectProperty, ObjectStatus, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRanges, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishSkipped, RangeFilter, RangeFilterKind, ReasonPhrase, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestUpdate, SUPPORTED_VERSIONS, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeOk, SubscribeTracks, SubscriberPriority, SwitchFrom, SwitchMode, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, TrackNameError, TrackProperty, TrackPropertyType, TrackStatus, TrackStatusCode, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
6822
+ export { AudioConfig, AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CMSFCatalog, CastingError, CombinedFilter, ControlMessage, ControlMessageType, DEFAULT_PUBLISHER_PRIORITY, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchOk, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, Location, LocationFilter, LocationFilterType, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailError, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MessageParameter, MessageParameterType, MessageParameters, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NewGroupRequest, NotEnoughBytesError, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectProperty, ObjectStatus, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRanges, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishSkipped, RangeFilter, RangeFilterKind, ReasonPhrase, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestUpdate, SUPPORTED_VERSIONS, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeOk, SubscribeTracks, SubscriberPriority, SwitchFrom, SwitchMode, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, TrackNameError, TrackProperty, TrackPropertyType, TrackStatus, TrackStatusCode, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moqtail",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Media Over QUIC Transport client implementation",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",