moqtail 0.15.0 → 0.17.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-CjdF7_cL.d.cts +1928 -0
- package/dist/{client-BviQ20Lc.cjs → client-FnSNJocV.cjs} +1102 -1192
- package/dist/client-I8mDg-Ls.d.mts +1928 -0
- package/dist/{client-zi0lmuIL.mjs → client-MXn-lkAA.mjs} +940 -1018
- package/dist/client.cjs +202 -7
- package/dist/client.d.cts +23 -1944
- package/dist/client.d.mts +23 -1944
- package/dist/client.mjs +195 -2
- package/dist/emitter-UbeRcbuf.mjs +109 -0
- package/dist/{logger-c2NoQqtx.cjs → emitter-qNJYD3yQ.cjs} +61 -2
- package/dist/{index-BY6e1obL.d.cts → index-BaZgHZ8D.d.mts} +124 -324
- package/dist/index-Bn8VlVoN.d.cts +2261 -0
- package/dist/index-Ch5QUygw.d.mts +2261 -0
- package/dist/index.cjs +18 -14
- 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 +380 -572
- package/dist/model.d.cts +2901 -2
- package/dist/model.d.mts +17 -2
- package/dist/model.mjs +380 -572
- package/dist/player/component.cjs +364 -0
- package/dist/player/component.d.cts +59 -0
- package/dist/player/component.d.mts +59 -0
- package/dist/player/component.mjs +362 -0
- package/dist/player-C6y-qpHz.cjs +8488 -0
- package/dist/player-DfJB6vBH.mjs +8293 -0
- package/dist/player.cjs +31 -0
- package/dist/player.d.cts +17 -0
- package/dist/player.d.mts +17 -0
- package/dist/player.mjs +1 -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 +46 -5
- package/dist/index-BY6e1obL.d.mts +0 -3087
- 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/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_model = require("./model.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const require_client = require("./client-FnSNJocV.cjs");
|
|
4
|
+
const require_emitter = require("./emitter-qNJYD3yQ.cjs");
|
|
5
|
+
const require_client$1 = require("./client.cjs");
|
|
5
6
|
const require_util = require("./util.cjs");
|
|
6
7
|
exports.AudioConfig = require_model.AudioConfig;
|
|
7
8
|
exports.AudioLevel = require_model.AudioLevel;
|
|
@@ -9,7 +10,6 @@ exports.Authority = require_model.Authority;
|
|
|
9
10
|
exports.AuthorizationToken = require_model.AuthorizationToken;
|
|
10
11
|
exports.BaseByteBuffer = require_model.BaseByteBuffer;
|
|
11
12
|
exports.ByteBuffer = require_model.ByteBuffer;
|
|
12
|
-
exports.CMSFCatalog = require_model.CMSFCatalog;
|
|
13
13
|
exports.CastingError = require_model.CastingError;
|
|
14
14
|
exports.ClockNormalizer = require_util.ClockNormalizer;
|
|
15
15
|
exports.CombinedFilter = require_model.CombinedFilter;
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "ControlMessageType", {
|
|
|
28
28
|
exports.ControlRecvStream = require_client.ControlRecvStream;
|
|
29
29
|
exports.ControlSendStream = require_client.ControlSendStream;
|
|
30
30
|
exports.ControlStream = require_client.ControlStream;
|
|
31
|
+
exports.DEFAULT_FILL_OPEN_TIMEOUT_MS = require_client.DEFAULT_FILL_OPEN_TIMEOUT_MS;
|
|
31
32
|
exports.DEFAULT_MAX_FILTER_RANGES = require_client.DEFAULT_MAX_FILTER_RANGES;
|
|
32
33
|
exports.DEFAULT_PUBLISHER_PRIORITY = require_model.DEFAULT_PUBLISHER_PRIORITY;
|
|
33
34
|
exports.DEFAULT_SWITCH_DRAIN_TIMEOUT_MS = require_client.DEFAULT_SWITCH_DRAIN_TIMEOUT_MS;
|
|
@@ -37,6 +38,7 @@ exports.Datagram = require_model.Datagram;
|
|
|
37
38
|
exports.DefaultPublisherGroupOrderProperty = require_model.DefaultPublisherGroupOrderProperty;
|
|
38
39
|
exports.DefaultPublisherPriorityProperty = require_model.DefaultPublisherPriorityProperty;
|
|
39
40
|
exports.DynamicGroupsProperty = require_model.DynamicGroupsProperty;
|
|
41
|
+
exports.Emitter = require_emitter.Emitter;
|
|
40
42
|
exports.EndOfRangeKind = require_model.EndOfRangeKind;
|
|
41
43
|
exports.Expires = require_model.Expires;
|
|
42
44
|
exports.Fetch = require_model.Fetch;
|
|
@@ -72,7 +74,7 @@ Object.defineProperty(exports, "Header", {
|
|
|
72
74
|
return require_model.Header;
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
|
-
exports.HybridTrackSource = require_client.HybridTrackSource;
|
|
77
|
+
exports.HybridTrackSource = require_client$1.HybridTrackSource;
|
|
76
78
|
exports.ImmutablePropertiesObjectProperty = require_model.ImmutablePropertiesObjectProperty;
|
|
77
79
|
exports.ImmutablePropertiesTrackProperty = require_model.ImmutablePropertiesTrackProperty;
|
|
78
80
|
exports.IncludeProperties = require_model.IncludeProperties;
|
|
@@ -93,7 +95,7 @@ Object.defineProperty(exports, "LOCProperty", {
|
|
|
93
95
|
exports.LOCPropertyId = require_model.LOCPropertyId;
|
|
94
96
|
exports.LargestObject = require_model.LargestObject;
|
|
95
97
|
exports.LengthExceedsMaxError = require_model.LengthExceedsMaxError;
|
|
96
|
-
exports.LiveTrackSource = require_client.LiveTrackSource;
|
|
98
|
+
exports.LiveTrackSource = require_client$1.LiveTrackSource;
|
|
97
99
|
exports.Location = require_model.Location;
|
|
98
100
|
exports.LocationFilter = require_model.LocationFilter;
|
|
99
101
|
Object.defineProperty(exports, "LocationFilterType", {
|
|
@@ -102,8 +104,8 @@ Object.defineProperty(exports, "LocationFilterType", {
|
|
|
102
104
|
return require_model.LocationFilterType;
|
|
103
105
|
}
|
|
104
106
|
});
|
|
105
|
-
exports.LogLevel =
|
|
106
|
-
exports.Logger =
|
|
107
|
+
exports.LogLevel = require_emitter.LogLevel;
|
|
108
|
+
exports.Logger = require_emitter.Logger;
|
|
107
109
|
exports.MAX_FULL_TRACK_NAME_LENGTH = require_model.MAX_FULL_TRACK_NAME_LENGTH;
|
|
108
110
|
exports.MAX_NAMESPACE_TUPLE_COUNT = require_model.MAX_NAMESPACE_TUPLE_COUNT;
|
|
109
111
|
exports.MAX_NEW_SESSION_URI_LENGTH = require_model.MAX_NEW_SESSION_URI_LENGTH;
|
|
@@ -114,7 +116,7 @@ exports.MaxAuthTokenCacheSize = require_model.MaxAuthTokenCacheSize;
|
|
|
114
116
|
exports.MaxCacheDurationProperty = require_model.MaxCacheDurationProperty;
|
|
115
117
|
exports.MaxFilterRanges = require_model.MaxFilterRanges;
|
|
116
118
|
exports.MaxRequestUpdates = require_model.MaxRequestUpdates;
|
|
117
|
-
exports.MemoryObjectCache = require_client.MemoryObjectCache;
|
|
119
|
+
exports.MemoryObjectCache = require_client$1.MemoryObjectCache;
|
|
118
120
|
Object.defineProperty(exports, "MessageParameter", {
|
|
119
121
|
enumerable: true,
|
|
120
122
|
get: function() {
|
|
@@ -145,6 +147,7 @@ Object.defineProperty(exports, "ObjectForwardingPreference", {
|
|
|
145
147
|
return require_model.ObjectForwardingPreference;
|
|
146
148
|
}
|
|
147
149
|
});
|
|
150
|
+
exports.ObjectOrderer = require_client.ObjectOrderer;
|
|
148
151
|
Object.defineProperty(exports, "ObjectProperty", {
|
|
149
152
|
enumerable: true,
|
|
150
153
|
get: function() {
|
|
@@ -157,6 +160,7 @@ Object.defineProperty(exports, "ObjectStatus", {
|
|
|
157
160
|
return require_model.ObjectStatus;
|
|
158
161
|
}
|
|
159
162
|
});
|
|
163
|
+
exports.ObjectStream = require_client.ObjectStream;
|
|
160
164
|
exports.Path = require_model.Path;
|
|
161
165
|
exports.PriorGroupIdGapProperty = require_model.PriorGroupIdGapProperty;
|
|
162
166
|
exports.PriorObjectIdGapProperty = require_model.PriorObjectIdGapProperty;
|
|
@@ -183,7 +187,6 @@ Object.defineProperty(exports, "RangeFilterKind", {
|
|
|
183
187
|
}
|
|
184
188
|
});
|
|
185
189
|
exports.ReasonPhrase = require_model.ReasonPhrase;
|
|
186
|
-
exports.RecvDatagramStream = require_client.RecvDatagramStream;
|
|
187
190
|
exports.RecvStream = require_client.RecvStream;
|
|
188
191
|
exports.Redirect = require_model.Redirect;
|
|
189
192
|
exports.RendezvousTimeout = require_model.RendezvousTimeout;
|
|
@@ -199,7 +202,7 @@ exports.RequestIdMap = require_model.RequestIdMap;
|
|
|
199
202
|
exports.RequestOk = require_model.RequestOk;
|
|
200
203
|
exports.RequestStream = require_client.RequestStream;
|
|
201
204
|
exports.RequestUpdate = require_model.RequestUpdate;
|
|
202
|
-
exports.RingBufferObjectCache = require_client.RingBufferObjectCache;
|
|
205
|
+
exports.RingBufferObjectCache = require_client$1.RingBufferObjectCache;
|
|
203
206
|
exports.SUPPORTED_VERSIONS = require_model.SUPPORTED_VERSIONS;
|
|
204
207
|
exports.SendDatagramStream = require_client.SendDatagramStream;
|
|
205
208
|
exports.SendStream = require_client.SendStream;
|
|
@@ -213,7 +216,7 @@ Object.defineProperty(exports, "SetupOption", {
|
|
|
213
216
|
exports.SetupOptionType = require_model.SetupOptionType;
|
|
214
217
|
exports.SetupOptions = require_model.SetupOptions;
|
|
215
218
|
exports.SstsAlgorithms = require_model.SstsAlgorithms;
|
|
216
|
-
exports.StaticTrackSource = require_client.StaticTrackSource;
|
|
219
|
+
exports.StaticTrackSource = require_client$1.StaticTrackSource;
|
|
217
220
|
Object.defineProperty(exports, "StreamResetCode", {
|
|
218
221
|
enumerable: true,
|
|
219
222
|
get: function() {
|
|
@@ -282,18 +285,19 @@ exports.deserializeKvpList = require_model.deserializeKvpList;
|
|
|
282
285
|
exports.deserializeKvpListUntilEmpty = require_model.deserializeKvpListUntilEmpty;
|
|
283
286
|
exports.deserializeMessageParameterKvps = require_model.deserializeMessageParameterKvps;
|
|
284
287
|
exports.encodeRanges = require_model.encodeRanges;
|
|
288
|
+
exports.findProperty = require_model.findProperty;
|
|
285
289
|
exports.greaseValue = require_model.greaseValue;
|
|
286
290
|
exports.isApplicationSpecificProperty = require_model.isApplicationSpecificProperty;
|
|
287
291
|
exports.isBytes = require_model.isBytes;
|
|
288
292
|
exports.isGrease = require_model.isGrease;
|
|
289
293
|
exports.isVarInt = require_model.isVarInt;
|
|
290
294
|
exports.locPropertyIdFromNumber = require_model.locPropertyIdFromNumber;
|
|
291
|
-
exports.logger =
|
|
295
|
+
exports.logger = require_emitter.logger;
|
|
292
296
|
exports.messageParameterTypeFromNumber = require_model.messageParameterTypeFromNumber;
|
|
293
297
|
exports.resolveTransportUrl = require_model.resolveTransportUrl;
|
|
294
298
|
exports.serializeKvpList = require_model.serializeKvpList;
|
|
295
299
|
exports.serializeMessageParameterKvps = require_model.serializeMessageParameterKvps;
|
|
296
|
-
exports.setLogEnabledModules =
|
|
297
|
-
exports.setLogLevel =
|
|
300
|
+
exports.setLogEnabledModules = require_emitter.setLogEnabledModules;
|
|
301
|
+
exports.setLogLevel = require_emitter.setLogLevel;
|
|
298
302
|
exports.setupOptionTypeFromNumber = require_model.setupOptionTypeFromNumber;
|
|
299
303
|
exports.tokenAliasTypeFromNumber = require_model.tokenAliasTypeFromNumber;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The MOQtail Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { a as setLogLevel, i as setLogEnabledModules, n as Logger, o as Emitter, r as logger, t as LogLevel } from "./logger-B8IYkljn.cjs";
|
|
17
|
+
import { RecvStream, SendStream } from "./client.cjs";
|
|
18
|
+
import { $ as DataStreamReporter, A as MOQtailRequest, B as Subscription, C as DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, D as FetchOptions, E as EndOfRangeHandler, F as SwitchOptions, G as WindowSuspension, H as PublishRequest, I as TrackAliasHolder, J as DataEvent, K as ObjectStream, L as TrackStatusRequest, M as SubscribeOptions, N as SubscribeResult, O as FetchResult, P as SubscribeUpdateOptions, Q as DataStreamEndEvent, R as SubscribeNamespaceRequest, S as DEFAULT_MAX_FILTER_RANGES, T as EarlyDiscardPolicyConfig, U as FetchRequest, V as PublishNamespaceRequest, W as ObjectOrderer, X as DataHeaderEvent, Y as DataEventBase, Z as DataObjectEvent, _ as ControlRecvStream, a as SubscribePublication, b as ClientEvents, c as HybridTrackSource, d as PastObjectSource, et as FullTrackNameOf, f as StaticTrackSource, g as RingBufferObjectCache, h as ObjectCache, i as FetchPublication, j as ObjectOrdering, k as MOQtailClientOptions, l as LiveObjectSource, m as MemoryObjectCache, n as SendDatagramStream, o as RequestStream, p as TrackSource, q as DataDirection, r as PublishPublication, s as Track, t as MOQtailClient, u as LiveTrackSource, v as ControlSendStream, w as DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, x as DEFAULT_FILL_OPEN_TIMEOUT_MS, y as ControlStream, z as SubscribeRequest } from "./client-CjdF7_cL.cjs";
|
|
19
|
+
import { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, 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, PropertyReader, 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, findProperty, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber } from "./model.cjs";
|
|
4
20
|
import { ClockNormalizer, NetworkTelemetry } from "./util.cjs";
|
|
5
|
-
export { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer,
|
|
21
|
+
export { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CastingError, ClientEvents, ClockNormalizer, CombinedFilter, ControlMessage, ControlMessageType, ControlRecvStream, ControlSendStream, ControlStream, DEFAULT_FILL_OPEN_TIMEOUT_MS, DEFAULT_MAX_FILTER_RANGES, DEFAULT_PUBLISHER_PRIORITY, DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, DataDirection, DataEvent, DataEventBase, DataHeaderEvent, DataObjectEvent, DataStreamEndEvent, DataStreamReporter, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EarlyDiscardPolicyConfig, Emitter, EndOfRangeHandler, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchObjectContext, FetchOk, FetchOptions, FetchPublication, FetchRequest, FetchResult, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, FullTrackNameOf, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, HybridTrackSource, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, LiveObjectSource, LiveTrackSource, Location, LocationFilter, LocationFilterType, LogLevel, Logger, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailClient, MOQtailClientOptions, MOQtailError, MOQtailRequest, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MemoryObjectCache, MessageParameter, MessageParameterType, MessageParameters, MoqtFragment, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NetworkTelemetry, NewGroupRequest, NotEnoughBytesError, ObjectCache, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectOrderer, ObjectOrdering, ObjectProperty, ObjectStatus, ObjectStream, Parameter, PastObjectSource, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRange, PropertyRanges, PropertyReader, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishNamespaceRequest, PublishPublication, PublishRequest, PublishSkipped, Range, RangeDelta, RangeFilter, RangeFilterKind, ReasonPhrase, RecvStream, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestStream, RequestUpdate, RingBufferObjectCache, SUPPORTED_VERSIONS, SendDatagramStream, SendStream, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StaticTrackSource, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeNamespaceRequest, SubscribeOk, SubscribeOptions, SubscribePublication, SubscribeRequest, SubscribeResult, SubscribeTracks, SubscribeUpdateOptions, SubscriberPriority, Subscription, SwitchFrom, SwitchMode, SwitchOptions, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, Track, TrackAliasHolder, TrackNameError, TrackProperty, TrackPropertyType, TrackSource, TrackStatus, TrackStatusCode, TrackStatusRequest, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, WindowSuspension, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, findProperty, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, logger, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setLogEnabledModules, setLogLevel, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The MOQtail Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
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 AudioLevel, Cn as MAX_FULL_TRACK_NAME_LENGTH, Ct as InvalidTypeError, D as StreamResetCode, Dn as FetchObjectContext, Dt as MOQtailError, E as Timestamp, 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 TerminationCode, 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 VideoConfig, Sn as FullTrackName, St as InvalidEnumValue, T as Timescale, 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 PriorObjectIdGapProperty, _n as Header, _t as RangeFilter, a as SstsAlgorithms, an as AuthorizationToken, at as Setup, b as LOCProperty, 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 PropertyReader, fn as tokenAliasTypeFromNumber, ft as deserializeMessageParameterKvps, g as PriorGroupIdGapProperty, gn as FrozenByteBuffer, gt as RangeDelta, h as ObjectProperty, 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 ImmutablePropertiesObjectProperty, 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 findProperty, 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 UnknownObjectProperty, vn as RequestIdMap, vt as RangeFilterKind, w as VideoFrameMarking, wn as MAX_NAMESPACE_TUPLE_COUNT, wt as InvalidUTF8Error, x as AudioConfig, xn as SubgroupObject, xt as InternalError, y as LOCProperties, yn as SubgroupHeader, yt as encodeRanges, z as Subscribe, zn as FetchHeaderType, zt as SwitchingSetAssignment } from "./index-BaZgHZ8D.mjs";
|
|
17
|
+
import { a as setLogLevel, i as setLogEnabledModules, n as Logger, o as Emitter, r as logger, t as LogLevel } from "./logger-B8IYkljn.mjs";
|
|
18
|
+
import { $ as DataStreamReporter, A as MOQtailRequest, B as Subscription, C as DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, D as FetchOptions, E as EndOfRangeHandler, F as SwitchOptions, G as WindowSuspension, H as PublishRequest, I as TrackAliasHolder, J as DataEvent, K as ObjectStream, L as TrackStatusRequest, M as SubscribeOptions, N as SubscribeResult, O as FetchResult, P as SubscribeUpdateOptions, Q as DataStreamEndEvent, R as SubscribeNamespaceRequest, S as DEFAULT_MAX_FILTER_RANGES, T as EarlyDiscardPolicyConfig, U as FetchRequest, V as PublishNamespaceRequest, W as ObjectOrderer, X as DataHeaderEvent, Y as DataEventBase, Z as DataObjectEvent, _ as ControlRecvStream, a as SubscribePublication, b as ClientEvents, c as HybridTrackSource, d as PastObjectSource, et as FullTrackNameOf, f as StaticTrackSource, g as RingBufferObjectCache, h as ObjectCache, i as FetchPublication, j as ObjectOrdering, k as MOQtailClientOptions, l as LiveObjectSource, m as MemoryObjectCache, n as SendDatagramStream, o as RequestStream, p as TrackSource, q as DataDirection, r as PublishPublication, s as Track, t as MOQtailClient, u as LiveTrackSource, v as ControlSendStream, w as DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, x as DEFAULT_FILL_OPEN_TIMEOUT_MS, y as ControlStream, z as SubscribeRequest } from "./client-I8mDg-Ls.mjs";
|
|
19
|
+
import { RecvStream, SendStream } from "./client.mjs";
|
|
4
20
|
import { ClockNormalizer, NetworkTelemetry } from "./util.mjs";
|
|
5
|
-
export { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer,
|
|
21
|
+
export { AudioConfig, AudioLevel, AuthTokenVariant, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CastingError, ClientEvents, ClockNormalizer, CombinedFilter, ControlMessage, ControlMessageType, ControlRecvStream, ControlSendStream, ControlStream, DEFAULT_FILL_OPEN_TIMEOUT_MS, DEFAULT_MAX_FILTER_RANGES, DEFAULT_PUBLISHER_PRIORITY, DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, DataDirection, DataEvent, DataEventBase, DataHeaderEvent, DataObjectEvent, DataStreamEndEvent, DataStreamReporter, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, EarlyDiscardPolicyConfig, Emitter, EndOfRangeHandler, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchObjectContext, FetchOk, FetchOptions, FetchPublication, FetchRequest, FetchResult, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, FullTrackNameOf, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, HybridTrackSource, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, LiveObjectSource, LiveTrackSource, Location, LocationFilter, LocationFilterType, LogLevel, Logger, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailClient, MOQtailClientOptions, MOQtailError, MOQtailRequest, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MemoryObjectCache, MessageParameter, MessageParameterType, MessageParameters, MoqtFragment, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NetworkTelemetry, NewGroupRequest, NotEnoughBytesError, ObjectCache, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectOrderer, ObjectOrdering, ObjectProperty, ObjectStatus, ObjectStream, Parameter, PastObjectSource, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRange, PropertyRanges, PropertyReader, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishNamespaceRequest, PublishPublication, PublishRequest, PublishSkipped, Range, RangeDelta, RangeFilter, RangeFilterKind, ReasonPhrase, RecvStream, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestStream, RequestUpdate, RingBufferObjectCache, SUPPORTED_VERSIONS, SendDatagramStream, SendStream, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StaticTrackSource, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeNamespaceRequest, SubscribeOk, SubscribeOptions, SubscribePublication, SubscribeRequest, SubscribeResult, SubscribeTracks, SubscribeUpdateOptions, SubscriberPriority, Subscription, SwitchFrom, SwitchMode, SwitchOptions, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, Track, TrackAliasHolder, TrackNameError, TrackProperty, TrackPropertyType, TrackSource, TrackStatus, TrackStatusCode, TrackStatusRequest, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, WindowSuspension, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, findProperty, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, logger, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setLogEnabledModules, setLogLevel, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AudioConfig, AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer,
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
1
|
+
import { AudioConfig, AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, 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, findProperty, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setupOptionTypeFromNumber, tokenAliasTypeFromNumber } from "./model.mjs";
|
|
2
|
+
import { C as ControlRecvStream, S as RequestStream, T as ControlStream, _ as ObjectStream, a as SubscribeNamespaceRequest, b as SendStream, c as TrackStatusRequest, d as Subscription, f as DEFAULT_FILL_OPEN_TIMEOUT_MS, g as FetchRequest, h as DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, i as PublishPublication, l as PublishRequest, m as DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, n as ObjectOrderer, o as SubscribePublication, p as DEFAULT_MAX_FILTER_RANGES, r as SendDatagramStream, s as FetchPublication, t as MOQtailClient, u as SubscribeRequest, v as PublishNamespaceRequest, w as ControlSendStream, x as DataStreamReporter, y as RecvStream } from "./client-MXn-lkAA.mjs";
|
|
3
|
+
import { a as setLogEnabledModules, i as logger, n as LogLevel, o as setLogLevel, r as Logger, t as Emitter } from "./emitter-UbeRcbuf.mjs";
|
|
4
|
+
import { HybridTrackSource, LiveTrackSource, MemoryObjectCache, RingBufferObjectCache, StaticTrackSource } from "./client.mjs";
|
|
4
5
|
import { ClockNormalizer, NetworkTelemetry } from "./util.mjs";
|
|
5
|
-
export { AudioConfig, AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer,
|
|
6
|
+
export { AudioConfig, AudioLevel, Authority, AuthorizationToken, BaseByteBuffer, ByteBuffer, CastingError, ClockNormalizer, CombinedFilter, ControlMessage, ControlMessageType, ControlRecvStream, ControlSendStream, ControlStream, DEFAULT_FILL_OPEN_TIMEOUT_MS, DEFAULT_MAX_FILTER_RANGES, DEFAULT_PUBLISHER_PRIORITY, DEFAULT_SWITCH_DRAIN_TIMEOUT_MS, DEFAULT_TRACK_ALIAS_RESOLUTION_TIMEOUT_MS, DataStreamReporter, Datagram, DefaultPublisherGroupOrderProperty, DefaultPublisherPriorityProperty, DynamicGroupsProperty, Emitter, EndOfRangeKind, Expires, Fetch, FetchHeader, FetchHeaderType, FetchObject, FetchOk, FetchPublication, FetchRequest, FillParameters, FillTimeout, Forward, FrozenByteBuffer, FullTrackName, GREASE_BASE, GREASE_STEP, GoAway, GroupOrder, GroupOrderParam, Header, HybridTrackSource, ImmutablePropertiesObjectProperty, ImmutablePropertiesTrackProperty, IncludeProperties, InternalError, InvalidEnumValue, InvalidFilterError, InvalidTypeError, InvalidUTF8Error, KeyValueFormattingError, KeyValuePair, LOCProperties, LOCProperty, LOCPropertyId, LargestObject, LengthExceedsMaxError, LiveTrackSource, Location, LocationFilter, LocationFilterType, LogLevel, Logger, MAX_FULL_TRACK_NAME_LENGTH, MAX_NAMESPACE_TUPLE_COUNT, MAX_NEW_SESSION_URI_LENGTH, MAX_REASON_PHRASE_LEN, MOQtailClient, MOQtailError, MaxAuthTokenCacheSize, MaxCacheDurationProperty, MaxFilterRanges, MaxRequestUpdates, MemoryObjectCache, MessageParameter, MessageParameterType, MessageParameters, MoqtImplementation, MoqtObject, MoqtUrl, Namespace, NamespaceDone, NetworkTelemetry, NewGroupRequest, NotEnoughBytesError, ObjectDatagramType, ObjectDeliveryTimeout, ObjectDeliveryTimeoutProperty, ObjectForwardingPreference, ObjectOrderer, ObjectProperty, ObjectStatus, ObjectStream, Path, PriorGroupIdGapProperty, PriorObjectIdGapProperty, PropertyRanges, ProtocolViolationError, Publish, PublishDone, PublishDoneStatusCode, PublishNamespace, PublishNamespaceRequest, PublishPublication, PublishRequest, PublishSkipped, RangeFilter, RangeFilterKind, ReasonPhrase, RecvStream, Redirect, RendezvousTimeout, RequestError, RequestErrorCode, RequestIdError, RequestIdMap, RequestOk, RequestStream, RequestUpdate, RingBufferObjectCache, SUPPORTED_VERSIONS, SendDatagramStream, SendStream, Setup, SetupOption, SetupOptionType, SetupOptions, SstsAlgorithms, StaticTrackSource, StreamResetCode, SubgroupDeliveryTimeout, SubgroupDeliveryTimeoutProperty, SubgroupHeader, SubgroupHeaderType, SubgroupObject, Subscribe, SubscribeNamespace, SubscribeNamespaceRequest, SubscribeOk, SubscribePublication, SubscribeRequest, SubscribeTracks, SubscriberPriority, Subscription, SwitchFrom, SwitchMode, SwitchingSetAssignment, TerminationCode, TerminationError, TimeoutError, Timescale, Timestamp, TokenAliasType, TrackNameError, TrackProperty, TrackPropertyType, TrackStatus, TrackStatusCode, TrackStatusRequest, Tuple, TupleField, UnknownObjectProperty, UnknownTrackProperty, VarIntOverflowError, VideoConfig, VideoFrameMarking, applyMessageParameterUpdate, assertNoAuthorityOverWebTransport, deserializeKvpList, deserializeKvpListUntilEmpty, deserializeMessageParameterKvps, encodeRanges, findProperty, greaseValue, isApplicationSpecificProperty, isBytes, isGrease, isVarInt, locPropertyIdFromNumber, logger, messageParameterTypeFromNumber, resolveTransportUrl, serializeKvpList, serializeMessageParameterKvps, setLogEnabledModules, setLogLevel, setupOptionTypeFromNumber, tokenAliasTypeFromNumber };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 The MOQtail Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
* A typed event emitter over a private `EventTarget`. `Events` maps each event name to
|
|
19
|
+
* its listener signature, so the name decides what a listener receives and what
|
|
20
|
+
* `emit()` must be given. A throwing listener doesn't affect the others: `EventTarget`
|
|
21
|
+
* reports it to the global error handler.
|
|
22
|
+
*/
|
|
23
|
+
declare class Emitter<Events extends { [K in keyof Events]: (...args: any[]) => void; }> {
|
|
24
|
+
#private;
|
|
25
|
+
/** Adds `listener` for `event`. Adding the same function twice has no effect. */
|
|
26
|
+
on<K extends keyof Events & string>(event: K, listener: Events[K]): void;
|
|
27
|
+
/** Removes `listener`, the same function given to {@link Emitter.on}, from `event`. */
|
|
28
|
+
off<K extends keyof Events & string>(event: K, listener: Events[K]): void;
|
|
29
|
+
/** Calls every listener of `event` with `args`. Allocates nothing when there are none. */
|
|
30
|
+
emit<K extends keyof Events & string>(event: K, ...args: Parameters<Events[K]>): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Copyright 2026 The MOQtail Authors
|
|
34
|
+
*
|
|
35
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License.
|
|
37
|
+
* You may obtain a copy of the License at
|
|
38
|
+
*
|
|
39
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
+
* See the License for the specific language governing permissions and
|
|
45
|
+
* limitations under the License.
|
|
46
|
+
*/
|
|
47
|
+
declare enum LogLevel {
|
|
48
|
+
DEBUG = 0,
|
|
49
|
+
LOG = 1,
|
|
50
|
+
WARN = 2,
|
|
51
|
+
ERROR = 3,
|
|
52
|
+
NONE = 4
|
|
53
|
+
}
|
|
54
|
+
declare function setLogLevel(level: LogLevel): void;
|
|
55
|
+
declare function setLogEnabledModules(modules: string[] | null): void;
|
|
56
|
+
declare class Logger {
|
|
57
|
+
private isEnabled;
|
|
58
|
+
debug(module: string, ...args: unknown[]): void;
|
|
59
|
+
log(module: string, ...args: unknown[]): void;
|
|
60
|
+
warn(module: string, ...args: unknown[]): void;
|
|
61
|
+
error(module: string, ...args: unknown[]): void;
|
|
62
|
+
}
|
|
63
|
+
declare const logger: Logger;
|
|
64
|
+
export { setLogLevel as a, setLogEnabledModules as i, Logger as n, Emitter as o, logger as r, LogLevel as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 The MOQtail Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
* A typed event emitter over a private `EventTarget`. `Events` maps each event name to
|
|
19
|
+
* its listener signature, so the name decides what a listener receives and what
|
|
20
|
+
* `emit()` must be given. A throwing listener doesn't affect the others: `EventTarget`
|
|
21
|
+
* reports it to the global error handler.
|
|
22
|
+
*/
|
|
23
|
+
declare class Emitter<Events extends { [K in keyof Events]: (...args: any[]) => void; }> {
|
|
24
|
+
#private;
|
|
25
|
+
/** Adds `listener` for `event`. Adding the same function twice has no effect. */
|
|
26
|
+
on<K extends keyof Events & string>(event: K, listener: Events[K]): void;
|
|
27
|
+
/** Removes `listener`, the same function given to {@link Emitter.on}, from `event`. */
|
|
28
|
+
off<K extends keyof Events & string>(event: K, listener: Events[K]): void;
|
|
29
|
+
/** Calls every listener of `event` with `args`. Allocates nothing when there are none. */
|
|
30
|
+
emit<K extends keyof Events & string>(event: K, ...args: Parameters<Events[K]>): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Copyright 2026 The MOQtail Authors
|
|
34
|
+
*
|
|
35
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License.
|
|
37
|
+
* You may obtain a copy of the License at
|
|
38
|
+
*
|
|
39
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
+
* See the License for the specific language governing permissions and
|
|
45
|
+
* limitations under the License.
|
|
46
|
+
*/
|
|
47
|
+
declare enum LogLevel {
|
|
48
|
+
DEBUG = 0,
|
|
49
|
+
LOG = 1,
|
|
50
|
+
WARN = 2,
|
|
51
|
+
ERROR = 3,
|
|
52
|
+
NONE = 4
|
|
53
|
+
}
|
|
54
|
+
declare function setLogLevel(level: LogLevel): void;
|
|
55
|
+
declare function setLogEnabledModules(modules: string[] | null): void;
|
|
56
|
+
declare class Logger {
|
|
57
|
+
private isEnabled;
|
|
58
|
+
debug(module: string, ...args: unknown[]): void;
|
|
59
|
+
log(module: string, ...args: unknown[]): void;
|
|
60
|
+
warn(module: string, ...args: unknown[]): void;
|
|
61
|
+
error(module: string, ...args: unknown[]): void;
|
|
62
|
+
}
|
|
63
|
+
declare const logger: Logger;
|
|
64
|
+
export { setLogLevel as a, setLogEnabledModules as i, Logger as n, Emitter as o, logger as r, LogLevel as t };
|