moqtail 0.8.1 → 0.10.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 +8 -16
- package/dist/{client/index.cjs → client.cjs} +4291 -4236
- package/dist/{client/index.d.cts → client.d.cts} +166 -94
- package/dist/{client/index.d.ts → client.d.ts} +166 -94
- package/dist/{client/index.js → client.js} +4291 -4237
- package/dist/index.cjs +5675 -5639
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5454 -5464
- package/dist/logger-C6QS408Z.d.cts +34 -0
- package/dist/logger-C6QS408Z.d.ts +34 -0
- package/dist/{model/index.cjs → model.cjs} +2230 -1943
- package/dist/{model/index.d.ts → model.d.cts} +107 -27
- package/dist/{model/index.d.cts → model.d.ts} +107 -27
- package/dist/{model/index.js → model.js} +2195 -1914
- package/dist/setup_parameter-BOeGq6Mv.d.cts +2724 -0
- package/dist/setup_parameter-BOeGq6Mv.d.ts +2724 -0
- package/dist/util.cjs +147 -0
- package/dist/util.d.cts +59 -0
- package/dist/util.d.ts +59 -0
- package/dist/util.js +139 -0
- package/package.json +20 -23
- package/dist/byte_buffer-BM4uNj4n.d.cts +0 -987
- package/dist/byte_buffer-BM4uNj4n.d.ts +0 -987
- package/dist/util/index.cjs +0 -1804
- package/dist/util/index.d.cts +0 -164
- package/dist/util/index.d.ts +0 -164
- package/dist/util/index.js +0 -1795
- package/dist/version_parameter-BpmuiMQj.d.cts +0 -1659
- package/dist/version_parameter-f75NkWiO.d.ts +0 -1659
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as ControlMessage, U as MoqtObject, y as Location, u as FullTrackName, _ as ObjectForwardingPreference, au as TrackExtension, ao as Subscribe, a4 as PublishDoneStatusCode, ae as RequestUpdate, F as Fetch, a2 as Publish, ad as RequestOk, aa as RequestError, a5 as PublishNamespace, p as FetchOk, aq as SubscribeOk, R as MessageParameter, ap as SubscribeNamespace, a8 as PublishOk, v as GroupOrder, q as FetchType, ak as SetupParameters, D as Datagram, r as FilterType, ay as Tuple, ac as RequestIdMap, a7 as PublishNamespaceDone, G as GoAway, an as SubgroupObject, al as SubgroupHeader, n as FetchObject, l as FetchHeader, a3 as PublishDone, ah as ServerSetup, a6 as PublishNamespaceCancel, X as NamespaceSubscribeOptions, aC as UnsubscribeNamespace, aw as TrackStatus, H as Header } from './setup_parameter-BOeGq6Mv.js';
|
|
2
|
+
import { L as LogLevel } from './logger-C6QS408Z.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Copyright 2025 The MOQtail Authors
|
|
@@ -171,7 +171,7 @@ declare class LiveTrackSource implements LiveObjectSource {
|
|
|
171
171
|
readonly stream: ReadableStream<MoqtObject>;
|
|
172
172
|
constructor(stream: ReadableStream<MoqtObject>);
|
|
173
173
|
get largestLocation(): Location | undefined;
|
|
174
|
-
onNewObject(listener: (obj: MoqtObject) => void): () => void;
|
|
174
|
+
onNewObject(listener: (obj: MoqtObject) => Promise<void> | void): () => void;
|
|
175
175
|
onDone(listener: () => void): () => void;
|
|
176
176
|
stop(): void;
|
|
177
177
|
}
|
|
@@ -261,6 +261,12 @@ type Track = {
|
|
|
261
261
|
* Optional compact numeric alias assigned during protocol negotiation.
|
|
262
262
|
*/
|
|
263
263
|
trackAlias?: bigint;
|
|
264
|
+
/**
|
|
265
|
+
* Track extensions advertised by the publisher.
|
|
266
|
+
* Set before calling `publish()` to include extensions in the PUBLISH message.
|
|
267
|
+
* Populated automatically on the subscriber side when SUBSCRIBE_OK or FETCH_OK is received.
|
|
268
|
+
*/
|
|
269
|
+
trackExtensions?: TrackExtension[];
|
|
264
270
|
};
|
|
265
271
|
|
|
266
272
|
/**
|
|
@@ -313,10 +319,10 @@ declare class SubscribePublication {
|
|
|
313
319
|
*/
|
|
314
320
|
done(statusCode: PublishDoneStatusCode): Promise<void>;
|
|
315
321
|
/**
|
|
316
|
-
* Updates the subscription parameters and locations based on a
|
|
317
|
-
* @param msg - The update message containing new
|
|
322
|
+
* Updates the subscription parameters and locations based on a RequestUpdate message.
|
|
323
|
+
* @param msg - The update message containing new request details.
|
|
318
324
|
*/
|
|
319
|
-
update(msg:
|
|
325
|
+
update(msg: RequestUpdate): void;
|
|
320
326
|
/**
|
|
321
327
|
* Publishes MOQT objects to the subscriber as they become available.
|
|
322
328
|
* Handles stream creation, object writing, and stream closure based on subscription parameters.
|
|
@@ -399,7 +405,7 @@ declare class PublishPublication {
|
|
|
399
405
|
}
|
|
400
406
|
|
|
401
407
|
/**
|
|
402
|
-
* Copyright
|
|
408
|
+
* Copyright 2026 The MOQtail Authors
|
|
403
409
|
*
|
|
404
410
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
405
411
|
* you may not use this file except in compliance with the License.
|
|
@@ -414,18 +420,18 @@ declare class PublishPublication {
|
|
|
414
420
|
* limitations under the License.
|
|
415
421
|
*/
|
|
416
422
|
|
|
417
|
-
declare class PublishNamespaceRequest implements PromiseLike<
|
|
423
|
+
declare class PublishNamespaceRequest implements PromiseLike<RequestOk | RequestError> {
|
|
418
424
|
readonly requestId: bigint;
|
|
419
425
|
readonly message: PublishNamespace;
|
|
420
426
|
private _resolve;
|
|
421
427
|
private _reject;
|
|
422
428
|
private promise;
|
|
423
429
|
constructor(requestId: bigint, message: PublishNamespace);
|
|
424
|
-
resolve(value:
|
|
430
|
+
resolve(value: RequestOk | RequestError | PromiseLike<RequestOk | RequestError>): void;
|
|
425
431
|
reject(reason?: any): void;
|
|
426
|
-
then<TResult1 =
|
|
427
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<
|
|
428
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<
|
|
432
|
+
then<TResult1 = RequestOk | RequestError, TResult2 = never>(onfulfilled?: ((value: RequestOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
433
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<RequestOk | RequestError | TResult>;
|
|
434
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<RequestOk | RequestError>;
|
|
429
435
|
}
|
|
430
436
|
|
|
431
437
|
/**
|
|
@@ -444,7 +450,7 @@ declare class PublishNamespaceRequest implements PromiseLike<PublishNamespaceOk
|
|
|
444
450
|
* limitations under the License.
|
|
445
451
|
*/
|
|
446
452
|
|
|
447
|
-
declare class FetchRequest implements PromiseLike<FetchOk |
|
|
453
|
+
declare class FetchRequest implements PromiseLike<FetchOk | RequestError> {
|
|
448
454
|
readonly requestId: bigint;
|
|
449
455
|
readonly message: Fetch;
|
|
450
456
|
private _resolve;
|
|
@@ -455,11 +461,11 @@ declare class FetchRequest implements PromiseLike<FetchOk | FetchError> {
|
|
|
455
461
|
isActive: boolean;
|
|
456
462
|
isResolved: boolean;
|
|
457
463
|
constructor(message: Fetch);
|
|
458
|
-
resolve(value: FetchOk |
|
|
464
|
+
resolve(value: FetchOk | RequestError | PromiseLike<FetchOk | RequestError>): void;
|
|
459
465
|
reject(reason?: any): void;
|
|
460
|
-
then<TResult1 = FetchOk |
|
|
461
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<FetchOk |
|
|
462
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<FetchOk |
|
|
466
|
+
then<TResult1 = FetchOk | RequestError, TResult2 = never>(onfulfilled?: ((value: FetchOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
467
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<FetchOk | RequestError | TResult>;
|
|
468
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<FetchOk | RequestError>;
|
|
463
469
|
}
|
|
464
470
|
|
|
465
471
|
/**
|
|
@@ -478,7 +484,7 @@ declare class FetchRequest implements PromiseLike<FetchOk | FetchError> {
|
|
|
478
484
|
* limitations under the License.
|
|
479
485
|
*/
|
|
480
486
|
|
|
481
|
-
declare class SubscribeRequest implements PromiseLike<SubscribeOk |
|
|
487
|
+
declare class SubscribeRequest implements PromiseLike<SubscribeOk | RequestError> {
|
|
482
488
|
#private;
|
|
483
489
|
requestId: bigint;
|
|
484
490
|
fullTrackName: FullTrackName;
|
|
@@ -487,25 +493,25 @@ declare class SubscribeRequest implements PromiseLike<SubscribeOk | SubscribeErr
|
|
|
487
493
|
endGroup: bigint | undefined;
|
|
488
494
|
priority: number;
|
|
489
495
|
forward: boolean;
|
|
490
|
-
subscribeParameters:
|
|
496
|
+
subscribeParameters: MessageParameter[];
|
|
491
497
|
largestLocation: Location | undefined;
|
|
492
498
|
streamsAccepted: bigint;
|
|
493
499
|
expectedStreams: bigint | undefined;
|
|
494
500
|
readonly controller: ReadableStreamDefaultController<MoqtObject>;
|
|
495
501
|
readonly stream: ReadableStream<MoqtObject>;
|
|
496
502
|
constructor(msg: Subscribe);
|
|
497
|
-
update(msg:
|
|
498
|
-
switch(newTrackName: FullTrackName, newParameters:
|
|
503
|
+
update(msg: RequestUpdate): void;
|
|
504
|
+
switch(newTrackName: FullTrackName, newParameters: MessageParameter[]): void;
|
|
499
505
|
unsubscribe(): void;
|
|
500
|
-
resolve(value: SubscribeOk |
|
|
506
|
+
resolve(value: SubscribeOk | RequestError | PromiseLike<SubscribeOk | RequestError>): void;
|
|
501
507
|
reject(reason?: any): void;
|
|
502
|
-
then<TResult1 = SubscribeOk |
|
|
503
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<SubscribeOk |
|
|
504
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<SubscribeOk |
|
|
508
|
+
then<TResult1 = SubscribeOk | RequestError, TResult2 = never>(onfulfilled?: ((value: SubscribeOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
509
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<SubscribeOk | RequestError | TResult>;
|
|
510
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<SubscribeOk | RequestError>;
|
|
505
511
|
}
|
|
506
512
|
|
|
507
513
|
/**
|
|
508
|
-
* Copyright
|
|
514
|
+
* Copyright 2026 The MOQtail Authors
|
|
509
515
|
*
|
|
510
516
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
511
517
|
* you may not use this file except in compliance with the License.
|
|
@@ -520,18 +526,18 @@ declare class SubscribeRequest implements PromiseLike<SubscribeOk | SubscribeErr
|
|
|
520
526
|
* limitations under the License.
|
|
521
527
|
*/
|
|
522
528
|
|
|
523
|
-
declare class SubscribeNamespaceRequest implements PromiseLike<
|
|
529
|
+
declare class SubscribeNamespaceRequest implements PromiseLike<RequestOk | RequestError> {
|
|
524
530
|
readonly requestId: bigint;
|
|
525
531
|
readonly message: SubscribeNamespace;
|
|
526
532
|
private _resolve;
|
|
527
533
|
private _reject;
|
|
528
534
|
private promise;
|
|
529
535
|
constructor(msg: SubscribeNamespace);
|
|
530
|
-
resolve(value:
|
|
536
|
+
resolve(value: RequestOk | RequestError | PromiseLike<RequestOk | RequestError>): void;
|
|
531
537
|
reject(reason?: any): void;
|
|
532
|
-
then<TResult1 =
|
|
533
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<
|
|
534
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<
|
|
538
|
+
then<TResult1 = RequestOk | RequestError, TResult2 = never>(onfulfilled?: ((value: RequestOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
539
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<RequestOk | RequestError | TResult>;
|
|
540
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<RequestOk | RequestError>;
|
|
535
541
|
}
|
|
536
542
|
|
|
537
543
|
/**
|
|
@@ -550,18 +556,18 @@ declare class SubscribeNamespaceRequest implements PromiseLike<SubscribeNamespac
|
|
|
550
556
|
* limitations under the License.
|
|
551
557
|
*/
|
|
552
558
|
|
|
553
|
-
declare class PublishRequest implements PromiseLike<PublishOk |
|
|
559
|
+
declare class PublishRequest implements PromiseLike<PublishOk | RequestError> {
|
|
554
560
|
readonly requestId: bigint;
|
|
555
561
|
readonly message: Publish;
|
|
556
562
|
private _resolve;
|
|
557
563
|
private _reject;
|
|
558
564
|
private promise;
|
|
559
565
|
constructor(msg: Publish);
|
|
560
|
-
resolve(value: PublishOk |
|
|
566
|
+
resolve(value: PublishOk | RequestError | PromiseLike<PublishOk | RequestError>): void;
|
|
561
567
|
reject(reason?: any): void;
|
|
562
|
-
then<TResult1 = PublishOk |
|
|
563
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<PublishOk |
|
|
564
|
-
finally(onfinally?: (() => void) | undefined | null): Promise<PublishOk |
|
|
568
|
+
then<TResult1 = PublishOk | RequestError, TResult2 = never>(onfulfilled?: ((value: PublishOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
569
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<PublishOk | RequestError | TResult>;
|
|
570
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<PublishOk | RequestError>;
|
|
565
571
|
}
|
|
566
572
|
|
|
567
573
|
/**
|
|
@@ -641,12 +647,12 @@ type MOQtailRequest = PublishRequest | PublishNamespaceRequest | SubscribeNamesp
|
|
|
641
647
|
type MOQtailClientOptions = {
|
|
642
648
|
/** Relay / server endpoint for the underlying {@link https://developer.mozilla.org/docs/Web/API/WebTransport | WebTransport} session (can be absolute {@link https://developer.mozilla.org/en-US/docs/Web/API/URL | URL} or string).*/
|
|
643
649
|
url: string | URL;
|
|
644
|
-
/** Ordered preference list of MOQT protocol version numbers (e.g. `0xff00000b`). */
|
|
645
|
-
supportedVersions: number[];
|
|
646
650
|
/** {@link SetupParameters} customizations; if omitted a default instance is built.*/
|
|
647
651
|
setupParameters?: SetupParameters;
|
|
648
652
|
/** Passed directly to the browser's {@link https://developer.mozilla.org/docs/Web/API/WebTransport | WebTransport} constructor for {@link https://developer.mozilla.org/docs/Web/API/WebTransportOptions | WebTransportOptions}. */
|
|
649
|
-
transportOptions?: WebTransportOptions
|
|
653
|
+
transportOptions?: WebTransportOptions & {
|
|
654
|
+
protocols?: string[];
|
|
655
|
+
};
|
|
650
656
|
/** Per *data* uni-stream idle timeout in milliseconds. */
|
|
651
657
|
dataStreamTimeoutMs?: number;
|
|
652
658
|
/** Control stream read timeout in milliseconds. */
|
|
@@ -662,9 +668,9 @@ type MOQtailClientOptions = {
|
|
|
662
668
|
/** Fired once when the session ends (normal or error). Receives the reason passed to {@link MOQtailClient.disconnect | disconnect}. */
|
|
663
669
|
onSessionTerminated?: (reason?: unknown) => void;
|
|
664
670
|
/** Invoked for each decoded datagram object/status arriving. */
|
|
665
|
-
onDatagramReceived?: (data:
|
|
671
|
+
onDatagramReceived?: (data: Datagram) => void;
|
|
666
672
|
/** Invoked after enqueuing each outbound datagram object/status. */
|
|
667
|
-
onDatagramSent?: (data:
|
|
673
|
+
onDatagramSent?: (data: Datagram) => void;
|
|
668
674
|
};
|
|
669
675
|
};
|
|
670
676
|
/**
|
|
@@ -704,8 +710,8 @@ type SubscribeOptions = {
|
|
|
704
710
|
forward: boolean;
|
|
705
711
|
/** {@link FilterType} variant controlling starting subset (e.g. {@link FilterType.LatestObject}). */
|
|
706
712
|
filterType: FilterType;
|
|
707
|
-
/** Optional extension
|
|
708
|
-
parameters?:
|
|
713
|
+
/** Optional extension parameters appended to the SUBSCRIBE control message. */
|
|
714
|
+
parameters?: MessageParameter[];
|
|
709
715
|
/** Required for {@link FilterType.AbsoluteStart} / {@link FilterType.AbsoluteRange}; earliest {@link Location} to include. */
|
|
710
716
|
startLocation?: Location;
|
|
711
717
|
/** Required for {@link FilterType.AbsoluteRange}; exclusive upper group boundary (coerced to bigint if number provided). */
|
|
@@ -738,8 +744,8 @@ type SubscribeUpdateOptions = {
|
|
|
738
744
|
priority: number;
|
|
739
745
|
/** Updated direction flag. */
|
|
740
746
|
forward: boolean;
|
|
741
|
-
/** Optional additional
|
|
742
|
-
parameters?:
|
|
747
|
+
/** Optional additional parameters; existing parameters persist if omitted. */
|
|
748
|
+
parameters?: MessageParameter[];
|
|
743
749
|
};
|
|
744
750
|
/**
|
|
745
751
|
* Parameters for {@link MOQtailClient.switch | switching} an existing SUBSCRIBE to a new track.
|
|
@@ -757,8 +763,8 @@ type SwitchOptions = {
|
|
|
757
763
|
fullTrackName: FullTrackName;
|
|
758
764
|
/** The original SUBSCRIBE request id (bigint) being updated. */
|
|
759
765
|
subscriptionRequestId: bigint;
|
|
760
|
-
/** Optional additional
|
|
761
|
-
parameters?:
|
|
766
|
+
/** Optional additional parameters; existing parameters persist if omitted. */
|
|
767
|
+
parameters?: MessageParameter[];
|
|
762
768
|
};
|
|
763
769
|
/**
|
|
764
770
|
* Options for {@link MOQtailClient.fetch | performing a FETCH} operation for historical or relative object ranges.
|
|
@@ -769,7 +775,7 @@ type SwitchOptions = {
|
|
|
769
775
|
* priority: 64,
|
|
770
776
|
* groupOrder: GroupOrder.Original,
|
|
771
777
|
* typeAndProps: {
|
|
772
|
-
* type: FetchType.
|
|
778
|
+
* type: FetchType.Standalone,
|
|
773
779
|
* props: { fullTrackName, startLocation, endLocation }
|
|
774
780
|
* }
|
|
775
781
|
* })
|
|
@@ -800,12 +806,12 @@ type FetchOptions = {
|
|
|
800
806
|
groupOrder: GroupOrder;
|
|
801
807
|
/**
|
|
802
808
|
* Discriminated union selecting the {@link FetchType} mode and its specific properties:
|
|
803
|
-
* -
|
|
809
|
+
* - Standalone: full explicit range on a {@link FullTrackName} with start/end {@link Location}s.
|
|
804
810
|
* - Relative / Absolute: join an existing {@link SubscribeRequest} (identified by `joiningRequestId`) with starting position `joiningStart`.
|
|
805
811
|
*/
|
|
806
812
|
typeAndProps: {
|
|
807
813
|
/** Standalone historical/segment fetch for a specific {@link FullTrackName}. */
|
|
808
|
-
type: FetchType.
|
|
814
|
+
type: FetchType.Standalone;
|
|
809
815
|
/** Properties for standalone fetch: explicit track and range. */
|
|
810
816
|
props: {
|
|
811
817
|
fullTrackName: FullTrackName;
|
|
@@ -829,8 +835,8 @@ type FetchOptions = {
|
|
|
829
835
|
joiningStart: bigint;
|
|
830
836
|
};
|
|
831
837
|
};
|
|
832
|
-
/** Optional
|
|
833
|
-
parameters?:
|
|
838
|
+
/** Optional parameters block. */
|
|
839
|
+
parameters?: MessageParameter[];
|
|
834
840
|
};
|
|
835
841
|
|
|
836
842
|
/**
|
|
@@ -861,8 +867,8 @@ type FetchOptions = {
|
|
|
861
867
|
*/
|
|
862
868
|
declare class SendDatagramStream {
|
|
863
869
|
#private;
|
|
864
|
-
readonly onDataSent?: (data:
|
|
865
|
-
constructor(writer: WritableStreamDefaultWriter<Uint8Array>, trackAlias: bigint, onDataSent?: (data:
|
|
870
|
+
readonly onDataSent?: (data: Datagram) => void;
|
|
871
|
+
constructor(writer: WritableStreamDefaultWriter<Uint8Array>, trackAlias: bigint, onDataSent?: (data: Datagram) => void);
|
|
866
872
|
/**
|
|
867
873
|
* Create a new datagram sender for a specific track.
|
|
868
874
|
*
|
|
@@ -871,7 +877,7 @@ declare class SendDatagramStream {
|
|
|
871
877
|
* @param onDataSent - Optional callback fired when datagram is sent
|
|
872
878
|
* @returns SendDatagramStream instance
|
|
873
879
|
*/
|
|
874
|
-
static new(writeStream: WritableStream<Uint8Array>, trackAlias: bigint, onDataSent?: (data:
|
|
880
|
+
static new(writeStream: WritableStream<Uint8Array>, trackAlias: bigint, onDataSent?: (data: Datagram) => void): Promise<SendDatagramStream>;
|
|
875
881
|
/**
|
|
876
882
|
* Create a datagram sender using an existing shared writer.
|
|
877
883
|
* Use this when multiple senders need to share a single writer.
|
|
@@ -881,13 +887,12 @@ declare class SendDatagramStream {
|
|
|
881
887
|
* @param onDataSent - Optional callback fired when datagram is sent
|
|
882
888
|
* @returns SendDatagramStream instance
|
|
883
889
|
*/
|
|
884
|
-
static fromWriter(writer: WritableStreamDefaultWriter<Uint8Array>, trackAlias: bigint, onDataSent?: (data:
|
|
890
|
+
static fromWriter(writer: WritableStreamDefaultWriter<Uint8Array>, trackAlias: bigint, onDataSent?: (data: Datagram) => void): SendDatagramStream;
|
|
885
891
|
/**
|
|
886
892
|
* Write a MoqtObject as a datagram.
|
|
887
|
-
* Converts to
|
|
893
|
+
* Converts to Datagram automatically based on object state.
|
|
888
894
|
*
|
|
889
895
|
* @param object - MoqtObject to send (must have Datagram forwarding preference)
|
|
890
|
-
* @throws ProtocolViolationError if object is not datagram-compatible
|
|
891
896
|
*/
|
|
892
897
|
write(object: MoqtObject): Promise<void>;
|
|
893
898
|
/**
|
|
@@ -904,8 +909,7 @@ declare class SendDatagramStream {
|
|
|
904
909
|
* Parallel to RecvStream but for datagram-based delivery.
|
|
905
910
|
*
|
|
906
911
|
* Automatically handles:
|
|
907
|
-
* -
|
|
908
|
-
* - DatagramStatus parsing (status-only objects)
|
|
912
|
+
* - Datagram parsing (both payload and status datagrams)
|
|
909
913
|
* - Track alias to full track name resolution
|
|
910
914
|
*
|
|
911
915
|
* @example
|
|
@@ -923,7 +927,7 @@ declare class SendDatagramStream {
|
|
|
923
927
|
declare class RecvDatagramStream {
|
|
924
928
|
#private;
|
|
925
929
|
readonly stream: ReadableStream<MoqtObject>;
|
|
926
|
-
readonly onDataReceived?: (data:
|
|
930
|
+
readonly onDataReceived?: (data: Datagram) => void;
|
|
927
931
|
private constructor();
|
|
928
932
|
/**
|
|
929
933
|
* Create a new datagram receiver.
|
|
@@ -933,7 +937,7 @@ declare class RecvDatagramStream {
|
|
|
933
937
|
* @param onDataReceived - Optional callback fired when datagram is received
|
|
934
938
|
* @returns RecvDatagramStream instance
|
|
935
939
|
*/
|
|
936
|
-
static new(readStream: ReadableStream<Uint8Array>, trackAliasResolver: (trackAlias: bigint) => FullTrackName, onDataReceived?: (data:
|
|
940
|
+
static new(readStream: ReadableStream<Uint8Array>, trackAliasResolver: (trackAlias: bigint) => FullTrackName, onDataReceived?: (data: Datagram) => void): Promise<RecvDatagramStream>;
|
|
937
941
|
/**
|
|
938
942
|
* Cancel the datagram reader.
|
|
939
943
|
*/
|
|
@@ -944,6 +948,22 @@ declare class RecvDatagramStream {
|
|
|
944
948
|
releaseLock(): void;
|
|
945
949
|
}
|
|
946
950
|
|
|
951
|
+
/**
|
|
952
|
+
* Copyright 2025 The MOQtail Authors
|
|
953
|
+
*
|
|
954
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
955
|
+
* you may not use this file except in compliance with the License.
|
|
956
|
+
* You may obtain a copy of the License at
|
|
957
|
+
*
|
|
958
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
959
|
+
*
|
|
960
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
961
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
962
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
963
|
+
* See the License for the specific language governing permissions and
|
|
964
|
+
* limitations under the License.
|
|
965
|
+
*/
|
|
966
|
+
|
|
947
967
|
/**
|
|
948
968
|
* @public
|
|
949
969
|
* Represents a Media Over QUIC Transport (MOQT) client session.
|
|
@@ -958,7 +978,7 @@ declare class RecvDatagramStream {
|
|
|
958
978
|
*
|
|
959
979
|
* ### Connect and Subscribe to a Track
|
|
960
980
|
* ```ts
|
|
961
|
-
* const client = await MOQtailClient.new({ url
|
|
981
|
+
* const client = await MOQtailClient.new({ url });
|
|
962
982
|
* const result = await client.subscribe({
|
|
963
983
|
* fullTrackName,
|
|
964
984
|
* filterType: FilterType.LatestObject,
|
|
@@ -966,7 +986,7 @@ declare class RecvDatagramStream {
|
|
|
966
986
|
* groupOrder: GroupOrder.Original,
|
|
967
987
|
* priority: 0
|
|
968
988
|
* });
|
|
969
|
-
* if (!(result instanceof
|
|
989
|
+
* if (!(result instanceof RequestError)) {
|
|
970
990
|
* for await (const object of result.stream) {
|
|
971
991
|
* // Consume MOQT objects
|
|
972
992
|
* }
|
|
@@ -975,9 +995,9 @@ declare class RecvDatagramStream {
|
|
|
975
995
|
*
|
|
976
996
|
* ### Publish a namespace for Publishing
|
|
977
997
|
* ```ts
|
|
978
|
-
* const client = await MOQtailClient.new({ url
|
|
998
|
+
* const client = await MOQtailClient.new({ url });
|
|
979
999
|
* const publishNamespaceResult = await client.publishNamespace(["camera", "main"]);
|
|
980
|
-
* if (!(publishNamespaceResult instanceof
|
|
1000
|
+
* if (!(publishNamespaceResult instanceof RequestError)) {
|
|
981
1001
|
* // Ready to publish objects under this namespace
|
|
982
1002
|
* }
|
|
983
1003
|
* ```
|
|
@@ -1071,7 +1091,7 @@ declare class MOQtailClient {
|
|
|
1071
1091
|
*/
|
|
1072
1092
|
onGoaway?: (msg: GoAway) => void;
|
|
1073
1093
|
/**
|
|
1074
|
-
* Fired if the underlying WebTransport session fails (ready
|
|
1094
|
+
* Fired if the underlying WebTransport session fails (ready -\> closed prematurely).
|
|
1075
1095
|
* Use to log or alert on transport errors.
|
|
1076
1096
|
* Lifecycle/error handler.
|
|
1077
1097
|
*/
|
|
@@ -1113,13 +1133,19 @@ declare class MOQtailClient {
|
|
|
1113
1133
|
*/
|
|
1114
1134
|
onError?: (er: unknown) => void;
|
|
1115
1135
|
/** Invoked for each decoded datagram object/status arriving. */
|
|
1116
|
-
onDatagramReceived?: (data:
|
|
1136
|
+
onDatagramReceived?: (data: Datagram) => void;
|
|
1117
1137
|
/** Invoked after enqueuing each outbound datagram object/status. */
|
|
1118
|
-
onDatagramSent?: (data:
|
|
1138
|
+
onDatagramSent?: (data: Datagram) => void;
|
|
1119
1139
|
/** Fired when an inbound PUBLISH control message is received. */
|
|
1120
1140
|
onPeerPublish?: (msg: Publish, stream: ReadableStream<MoqtObject>) => void;
|
|
1141
|
+
/** Fired when an inbound PUBLISH_DONE control message is received. */
|
|
1142
|
+
onPeerPublishDone?: (msg: PublishDone) => void;
|
|
1121
1143
|
/** Fired when an inbound SUBSCRIBE_NAMESPACE control message is received. */
|
|
1122
1144
|
onPeerSubscribeNamespace?: (msg: SubscribeNamespace) => void;
|
|
1145
|
+
/** Fired when a NAMESPACE message arrives on a SUBSCRIBE_NAMESPACE bi-stream (prefix + suffix). */
|
|
1146
|
+
onPeerNamespace?: (prefix: Tuple, suffix: Tuple) => void;
|
|
1147
|
+
/** Fired when a NAMESPACE_DONE message arrives on a SUBSCRIBE_NAMESPACE bi-stream (prefix + suffix). */
|
|
1148
|
+
onPeerNamespaceDone?: (prefix: Tuple, suffix: Tuple) => void;
|
|
1123
1149
|
/**
|
|
1124
1150
|
* Stream of all received MoqtObjects from datagrams across all tracks
|
|
1125
1151
|
* Consumer should filter by fullTrackName as needed
|
|
@@ -1142,6 +1168,16 @@ declare class MOQtailClient {
|
|
|
1142
1168
|
* Returns true if datagram support is currently active
|
|
1143
1169
|
*/
|
|
1144
1170
|
get isDatagramsEnabled(): boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* Sets the global log level for all moqtail-ts loggers.
|
|
1173
|
+
* @param level - The minimum {@link LogLevel} to output. Use `LogLevel.NONE` to silence all logs.
|
|
1174
|
+
*/
|
|
1175
|
+
static setLogLevel(level: LogLevel): void;
|
|
1176
|
+
/**
|
|
1177
|
+
* Restricts log output to the specified module names. Pass `null` to allow all modules.
|
|
1178
|
+
* @param modules - Array of module name strings, or `null` to enable all modules.
|
|
1179
|
+
*/
|
|
1180
|
+
static setLogEnabledModules(modules: string[] | null): void;
|
|
1145
1181
|
private constructor();
|
|
1146
1182
|
/**
|
|
1147
1183
|
* Establishes a new {@link MOQtailClient} session over WebTransport and performs the MOQT setup handshake.
|
|
@@ -1155,8 +1191,7 @@ declare class MOQtailClient {
|
|
|
1155
1191
|
* @example Minimal connection
|
|
1156
1192
|
* ```ts
|
|
1157
1193
|
* const client = await MOQtailClient.new({
|
|
1158
|
-
* url: 'https://relay.example.com/transport'
|
|
1159
|
-
* supportedVersions: [0xff00000b]
|
|
1194
|
+
* url: 'https://relay.example.com/transport'
|
|
1160
1195
|
* });
|
|
1161
1196
|
* ```
|
|
1162
1197
|
*
|
|
@@ -1164,7 +1199,6 @@ declare class MOQtailClient {
|
|
|
1164
1199
|
* ```ts
|
|
1165
1200
|
* const client = await MOQtailClient.new({
|
|
1166
1201
|
* url,
|
|
1167
|
-
* supportedVersions: [0xff00000b],
|
|
1168
1202
|
* setupParameters: new SetupParameters().addMaxRequestId(1000),
|
|
1169
1203
|
* transportOptions: { congestionControl: 'default' },
|
|
1170
1204
|
* dataStreamTimeoutMs: 5000,
|
|
@@ -1353,11 +1387,11 @@ declare class MOQtailClient {
|
|
|
1353
1387
|
* - `filterType: AbsoluteRange` lets you specify a start and end group, both of should be in the future; the stream waits for those objects. If the start location is \< the latest object
|
|
1354
1388
|
* observed at the publisher then it behaves as `filterType: LatestObject`.
|
|
1355
1389
|
*
|
|
1356
|
-
* The method returns either a {@link
|
|
1390
|
+
* The method returns either a {@link RequestError} (on refusal) or an object with the subscription `requestId` and a `ReadableStream` of {@link MoqtObject}s.
|
|
1357
1391
|
* Use the `requestId` for {@link MOQtailClient.unsubscribe} or {@link MOQtailClient.subscribeUpdate}. Use the `stream` to decode and display objects.
|
|
1358
1392
|
*
|
|
1359
1393
|
* @param args - {@link SubscribeOptions} describing the subscription window and relay forwarding behavior.
|
|
1360
|
-
* @returns Either a {@link
|
|
1394
|
+
* @returns Either a {@link RequestError} or `{ requestId, stream }` for consuming objects.
|
|
1361
1395
|
* @throws : {@link MOQtailError} If the client is destroyed.
|
|
1362
1396
|
* @throws : {@link ProtocolViolationError} If required fields are missing or inconsistent.
|
|
1363
1397
|
* @throws : {@link InternalError} On transport/protocol failure (disconnect is triggered before rethrow).
|
|
@@ -1371,7 +1405,7 @@ declare class MOQtailClient {
|
|
|
1371
1405
|
* groupOrder: GroupOrder.Original,
|
|
1372
1406
|
* priority: 32
|
|
1373
1407
|
* });
|
|
1374
|
-
* if (!(result instanceof
|
|
1408
|
+
* if (!(result instanceof RequestError)) {
|
|
1375
1409
|
* for await (const obj of result.stream) {
|
|
1376
1410
|
* // decode and display obj
|
|
1377
1411
|
* }
|
|
@@ -1391,7 +1425,7 @@ declare class MOQtailClient {
|
|
|
1391
1425
|
* });
|
|
1392
1426
|
* ```
|
|
1393
1427
|
*/
|
|
1394
|
-
subscribe(args: SubscribeOptions): Promise<
|
|
1428
|
+
subscribe(args: SubscribeOptions): Promise<RequestError | {
|
|
1395
1429
|
requestId: bigint;
|
|
1396
1430
|
stream: ReadableStream<MoqtObject>;
|
|
1397
1431
|
}>;
|
|
@@ -1416,7 +1450,7 @@ declare class MOQtailClient {
|
|
|
1416
1450
|
* @example Subscribe and later unsubscribe
|
|
1417
1451
|
* ```ts
|
|
1418
1452
|
* const sub = await client.subscribe({ fullTrackName, filterType: FilterType.LatestObject, forward: true, groupOrder: GroupOrder.Original, priority: 0 });
|
|
1419
|
-
* if (!(sub instanceof
|
|
1453
|
+
* if (!(sub instanceof RequestError)) {
|
|
1420
1454
|
* // ...consume objects...
|
|
1421
1455
|
* await client.unsubscribe(sub.requestId);
|
|
1422
1456
|
* }
|
|
@@ -1488,7 +1522,7 @@ declare class MOQtailClient {
|
|
|
1488
1522
|
* await client.switch({ subscriptionRequestId, fullTrackName: newTrackName });
|
|
1489
1523
|
* ```
|
|
1490
1524
|
*/
|
|
1491
|
-
switch(args: SwitchOptions): Promise<
|
|
1525
|
+
switch(args: SwitchOptions): Promise<RequestError | {
|
|
1492
1526
|
requestId: bigint;
|
|
1493
1527
|
stream: ReadableStream<MoqtObject>;
|
|
1494
1528
|
}>;
|
|
@@ -1496,7 +1530,7 @@ declare class MOQtailClient {
|
|
|
1496
1530
|
* One-shot retrieval of a bounded object span, optionally anchored to an existing subscription, returning a stream of {@link MoqtObject}s.
|
|
1497
1531
|
*
|
|
1498
1532
|
* Choose a fetch type via `typeAndProps.type`:
|
|
1499
|
-
* -
|
|
1533
|
+
* - Standalone: Historical slice of a specific {@link FullTrackName} independent of active subscriptions.
|
|
1500
1534
|
* - Relative: Range relative to the JOINING subscription's current (largest) location; use when you want "N groups back" from live.
|
|
1501
1535
|
* - Absolute: Absolute group/object offsets tied to an existing subscription (stable anchor) even if that subscription keeps forwarding.
|
|
1502
1536
|
*
|
|
@@ -1506,7 +1540,7 @@ declare class MOQtailClient {
|
|
|
1506
1540
|
* - typeAndProps: Discriminated union carrying parameters specific to each fetch mode (see examples).
|
|
1507
1541
|
* - parameters: Optional version-specific extension block.
|
|
1508
1542
|
*
|
|
1509
|
-
* Returns either a {@link
|
|
1543
|
+
* Returns either a {@link RequestError} (refusal / invalid request at protocol level) or `{ requestId, stream }` whose `stream`
|
|
1510
1544
|
* ends naturally after the bounded range completes (no explicit cancel needed for normal completion).
|
|
1511
1545
|
*
|
|
1512
1546
|
* Use cases:
|
|
@@ -1529,11 +1563,11 @@ declare class MOQtailClient {
|
|
|
1529
1563
|
* priority: 64,
|
|
1530
1564
|
* groupOrder: GroupOrder.Original,
|
|
1531
1565
|
* typeAndProps: {
|
|
1532
|
-
* type: FetchType.
|
|
1566
|
+
* type: FetchType.Standalone,
|
|
1533
1567
|
* props: { fullTrackName, startLocation, endLocation }
|
|
1534
1568
|
* }
|
|
1535
1569
|
* })
|
|
1536
|
-
* if (!(r instanceof
|
|
1570
|
+
* if (!(r instanceof RequestError)) {
|
|
1537
1571
|
* for await (const obj of r.stream as any) {
|
|
1538
1572
|
* // consume objects then stream ends automatically
|
|
1539
1573
|
* }
|
|
@@ -1543,7 +1577,7 @@ declare class MOQtailClient {
|
|
|
1543
1577
|
* @example Relative to live subscription (e.g. last 5 groups)
|
|
1544
1578
|
* ```ts
|
|
1545
1579
|
* const sub = await client.subscribe({ fullTrackName, filterType: FilterType.LatestObject, forward: true, groupOrder: GroupOrder.Original, priority: 0 })
|
|
1546
|
-
* if (!(sub instanceof
|
|
1580
|
+
* if (!(sub instanceof RequestError)) {
|
|
1547
1581
|
* const slice = await client.fetch({
|
|
1548
1582
|
* priority: 32,
|
|
1549
1583
|
* groupOrder: GroupOrder.Original,
|
|
@@ -1552,7 +1586,7 @@ declare class MOQtailClient {
|
|
|
1552
1586
|
* }
|
|
1553
1587
|
* ```
|
|
1554
1588
|
*/
|
|
1555
|
-
fetch(args: FetchOptions): Promise<
|
|
1589
|
+
fetch(args: FetchOptions): Promise<RequestError | {
|
|
1556
1590
|
requestId: bigint;
|
|
1557
1591
|
stream: ReadableStream<MoqtObject>;
|
|
1558
1592
|
}>;
|
|
@@ -1578,8 +1612,8 @@ declare class MOQtailClient {
|
|
|
1578
1612
|
*
|
|
1579
1613
|
* @example Cancel shortly after starting
|
|
1580
1614
|
* ```ts
|
|
1581
|
-
* const r = await client.fetch({ priority: 32, groupOrder: GroupOrder.Original, typeAndProps: { type: FetchType.
|
|
1582
|
-
* if (!(r instanceof
|
|
1615
|
+
* const r = await client.fetch({ priority: 32, groupOrder: GroupOrder.Original, typeAndProps: { type: FetchType.Standalone, props: { fullTrackName, startLocation, endLocation } } })
|
|
1616
|
+
* if (!(r instanceof RequestError)) {
|
|
1583
1617
|
* // user navigated away
|
|
1584
1618
|
* await client.fetchCancel(r.requestId)
|
|
1585
1619
|
* }
|
|
@@ -1595,10 +1629,15 @@ declare class MOQtailClient {
|
|
|
1595
1629
|
/**
|
|
1596
1630
|
* Proactively push a track to the relay/peer.
|
|
1597
1631
|
*/
|
|
1598
|
-
publish(fullTrackName: FullTrackName, forward: boolean, trackAlias: bigint, parameters?:
|
|
1632
|
+
publish(fullTrackName: FullTrackName, forward: boolean, trackAlias: bigint, parameters?: MessageParameter[], trackExtensions?: TrackExtension[]): Promise<RequestError | {
|
|
1599
1633
|
requestId: bigint;
|
|
1600
1634
|
trackAlias: bigint;
|
|
1601
1635
|
}>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Signals the end of a published track to the peer/relay.
|
|
1638
|
+
* * @param publishRequestId - The original requestId used when `publish()` was called.
|
|
1639
|
+
*/
|
|
1640
|
+
publishDone(publishRequestId: bigint | number, statusCode?: number, reasonPhrase?: string): Promise<void>;
|
|
1602
1641
|
/**
|
|
1603
1642
|
* Registers an incoming PUBLISH announcement as a valid data receiver.
|
|
1604
1643
|
* This prepares the client to ingest pushed data streams matching the published alias.
|
|
@@ -1617,9 +1656,9 @@ declare class MOQtailClient {
|
|
|
1617
1656
|
*
|
|
1618
1657
|
* Parameter semantics:
|
|
1619
1658
|
* - trackNamespace: Tuple representing the namespace prefix (e.g. ["camera","main"]). All tracks whose full names start with this tuple are considered within the announce scope.
|
|
1620
|
-
* - parameters: Optional {@link
|
|
1659
|
+
* - parameters: Optional {@link MessageParameters}; omitted =\> default instance.
|
|
1621
1660
|
*
|
|
1622
|
-
* Returns: {@link
|
|
1661
|
+
* Returns: {@link RequestOk} on success (namespace added to `announcedNamespaces`) or {@link RequestError} explaining refusal.
|
|
1623
1662
|
*
|
|
1624
1663
|
* Use cases:
|
|
1625
1664
|
* - Make a camera or sensor namespace available before any objects are pushed.
|
|
@@ -1637,18 +1676,18 @@ declare class MOQtailClient {
|
|
|
1637
1676
|
* @example Minimal announce
|
|
1638
1677
|
* ```ts
|
|
1639
1678
|
* const res = await client.publishNamespace(["camera","main"])
|
|
1640
|
-
* if (res instanceof
|
|
1679
|
+
* if (res instanceof RequestOk) {
|
|
1641
1680
|
* // ready to publish objects under tracks with this namespace prefix
|
|
1642
1681
|
* }
|
|
1643
1682
|
* ```
|
|
1644
1683
|
*
|
|
1645
1684
|
* @example PublishNamespace with parameters block
|
|
1646
1685
|
* ```ts
|
|
1647
|
-
* const params = new
|
|
1686
|
+
* const params = new MessageParameters().setSomeExtensionFlag(true)
|
|
1648
1687
|
* const resp = await client.publishNamespace(["room","1234"], params)
|
|
1649
1688
|
* ```
|
|
1650
1689
|
*/
|
|
1651
|
-
publishNamespace(trackNamespace: Tuple, parameters?:
|
|
1690
|
+
publishNamespace(trackNamespace: Tuple, parameters?: MessageParameter[]): Promise<RequestOk | RequestError>;
|
|
1652
1691
|
/**
|
|
1653
1692
|
* Withdraw a previously announced namespace so new subscribers no longer discover its tracks.
|
|
1654
1693
|
*
|
|
@@ -1710,10 +1749,43 @@ declare class MOQtailClient {
|
|
|
1710
1749
|
* ```
|
|
1711
1750
|
*/
|
|
1712
1751
|
publishNamespaceCancel(msg: PublishNamespaceCancel): Promise<void>;
|
|
1713
|
-
subscribeNamespace(trackNamespacePrefix: Tuple, parameters?:
|
|
1752
|
+
subscribeNamespace(trackNamespacePrefix: Tuple, subscribeOptions?: NamespaceSubscribeOptions, parameters?: MessageParameter[]): Promise<{
|
|
1753
|
+
response: RequestOk | RequestError;
|
|
1754
|
+
cancel: () => Promise<void>;
|
|
1755
|
+
}>;
|
|
1714
1756
|
unsubscribeNamespace(msg: UnsubscribeNamespace): Promise<void>;
|
|
1715
1757
|
}
|
|
1716
1758
|
|
|
1759
|
+
/**
|
|
1760
|
+
* Copyright 2026 The MOQtail Authors
|
|
1761
|
+
*
|
|
1762
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1763
|
+
* you may not use this file except in compliance with the License.
|
|
1764
|
+
* You may obtain a copy of the License at
|
|
1765
|
+
*
|
|
1766
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1767
|
+
*
|
|
1768
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1769
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1770
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1771
|
+
* See the License for the specific language governing permissions and
|
|
1772
|
+
* limitations under the License.
|
|
1773
|
+
*/
|
|
1774
|
+
|
|
1775
|
+
declare class TrackStatusRequest implements PromiseLike<RequestOk | RequestError> {
|
|
1776
|
+
readonly requestId: bigint;
|
|
1777
|
+
readonly message: TrackStatus;
|
|
1778
|
+
private _resolve;
|
|
1779
|
+
private _reject;
|
|
1780
|
+
private promise;
|
|
1781
|
+
constructor(msg: TrackStatus);
|
|
1782
|
+
resolve(value: RequestOk | RequestError | PromiseLike<RequestOk | RequestError>): void;
|
|
1783
|
+
reject(reason?: any): void;
|
|
1784
|
+
then<TResult1 = RequestOk | RequestError, TResult2 = never>(onfulfilled?: ((value: RequestOk | RequestError) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
1785
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<RequestOk | RequestError | TResult>;
|
|
1786
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<RequestOk | RequestError>;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1717
1789
|
/**
|
|
1718
1790
|
* Copyright 2025 The MOQtail Authors
|
|
1719
1791
|
*
|
|
@@ -1748,4 +1820,4 @@ declare class RecvStream {
|
|
|
1748
1820
|
static new(readStream: ReadableStream<Uint8Array>, partialDataTimeout?: number, onDataReceived?: (data: SubgroupObject | SubgroupHeader | FetchObject | FetchHeader) => void): Promise<RecvStream>;
|
|
1749
1821
|
}
|
|
1750
1822
|
|
|
1751
|
-
export { ControlStream, type FetchOptions, FetchPublication, FetchRequest, HybridTrackSource, type LiveObjectSource, LiveTrackSource, MOQtailClient, type MOQtailClientOptions, type MOQtailRequest, MemoryObjectCache, type ObjectCache, type PastObjectSource, PublishNamespaceRequest, PublishPublication, PublishRequest, RecvDatagramStream, RecvStream, RingBufferObjectCache, SendDatagramStream, SendStream, StaticTrackSource, SubscribeNamespaceRequest, type SubscribeOptions, SubscribePublication, SubscribeRequest, type SubscribeUpdateOptions, type SwitchOptions, type Track, type TrackSource };
|
|
1823
|
+
export { ControlStream, type FetchOptions, FetchPublication, FetchRequest, HybridTrackSource, type LiveObjectSource, LiveTrackSource, MOQtailClient, type MOQtailClientOptions, type MOQtailRequest, MemoryObjectCache, type ObjectCache, type PastObjectSource, PublishNamespaceRequest, PublishPublication, PublishRequest, RecvDatagramStream, RecvStream, RingBufferObjectCache, SendDatagramStream, SendStream, StaticTrackSource, SubscribeNamespaceRequest, type SubscribeOptions, SubscribePublication, SubscribeRequest, type SubscribeUpdateOptions, type SwitchOptions, type Track, type TrackSource, TrackStatusRequest };
|