moqtail 0.9.0 → 0.10.1
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.cjs +4324 -4248
- package/dist/client.d.cts +182 -93
- package/dist/client.d.ts +182 -93
- package/dist/client.js +4324 -4249
- package/dist/index.cjs +4810 -4665
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4542 -4448
- package/dist/logger-C6QS408Z.d.cts +34 -0
- package/dist/logger-C6QS408Z.d.ts +34 -0
- package/dist/model.cjs +2055 -1982
- package/dist/model.d.cts +83 -52
- package/dist/model.d.ts +83 -52
- package/dist/model.js +2021 -1953
- package/dist/{version_parameter-DXBOBueW.d.cts → setup_parameter-BOeGq6Mv.d.cts} +840 -759
- package/dist/{version_parameter-DXBOBueW.d.ts → setup_parameter-BOeGq6Mv.d.ts} +840 -759
- package/dist/util.cjs +45 -0
- package/dist/util.d.cts +2 -0
- package/dist/util.d.ts +2 -0
- package/dist/util.js +41 -1
- package/package.json +1 -1
|
@@ -364,80 +364,44 @@ declare class ReasonPhrase {
|
|
|
364
364
|
*/
|
|
365
365
|
/**
|
|
366
366
|
* @public
|
|
367
|
-
* Object datagram
|
|
368
|
-
* Status datagrams use types 0x20-0x21.
|
|
367
|
+
* Object datagram types for MOQT objects (Draft-16).
|
|
369
368
|
*
|
|
370
|
-
* Type bit layout:
|
|
371
|
-
* - Bit 0
|
|
369
|
+
* Type bit layout (form 0b00X0XXXX):
|
|
370
|
+
* - Bit 0 (0x01): EXTENSIONS - Extensions field present
|
|
371
|
+
* - Bit 1 (0x02): END_OF_GROUP - Last object in group
|
|
372
|
+
* - Bit 2 (0x04): ZERO_OBJECT_ID - Object ID omitted (assumed 0)
|
|
373
|
+
* - Bit 3 (0x08): DEFAULT_PRIORITY - Publisher Priority omitted (inherited)
|
|
374
|
+
* - Bit 5 (0x20): STATUS - Object Status replaces Object Payload
|
|
372
375
|
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* | 0x21 | Yes | Yes |
|
|
377
|
-
*/
|
|
378
|
-
declare enum ObjectDatagramStatusType {
|
|
379
|
-
/** Status without extensions (0x20) */
|
|
380
|
-
WithoutExtensions = 32,
|
|
381
|
-
/** Status with extensions (0x21) */
|
|
382
|
-
WithExtensions = 33
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* @public
|
|
386
|
-
* Namespace for ObjectDatagramStatusType utilities.
|
|
387
|
-
*/
|
|
388
|
-
declare namespace ObjectDatagramStatusType {
|
|
389
|
-
/**
|
|
390
|
-
* Converts a number or bigint to ObjectDatagramStatusType.
|
|
391
|
-
* @param value - The value to convert.
|
|
392
|
-
* @returns The corresponding ObjectDatagramStatusType.
|
|
393
|
-
* @throws Error if the value is not valid.
|
|
394
|
-
*/
|
|
395
|
-
function tryFrom(value: number | bigint): ObjectDatagramStatusType;
|
|
396
|
-
/**
|
|
397
|
-
* Returns true if the type has extensions.
|
|
398
|
-
* @param t - The ObjectDatagramStatusType.
|
|
399
|
-
*/
|
|
400
|
-
function hasExtensions(t: ObjectDatagramStatusType): boolean;
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* @public
|
|
404
|
-
* Object datagram types for MOQT objects (Draft-14).
|
|
405
|
-
*
|
|
406
|
-
* Type bit layout for 0x00-0x07:
|
|
407
|
-
* - Bit 0: Extensions Present (0 = no, 1 = yes)
|
|
408
|
-
* - Bit 1: End of Group (0 = no, 1 = yes)
|
|
409
|
-
* - Bit 2: Object ID Present (0 = Object ID omitted & is 0, 1 = Object ID present)
|
|
410
|
-
*
|
|
411
|
-
* Note: Bit 2 is inverted - when set, Object ID is ABSENT (and assumed 0)
|
|
412
|
-
*
|
|
413
|
-
* | Type | End of Group | Extensions | Object ID Present | Content |
|
|
414
|
-
* |------|-------------|------------|------------------|--------|
|
|
415
|
-
* | 0x00 | No | No | Yes | Payload |
|
|
416
|
-
* | 0x01 | No | Yes | Yes | Payload |
|
|
417
|
-
* | 0x02 | Yes | No | Yes | Payload |
|
|
418
|
-
* | 0x03 | Yes | Yes | Yes | Payload |
|
|
419
|
-
* | 0x04 | No | No | No (ID=0) | Payload |
|
|
420
|
-
* | 0x05 | No | Yes | No (ID=0) | Payload |
|
|
421
|
-
* | 0x06 | Yes | No | No (ID=0) | Payload |
|
|
422
|
-
* | 0x07 | Yes | Yes | No (ID=0) | Payload |
|
|
376
|
+
* Invalid combinations:
|
|
377
|
+
* - STATUS (0x20) + END_OF_GROUP (0x02) together is a PROTOCOL_VIOLATION
|
|
378
|
+
* - Types outside the form 0b00X0XXXX are invalid
|
|
423
379
|
*/
|
|
424
380
|
declare enum ObjectDatagramType {
|
|
425
|
-
/** No End of Group, No Extensions, Object ID Present (0x00) */
|
|
426
381
|
Type0x00 = 0,
|
|
427
|
-
/** No End of Group, With Extensions, Object ID Present (0x01) */
|
|
428
382
|
Type0x01 = 1,
|
|
429
|
-
/** End of Group, No Extensions, Object ID Present (0x02) */
|
|
430
383
|
Type0x02 = 2,
|
|
431
|
-
/** End of Group, With Extensions, Object ID Present (0x03) */
|
|
432
384
|
Type0x03 = 3,
|
|
433
|
-
/** No End of Group, No Extensions, Object ID = 0 (0x04) */
|
|
434
385
|
Type0x04 = 4,
|
|
435
|
-
/** No End of Group, With Extensions, Object ID = 0 (0x05) */
|
|
436
386
|
Type0x05 = 5,
|
|
437
|
-
/** End of Group, No Extensions, Object ID = 0 (0x06) */
|
|
438
387
|
Type0x06 = 6,
|
|
439
|
-
|
|
440
|
-
|
|
388
|
+
Type0x07 = 7,
|
|
389
|
+
Type0x08 = 8,
|
|
390
|
+
Type0x09 = 9,
|
|
391
|
+
Type0x0A = 10,
|
|
392
|
+
Type0x0B = 11,
|
|
393
|
+
Type0x0C = 12,
|
|
394
|
+
Type0x0D = 13,
|
|
395
|
+
Type0x0E = 14,
|
|
396
|
+
Type0x0F = 15,
|
|
397
|
+
Type0x20 = 32,
|
|
398
|
+
Type0x21 = 33,
|
|
399
|
+
Type0x24 = 36,
|
|
400
|
+
Type0x25 = 37,
|
|
401
|
+
Type0x28 = 40,
|
|
402
|
+
Type0x29 = 41,
|
|
403
|
+
Type0x2C = 44,
|
|
404
|
+
Type0x2D = 45
|
|
441
405
|
}
|
|
442
406
|
/**
|
|
443
407
|
* @public
|
|
@@ -446,6 +410,8 @@ declare enum ObjectDatagramType {
|
|
|
446
410
|
declare namespace ObjectDatagramType {
|
|
447
411
|
/**
|
|
448
412
|
* Converts a number or bigint to ObjectDatagramType.
|
|
413
|
+
* Validates using bitmask: must match form 0b00X0XXXX,
|
|
414
|
+
* and STATUS + END_OF_GROUP cannot both be set.
|
|
449
415
|
* @param value - The value to convert.
|
|
450
416
|
* @returns The corresponding ObjectDatagramType.
|
|
451
417
|
* @throws Error if the value is not valid.
|
|
@@ -462,18 +428,32 @@ declare namespace ObjectDatagramType {
|
|
|
462
428
|
*/
|
|
463
429
|
function isEndOfGroup(t: ObjectDatagramType): boolean;
|
|
464
430
|
/**
|
|
465
|
-
* Returns true if Object ID is
|
|
466
|
-
* When
|
|
431
|
+
* Returns true if Object ID is absent (bit 2 set).
|
|
432
|
+
* When true, Object ID is omitted and assumed to be 0.
|
|
433
|
+
* @param t - The ObjectDatagramType.
|
|
434
|
+
*/
|
|
435
|
+
function isZeroObjectId(t: ObjectDatagramType): boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Returns true if Publisher Priority is omitted (bit 3 set).
|
|
438
|
+
* When true, the priority is inherited from the control message.
|
|
439
|
+
* @param t - The ObjectDatagramType.
|
|
440
|
+
*/
|
|
441
|
+
function hasDefaultPriority(t: ObjectDatagramType): boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Returns true if the datagram carries Object Status instead of payload (bit 5 set).
|
|
467
444
|
* @param t - The ObjectDatagramType.
|
|
468
445
|
*/
|
|
469
|
-
function
|
|
446
|
+
function isStatus(t: ObjectDatagramType): boolean;
|
|
470
447
|
/**
|
|
471
448
|
* Determines the appropriate type for given properties.
|
|
472
449
|
* @param hasExtensions - Whether extensions are present.
|
|
473
450
|
* @param endOfGroup - Whether this is the last object in the group.
|
|
474
451
|
* @param objectIdIsZero - Whether the objectId is 0.
|
|
452
|
+
* @param defaultPriority - Whether publisher priority is inherited (omitted).
|
|
453
|
+
* @param isStatus - Whether the datagram carries status instead of payload.
|
|
454
|
+
* @throws Error if STATUS and END_OF_GROUP are both true (PROTOCOL_VIOLATION).
|
|
475
455
|
*/
|
|
476
|
-
function fromProperties(hasExtensions: boolean, endOfGroup: boolean, objectIdIsZero: boolean): ObjectDatagramType;
|
|
456
|
+
function fromProperties(hasExtensions: boolean, endOfGroup: boolean, objectIdIsZero: boolean, defaultPriority: boolean, isStatus: boolean): ObjectDatagramType;
|
|
477
457
|
}
|
|
478
458
|
/**
|
|
479
459
|
* @public
|
|
@@ -497,6 +477,16 @@ declare namespace FetchHeaderType {
|
|
|
497
477
|
/**
|
|
498
478
|
* @public
|
|
499
479
|
* Subgroup header types for MOQT subgroups.
|
|
480
|
+
*
|
|
481
|
+
* Type bit layout (0b00X1XXXX):
|
|
482
|
+
* - Bit 0 (0x01): EXTENSIONS - Extensions present in all objects
|
|
483
|
+
* - Bits 1-2 (0x06): SUBGROUP_ID_MODE - How subgroup ID is encoded (0b00=zero, 0b01=firstObjId, 0b10=explicit, 0b11=invalid)
|
|
484
|
+
* - Bit 3 (0x08): END_OF_GROUP - This subgroup contains the final object in the group
|
|
485
|
+
* - Bit 4 (0x10): Always set (distinguishes subgroup from other header types)
|
|
486
|
+
* - Bit 5 (0x20): DEFAULT_PRIORITY - Publisher priority field omitted, inherited from subscription
|
|
487
|
+
*
|
|
488
|
+
* Valid ranges: 0x10-0x15, 0x18-0x1D (bit 5=0), 0x30-0x35, 0x38-0x3D (bit 5=1)
|
|
489
|
+
* Invalid: 0x16, 0x17, 0x1E, 0x1F, 0x36, 0x37, 0x3E, 0x3F (SUBGROUP_ID_MODE=0b11)
|
|
500
490
|
*/
|
|
501
491
|
declare enum SubgroupHeaderType {
|
|
502
492
|
Type0x10 = 16,
|
|
@@ -510,34 +500,50 @@ declare enum SubgroupHeaderType {
|
|
|
510
500
|
Type0x1A = 26,
|
|
511
501
|
Type0x1B = 27,
|
|
512
502
|
Type0x1C = 28,
|
|
513
|
-
Type0x1D = 29
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
503
|
+
Type0x1D = 29,
|
|
504
|
+
Type0x30 = 48,
|
|
505
|
+
Type0x31 = 49,
|
|
506
|
+
Type0x32 = 50,
|
|
507
|
+
Type0x33 = 51,
|
|
508
|
+
Type0x34 = 52,
|
|
509
|
+
Type0x35 = 53,
|
|
510
|
+
Type0x38 = 56,
|
|
511
|
+
Type0x39 = 57,
|
|
512
|
+
Type0x3A = 58,
|
|
513
|
+
Type0x3B = 59,
|
|
514
|
+
Type0x3C = 60,
|
|
515
|
+
Type0x3D = 61
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Namespace for SubgroupHeaderType utilities and bit constants.
|
|
517
519
|
*/
|
|
518
520
|
declare namespace SubgroupHeaderType {
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
/** Extensions present in all objects (bit 0) */
|
|
522
|
+
const EXTENSIONS = 1;
|
|
523
|
+
/** Mask for SUBGROUP_ID_MODE (bits 1-2) */
|
|
524
|
+
const SUBGROUP_ID_MODE_MASK = 6;
|
|
525
|
+
/** This subgroup contains the final object in the group (bit 3) */
|
|
526
|
+
const END_OF_GROUP = 8;
|
|
527
|
+
/** Required bit that must always be set (bit 4) */
|
|
528
|
+
const REQUIRED_BIT = 16;
|
|
529
|
+
/** Publisher priority field omitted, inherited from subscription (bit 5) */
|
|
530
|
+
const DEFAULT_PRIORITY = 32;
|
|
531
|
+
function hasExtensions(t: SubgroupHeaderType): boolean;
|
|
523
532
|
function hasExplicitSubgroupId(t: SubgroupHeaderType): boolean;
|
|
524
|
-
/**
|
|
525
|
-
* Returns true if the header type implies a subgroup ID of zero.
|
|
526
|
-
* @param t - The SubgroupHeaderType.
|
|
527
|
-
*/
|
|
528
533
|
function isSubgroupIdZero(t: SubgroupHeaderType): boolean;
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
*/
|
|
533
|
-
function hasExtensions(t: SubgroupHeaderType): boolean;
|
|
534
|
+
function isSubgroupIdFirstObjectId(t: SubgroupHeaderType): boolean;
|
|
535
|
+
function containsEndOfGroup(t: SubgroupHeaderType): boolean;
|
|
536
|
+
function hasDefaultPriority(t: SubgroupHeaderType): boolean;
|
|
534
537
|
/**
|
|
535
538
|
* Converts a number or bigint to SubgroupHeaderType.
|
|
536
|
-
*
|
|
537
|
-
* @returns The corresponding SubgroupHeaderType.
|
|
538
|
-
* @throws Error if the value is not valid.
|
|
539
|
+
* Validates bit 4 must be set, SUBGROUP_ID_MODE must not be 0b11.
|
|
539
540
|
*/
|
|
540
541
|
function tryFrom(value: number | bigint): SubgroupHeaderType;
|
|
542
|
+
/**
|
|
543
|
+
* Determines the appropriate type for given properties.
|
|
544
|
+
* @param subgroupIdMode - SUBGROUP_ID_MODE (0=zero, 1=firstObjId, 2=explicit).
|
|
545
|
+
*/
|
|
546
|
+
function fromProperties(hasExtensions: boolean, subgroupIdMode: 0 | 1 | 2, containsEndOfGroup: boolean, hasDefaultPriority?: boolean): SubgroupHeaderType;
|
|
541
547
|
}
|
|
542
548
|
/**
|
|
543
549
|
* @public
|
|
@@ -567,13 +573,11 @@ declare namespace ObjectForwardingPreference {
|
|
|
567
573
|
* @public
|
|
568
574
|
* Object status codes for MOQT objects.
|
|
569
575
|
* - `Normal`: Object exists and is available.
|
|
570
|
-
* - `DoesNotExist`: Object does not exist.
|
|
571
576
|
* - `EndOfGroup`: End of group marker.
|
|
572
577
|
* - `EndOfTrack`: End of track marker.
|
|
573
578
|
*/
|
|
574
579
|
declare enum ObjectStatus {
|
|
575
580
|
Normal = 0,
|
|
576
|
-
DoesNotExist = 1,
|
|
577
581
|
EndOfGroup = 3,
|
|
578
582
|
EndOfTrack = 4
|
|
579
583
|
}
|
|
@@ -591,7 +595,7 @@ declare namespace ObjectStatus {
|
|
|
591
595
|
}
|
|
592
596
|
|
|
593
597
|
/**
|
|
594
|
-
* Copyright
|
|
598
|
+
* Copyright 2026 The MOQtail Authors
|
|
595
599
|
*
|
|
596
600
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
597
601
|
* you may not use this file except in compliance with the License.
|
|
@@ -607,18 +611,21 @@ declare namespace ObjectStatus {
|
|
|
607
611
|
*/
|
|
608
612
|
|
|
609
613
|
/**
|
|
610
|
-
* Represents
|
|
614
|
+
* Represents a unified OBJECT_DATAGRAM message (Draft-16).
|
|
611
615
|
*
|
|
612
|
-
* Type
|
|
613
|
-
* - Bit 0:
|
|
614
|
-
* - Bit 1:
|
|
615
|
-
* - Bit 2
|
|
616
|
+
* Type bit layout (form 0b00X0XXXX):
|
|
617
|
+
* - Bit 0 (0x01): EXTENSIONS
|
|
618
|
+
* - Bit 1 (0x02): END_OF_GROUP
|
|
619
|
+
* - Bit 2 (0x04): ZERO_OBJECT_ID
|
|
620
|
+
* - Bit 3 (0x08): DEFAULT_PRIORITY
|
|
621
|
+
* - Bit 5 (0x20): STATUS
|
|
616
622
|
*/
|
|
617
|
-
declare class
|
|
623
|
+
declare class Datagram {
|
|
618
624
|
readonly type: ObjectDatagramType;
|
|
619
|
-
readonly publisherPriority: number;
|
|
625
|
+
readonly publisherPriority: number | null;
|
|
620
626
|
readonly extensionHeaders: KeyValuePair[] | null;
|
|
621
|
-
readonly payload: Uint8Array;
|
|
627
|
+
readonly payload: Uint8Array | null;
|
|
628
|
+
readonly objectStatus: ObjectStatus | null;
|
|
622
629
|
readonly endOfGroup: boolean;
|
|
623
630
|
readonly trackAlias: bigint;
|
|
624
631
|
readonly location: Location;
|
|
@@ -626,77 +633,17 @@ declare class DatagramObject {
|
|
|
626
633
|
get groupId(): bigint;
|
|
627
634
|
get objectId(): bigint;
|
|
628
635
|
/**
|
|
629
|
-
* Create a new
|
|
630
|
-
* The type is automatically determined based on
|
|
631
|
-
*/
|
|
632
|
-
static new(trackAlias: bigint, groupId: bigint, objectId: bigint, publisherPriority: number, extensionHeaders: KeyValuePair[] | null, payload: Uint8Array, endOfGroup?: boolean): DatagramObject;
|
|
633
|
-
/**
|
|
634
|
-
* Create a DatagramObject with extensions.
|
|
635
|
-
* @deprecated Use DatagramObject.new() instead for Draft-14 compliance.
|
|
636
|
-
*/
|
|
637
|
-
static newWithExtensions(trackAlias: bigint, groupId: bigint, objectId: bigint, publisherPriority: number, extensionHeaders: KeyValuePair[], payload: Uint8Array, endOfGroup?: boolean): DatagramObject;
|
|
638
|
-
/**
|
|
639
|
-
* Create a DatagramObject without extensions.
|
|
640
|
-
* @deprecated Use DatagramObject.new() instead for Draft-14 compliance.
|
|
641
|
-
*/
|
|
642
|
-
static newWithoutExtensions(trackAlias: bigint, groupId: bigint, objectId: bigint, publisherPriority: number, payload: Uint8Array, endOfGroup?: boolean): DatagramObject;
|
|
643
|
-
serialize(): FrozenByteBuffer;
|
|
644
|
-
static deserialize(buf: BaseByteBuffer): DatagramObject;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* Copyright 2025 The MOQtail Authors
|
|
649
|
-
*
|
|
650
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
651
|
-
* you may not use this file except in compliance with the License.
|
|
652
|
-
* You may obtain a copy of the License at
|
|
653
|
-
*
|
|
654
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
655
|
-
*
|
|
656
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
657
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
658
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
659
|
-
* See the License for the specific language governing permissions and
|
|
660
|
-
* limitations under the License.
|
|
661
|
-
*/
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Represents an OBJECT_DATAGRAM with status (Draft-14).
|
|
665
|
-
*
|
|
666
|
-
* Type values 0x20-0x21 indicate status datagrams:
|
|
667
|
-
* - 0x20: Without extensions, Object ID present
|
|
668
|
-
* - 0x21: With extensions, Object ID present
|
|
669
|
-
*
|
|
670
|
-
* Status datagrams always have Object ID present (unlike payload datagrams
|
|
671
|
-
* which can omit Object ID when it's 0).
|
|
672
|
-
*/
|
|
673
|
-
declare class DatagramStatus {
|
|
674
|
-
readonly type: ObjectDatagramStatusType;
|
|
675
|
-
readonly publisherPriority: number;
|
|
676
|
-
readonly extensionHeaders: KeyValuePair[] | null;
|
|
677
|
-
readonly objectStatus: ObjectStatus;
|
|
678
|
-
readonly trackAlias: bigint;
|
|
679
|
-
readonly location: Location;
|
|
680
|
-
private constructor();
|
|
681
|
-
get groupId(): bigint;
|
|
682
|
-
get objectId(): bigint;
|
|
683
|
-
/**
|
|
684
|
-
* Create a new DatagramStatus with all properties specified.
|
|
685
|
-
* The type is automatically determined based on whether extensions are present.
|
|
686
|
-
*/
|
|
687
|
-
static new(trackAlias: bigint | number, location: Location, publisherPriority: number, extensionHeaders: KeyValuePair[] | null, objectStatus: ObjectStatus): DatagramStatus;
|
|
688
|
-
/**
|
|
689
|
-
* Create a DatagramStatus with extensions.
|
|
690
|
-
* @deprecated Use DatagramStatus.new() instead for Draft-14 compliance.
|
|
636
|
+
* Create a new Datagram with payload content.
|
|
637
|
+
* The type is automatically determined based on the properties.
|
|
691
638
|
*/
|
|
692
|
-
static
|
|
639
|
+
static newPayload(trackAlias: bigint, groupId: bigint, objectId: bigint, publisherPriority: number | null, extensionHeaders: KeyValuePair[] | null, payload: Uint8Array, endOfGroup?: boolean): Datagram;
|
|
693
640
|
/**
|
|
694
|
-
* Create a
|
|
695
|
-
*
|
|
641
|
+
* Create a new Datagram with Object Status (no payload).
|
|
642
|
+
* endOfGroup is always false since STATUS + END_OF_GROUP is invalid.
|
|
696
643
|
*/
|
|
697
|
-
static
|
|
644
|
+
static newStatus(trackAlias: bigint, groupId: bigint, objectId: bigint, publisherPriority: number | null, extensionHeaders: KeyValuePair[] | null, objectStatus: ObjectStatus): Datagram;
|
|
698
645
|
serialize(): FrozenByteBuffer;
|
|
699
|
-
static deserialize(buf: BaseByteBuffer):
|
|
646
|
+
static deserialize(buf: BaseByteBuffer): Datagram;
|
|
700
647
|
}
|
|
701
648
|
|
|
702
649
|
/**
|
|
@@ -739,20 +686,49 @@ declare class FetchHeader {
|
|
|
739
686
|
* limitations under the License.
|
|
740
687
|
*/
|
|
741
688
|
|
|
689
|
+
/**
|
|
690
|
+
* Prior-object state threaded across successive Fetch Objects on the same stream.
|
|
691
|
+
*/
|
|
692
|
+
type FetchObjectContext = {
|
|
693
|
+
groupId: bigint;
|
|
694
|
+
subgroupId: bigint;
|
|
695
|
+
objectId: bigint;
|
|
696
|
+
publisherPriority: number;
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* Kind discriminator for End-of-Range markers (§10.4.4.2).
|
|
700
|
+
*/
|
|
701
|
+
declare enum EndOfRangeKind {
|
|
702
|
+
NonExistent = 140,
|
|
703
|
+
Unknown = 268
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Payload-bearing fetch object (§10.4.4, non-End-of-Range form).
|
|
707
|
+
*
|
|
708
|
+
* Draft-16 FETCH objects carry no Object Status field; a zero-length payload
|
|
709
|
+
* signals a zero-length Normal object.
|
|
710
|
+
*/
|
|
742
711
|
declare class FetchObject {
|
|
712
|
+
readonly kind: 'object' | 'end_of_range';
|
|
743
713
|
readonly publisherPriority: number;
|
|
714
|
+
readonly forwardingPreference: ObjectForwardingPreference;
|
|
744
715
|
readonly extensionHeaders: KeyValuePair[] | null;
|
|
745
|
-
readonly objectStatus: ObjectStatus | null;
|
|
746
716
|
readonly payload: Uint8Array | null;
|
|
717
|
+
readonly endOfRange: EndOfRangeKind | null;
|
|
747
718
|
readonly location: Location;
|
|
748
719
|
readonly subgroupId: bigint;
|
|
749
720
|
private constructor();
|
|
750
721
|
get groupId(): bigint;
|
|
751
722
|
get objectId(): bigint;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
723
|
+
/**
|
|
724
|
+
* Context to thread into the next call on this stream.
|
|
725
|
+
* Returns null for EndOfRange markers — they MUST NOT update prior state.
|
|
726
|
+
*/
|
|
727
|
+
toContext(): FetchObjectContext | null;
|
|
728
|
+
static newObject(groupId: bigint | number, subgroupId: bigint | number, objectId: bigint | number, publisherPriority: number, forwardingPreference: ObjectForwardingPreference, extensionHeaders: KeyValuePair[] | null, payload: Uint8Array): FetchObject;
|
|
729
|
+
static newEndOfRange(kind: EndOfRangeKind, groupId: bigint | number, objectId: bigint | number): FetchObject;
|
|
730
|
+
serialize(prev?: FetchObjectContext): FrozenByteBuffer;
|
|
731
|
+
static deserialize(buf: BaseByteBuffer, prev?: FetchObjectContext): FetchObject;
|
|
756
732
|
}
|
|
757
733
|
|
|
758
734
|
/**
|
|
@@ -891,33 +867,38 @@ declare class MoqtObject {
|
|
|
891
867
|
private constructor();
|
|
892
868
|
get groupId(): bigint;
|
|
893
869
|
get objectId(): bigint;
|
|
894
|
-
getSubgroupHeaderType(containsEnd: boolean): SubgroupHeaderType;
|
|
870
|
+
getSubgroupHeaderType(containsEnd: boolean, useDefaultPriority?: boolean): SubgroupHeaderType;
|
|
895
871
|
isDatagram(): boolean;
|
|
896
872
|
isSubgroup(): boolean;
|
|
897
873
|
isEndOfGroup(): boolean;
|
|
898
874
|
isEndOfTrack(): boolean;
|
|
899
|
-
doesNotExist(): boolean;
|
|
900
875
|
hasPayload(): boolean;
|
|
901
876
|
hasStatus(): boolean;
|
|
902
877
|
static newWithPayload(fullTrackName: FullTrackName, location: Location, publisherPriority: number, objectForwardingPreference: ObjectForwardingPreference, subgroupId: bigint | number | null, extensionHeaders: KeyValuePair[] | null, payload: Uint8Array): MoqtObject;
|
|
903
878
|
static newWithStatus(fullTrackName: FullTrackName, location: Location, publisherPriority: number, objectForwardingPreference: ObjectForwardingPreference, subgroupId: bigint | number | null, extensionHeaders: KeyValuePair[] | null, objectStatus: ObjectStatus): MoqtObject;
|
|
904
|
-
static fromDatagramObject(datagramObject: DatagramObject, fullTrackName: FullTrackName): MoqtObject;
|
|
905
879
|
/**
|
|
906
|
-
*
|
|
880
|
+
* Create a MoqtObject from a Datagram (Draft-16).
|
|
881
|
+
* @param datagram - The received Datagram.
|
|
882
|
+
* @param fullTrackName - The resolved full track name.
|
|
883
|
+
* @param defaultPriority - The default publisher priority from the control message (used when DEFAULT_PRIORITY bit is set).
|
|
884
|
+
*/
|
|
885
|
+
static fromDatagram(datagram: Datagram, fullTrackName: FullTrackName, defaultPriority?: number): MoqtObject;
|
|
886
|
+
/**
|
|
887
|
+
* Returns the endOfGroup flag from the source Datagram.
|
|
907
888
|
* This is separate from ObjectStatus.EndOfGroup - the flag indicates
|
|
908
889
|
* this is the last object in the group even with Normal status.
|
|
909
890
|
*/
|
|
910
|
-
static isDatagramEndOfGroup(
|
|
911
|
-
static fromDatagramStatus(datagramStatus: DatagramStatus, fullTrackName: FullTrackName): MoqtObject;
|
|
891
|
+
static isDatagramEndOfGroup(datagram: Datagram): boolean;
|
|
912
892
|
static fromFetchObject(fetchObject: FetchObject, fullTrackName: FullTrackName): MoqtObject;
|
|
913
|
-
static fromSubgroupObject(subgroupObject: SubgroupObject, groupId: bigint | number, publisherPriority: number, subgroupId: bigint | number, fullTrackName: FullTrackName): MoqtObject;
|
|
893
|
+
static fromSubgroupObject(subgroupObject: SubgroupObject, groupId: bigint | number, publisherPriority: number | undefined, subgroupId: bigint | number | null, fullTrackName: FullTrackName): MoqtObject;
|
|
914
894
|
/**
|
|
915
|
-
* Convert to
|
|
916
|
-
*
|
|
917
|
-
* @param
|
|
895
|
+
* Convert to Datagram for wire transmission (Draft-16).
|
|
896
|
+
* Automatically creates a payload or status Datagram based on the object's state.
|
|
897
|
+
* @param trackAlias - The track alias to use.
|
|
898
|
+
* @param endOfGroup - Whether this is the last object in the group (only for payload datagrams).
|
|
899
|
+
* @param defaultPriority - If provided and matches this object's priority, the DEFAULT_PRIORITY bit is set.
|
|
918
900
|
*/
|
|
919
|
-
|
|
920
|
-
tryIntoDatagramStatus(trackAlias: bigint | number): DatagramStatus;
|
|
901
|
+
tryIntoDatagram(trackAlias: bigint | number, endOfGroup?: boolean, defaultPriority?: number): Datagram;
|
|
921
902
|
tryIntoFetchObject(): FetchObject;
|
|
922
903
|
tryIntoSubgroupObject(): SubgroupObject;
|
|
923
904
|
}
|
|
@@ -940,11 +921,11 @@ declare class MoqtObject {
|
|
|
940
921
|
|
|
941
922
|
declare class SubgroupHeader {
|
|
942
923
|
readonly type: SubgroupHeaderType;
|
|
943
|
-
readonly publisherPriority: number;
|
|
924
|
+
readonly publisherPriority: number | undefined;
|
|
944
925
|
readonly subgroupId: bigint | undefined;
|
|
945
926
|
readonly trackAlias: bigint;
|
|
946
927
|
readonly groupId: bigint;
|
|
947
|
-
constructor(type: SubgroupHeaderType, trackAlias: bigint | number, groupId: bigint | number, subgroupId: bigint | number | undefined, publisherPriority: number);
|
|
928
|
+
constructor(type: SubgroupHeaderType, trackAlias: bigint | number, groupId: bigint | number, subgroupId: bigint | number | undefined, publisherPriority: number | undefined);
|
|
948
929
|
serialize(): FrozenByteBuffer;
|
|
949
930
|
static deserialize(buf: BaseByteBuffer): SubgroupHeader;
|
|
950
931
|
}
|
|
@@ -1163,9 +1144,9 @@ declare class FrozenByteBuffer extends BaseByteBuffer {
|
|
|
1163
1144
|
* limitations under the License.
|
|
1164
1145
|
*/
|
|
1165
1146
|
/**
|
|
1166
|
-
*
|
|
1147
|
+
* Protocol string array exchanged in wt-available-protocols header
|
|
1167
1148
|
*/
|
|
1168
|
-
declare const
|
|
1149
|
+
declare const SUPPORTED_VERSIONS: string[];
|
|
1169
1150
|
/**
|
|
1170
1151
|
* @public
|
|
1171
1152
|
* Control message types for MOQT protocol.
|
|
@@ -1182,29 +1163,24 @@ declare enum ControlMessageType {
|
|
|
1182
1163
|
RequestsBlocked = 26,
|
|
1183
1164
|
Subscribe = 3,
|
|
1184
1165
|
SubscribeOk = 4,
|
|
1185
|
-
|
|
1166
|
+
RequestError = 5,
|
|
1186
1167
|
Unsubscribe = 10,
|
|
1187
|
-
|
|
1168
|
+
RequestUpdate = 2,
|
|
1188
1169
|
PublishDone = 11,
|
|
1189
1170
|
Fetch = 22,
|
|
1190
1171
|
FetchOk = 24,
|
|
1191
|
-
FetchError = 25,
|
|
1192
1172
|
FetchCancel = 23,
|
|
1193
1173
|
TrackStatus = 13,
|
|
1194
|
-
TrackStatusOk = 14,
|
|
1195
|
-
TrackStatusError = 15,
|
|
1196
1174
|
PublishNamespace = 6,
|
|
1197
|
-
|
|
1198
|
-
|
|
1175
|
+
RequestOk = 7,
|
|
1176
|
+
Namespace = 8,
|
|
1199
1177
|
PublishNamespaceDone = 9,
|
|
1178
|
+
NamespaceDone = 14,
|
|
1200
1179
|
PublishNamespaceCancel = 12,
|
|
1201
1180
|
SubscribeNamespace = 17,
|
|
1202
|
-
SubscribeNamespaceOk = 18,
|
|
1203
|
-
SubscribeNamespaceError = 19,
|
|
1204
1181
|
UnsubscribeNamespace = 20,
|
|
1205
1182
|
Publish = 29,
|
|
1206
1183
|
PublishOk = 30,
|
|
1207
|
-
PublishError = 31,
|
|
1208
1184
|
Switch = 34
|
|
1209
1185
|
}
|
|
1210
1186
|
/**
|
|
@@ -1218,23 +1194,15 @@ declare function controlMessageTypeFromBigInt(v: bigint): ControlMessageType;
|
|
|
1218
1194
|
* @public
|
|
1219
1195
|
* Error codes for PublishNamespace control messages.
|
|
1220
1196
|
*/
|
|
1221
|
-
declare enum PublishNamespaceErrorCode {
|
|
1222
|
-
InternalError = 0,
|
|
1223
|
-
Unauthorized = 1,
|
|
1224
|
-
Timeout = 2,
|
|
1225
|
-
NotSupported = 3,
|
|
1226
|
-
Uninterested = 4,
|
|
1227
|
-
MalformedAuthToken = 16,
|
|
1228
|
-
UnknownAuthTokenAlias = 17,
|
|
1229
|
-
ExpiredAuthToken = 18
|
|
1230
|
-
}
|
|
1231
1197
|
/**
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
* @returns The corresponding PublishNamespaceErrorCode.
|
|
1235
|
-
* @throws Error if the value is not a valid announce error code.
|
|
1198
|
+
* @public
|
|
1199
|
+
* Subscribe options for SUBSCRIBE_NAMESPACE requests.
|
|
1236
1200
|
*/
|
|
1237
|
-
declare
|
|
1201
|
+
declare enum NamespaceSubscribeOptions {
|
|
1202
|
+
PublishOnly = 0,
|
|
1203
|
+
NamespaceOnly = 1,
|
|
1204
|
+
Both = 2
|
|
1205
|
+
}
|
|
1238
1206
|
/**
|
|
1239
1207
|
* @public
|
|
1240
1208
|
* Filter types for subscription requests.
|
|
@@ -1257,7 +1225,7 @@ declare function filterTypeFromBigInt(v: bigint): FilterType;
|
|
|
1257
1225
|
* Fetch request types for MOQT protocol.
|
|
1258
1226
|
*/
|
|
1259
1227
|
declare enum FetchType {
|
|
1260
|
-
|
|
1228
|
+
Standalone = 1,
|
|
1261
1229
|
Relative = 2,
|
|
1262
1230
|
Absolute = 3
|
|
1263
1231
|
}
|
|
@@ -1284,52 +1252,6 @@ declare enum GroupOrder {
|
|
|
1284
1252
|
* @throws CastingError if the value is not a valid group order.
|
|
1285
1253
|
*/
|
|
1286
1254
|
declare function groupOrderFromNumber(v: number): GroupOrder;
|
|
1287
|
-
/**
|
|
1288
|
-
* @public
|
|
1289
|
-
* Error codes for Subscribe control messages.
|
|
1290
|
-
*/
|
|
1291
|
-
declare enum SubscribeErrorCode {
|
|
1292
|
-
InternalError = 0,
|
|
1293
|
-
Unauthorized = 1,
|
|
1294
|
-
Timeout = 2,
|
|
1295
|
-
NotSupported = 3,
|
|
1296
|
-
TrackDoesNotExist = 4,
|
|
1297
|
-
InvalidRange = 5,
|
|
1298
|
-
MalformedAuthToken = 16,
|
|
1299
|
-
ExpiredAuthToken = 18
|
|
1300
|
-
}
|
|
1301
|
-
/**
|
|
1302
|
-
* Converts a bigint value to a SubscribeErrorCode enum.
|
|
1303
|
-
* @param v - The bigint value.
|
|
1304
|
-
* @returns The corresponding SubscribeErrorCode.
|
|
1305
|
-
* @throws Error if the value is not a valid subscribe error code.
|
|
1306
|
-
*/
|
|
1307
|
-
declare function subscribeErrorCodeFromBigInt(v: bigint): SubscribeErrorCode;
|
|
1308
|
-
/**
|
|
1309
|
-
* @public
|
|
1310
|
-
* Error codes for Fetch control messages.
|
|
1311
|
-
*/
|
|
1312
|
-
declare enum FetchErrorCode {
|
|
1313
|
-
InternalError = 0,
|
|
1314
|
-
Unauthorized = 1,
|
|
1315
|
-
Timeout = 2,
|
|
1316
|
-
NotSupported = 3,
|
|
1317
|
-
TrackDoesNotExist = 4,
|
|
1318
|
-
InvalidRange = 5,
|
|
1319
|
-
NoObjects = 6,
|
|
1320
|
-
InvalidJoiningRequestId = 7,
|
|
1321
|
-
UnknownStatusInRange = 8,
|
|
1322
|
-
MalformedTrack = 9,
|
|
1323
|
-
MalformedAuthToken = 16,
|
|
1324
|
-
ExpiredAuthToken = 18
|
|
1325
|
-
}
|
|
1326
|
-
/**
|
|
1327
|
-
* Converts a bigint value to a FetchErrorCode enum.
|
|
1328
|
-
* @param v - The bigint value.
|
|
1329
|
-
* @returns The corresponding FetchErrorCode.
|
|
1330
|
-
* @throws CastingError if the value is not a valid fetch error code.
|
|
1331
|
-
*/
|
|
1332
|
-
declare function fetchErrorCodeFromBigInt(v: bigint): FetchErrorCode;
|
|
1333
1255
|
/**
|
|
1334
1256
|
* @public
|
|
1335
1257
|
* Status codes for track status responses.
|
|
@@ -1348,27 +1270,6 @@ declare enum TrackStatusCode {
|
|
|
1348
1270
|
* @throws Error if the value is not a valid track status code.
|
|
1349
1271
|
*/
|
|
1350
1272
|
declare function trackStatusCodeFromBigInt(v: bigint): TrackStatusCode;
|
|
1351
|
-
/**
|
|
1352
|
-
* @public
|
|
1353
|
-
* Error codes for SubscribeNamespace control messages.
|
|
1354
|
-
*/
|
|
1355
|
-
declare enum SubscribeNamespaceErrorCode {
|
|
1356
|
-
InternalError = 0,
|
|
1357
|
-
Unauthorized = 1,
|
|
1358
|
-
Timeout = 2,
|
|
1359
|
-
NotSupported = 3,
|
|
1360
|
-
NamespacePrefixUnknown = 4,
|
|
1361
|
-
NamespacePrefixOverlap = 5,
|
|
1362
|
-
MalformedAuthToken = 16,
|
|
1363
|
-
ExpiredAuthToken = 18
|
|
1364
|
-
}
|
|
1365
|
-
/**
|
|
1366
|
-
* Converts a bigint value to a SubscribeNamespaceErrorCode enum.
|
|
1367
|
-
* @param v - The bigint value.
|
|
1368
|
-
* @returns The corresponding SubscribeNamespaceErrorCode.
|
|
1369
|
-
* @throws Error if the value is not a valid subscribe announces error code.
|
|
1370
|
-
*/
|
|
1371
|
-
declare function subscribeNamespaceErrorCodeFromBigInt(v: bigint): SubscribeNamespaceErrorCode;
|
|
1372
1273
|
/**
|
|
1373
1274
|
* @public
|
|
1374
1275
|
* Status codes for PublishDone control messages.
|
|
@@ -1380,7 +1281,9 @@ declare enum PublishDoneStatusCode {
|
|
|
1380
1281
|
SubscriptionEnded = 3,
|
|
1381
1282
|
GoingAway = 4,
|
|
1382
1283
|
Expired = 5,
|
|
1383
|
-
TooFarBehind = 6
|
|
1284
|
+
TooFarBehind = 6,
|
|
1285
|
+
UpdateFailed = 8,
|
|
1286
|
+
MalformedTrack = 18
|
|
1384
1287
|
}
|
|
1385
1288
|
/**
|
|
1386
1289
|
* Converts a bigint value to a PublishDoneStatusCode enum.
|
|
@@ -1391,29 +1294,33 @@ declare enum PublishDoneStatusCode {
|
|
|
1391
1294
|
declare function publishDoneStatusCodeFromBigInt(v: bigint): PublishDoneStatusCode;
|
|
1392
1295
|
/**
|
|
1393
1296
|
* @public
|
|
1394
|
-
*
|
|
1297
|
+
* Unified error codes for REQUEST_ERROR control messages.
|
|
1395
1298
|
*/
|
|
1396
|
-
declare enum
|
|
1299
|
+
declare enum RequestErrorCode {
|
|
1397
1300
|
InternalError = 0,
|
|
1398
1301
|
Unauthorized = 1,
|
|
1399
1302
|
Timeout = 2,
|
|
1400
1303
|
NotSupported = 3,
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1304
|
+
MalformedAuthToken = 4,
|
|
1305
|
+
ExpiredAuthToken = 5,
|
|
1306
|
+
DoesNotExist = 16,
|
|
1307
|
+
InvalidRange = 17,
|
|
1308
|
+
MalformedTrack = 18,
|
|
1309
|
+
DuplicateSubscription = 25,
|
|
1310
|
+
Uninterested = 32,
|
|
1311
|
+
PrefixOverlap = 48,
|
|
1312
|
+
InvalidJoiningRequestId = 50
|
|
1313
|
+
}
|
|
1314
|
+
/**
|
|
1315
|
+
* Converts a bigint value to a RequestErrorCode enum.
|
|
1409
1316
|
* @param v - The bigint value.
|
|
1410
|
-
* @returns The corresponding
|
|
1411
|
-
* @throws
|
|
1317
|
+
* @returns The corresponding RequestErrorCode.
|
|
1318
|
+
* @throws CastingError if the value is not a valid request error code.
|
|
1412
1319
|
*/
|
|
1413
|
-
declare function
|
|
1320
|
+
declare function requestErrorCodeFromBigInt(v: bigint): RequestErrorCode;
|
|
1414
1321
|
|
|
1415
1322
|
/**
|
|
1416
|
-
* Copyright
|
|
1323
|
+
* Copyright 2026 The MOQtail Authors
|
|
1417
1324
|
*
|
|
1418
1325
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1419
1326
|
* you may not use this file except in compliance with the License.
|
|
@@ -1427,50 +1334,32 @@ declare function publishErrorCodeFromBigInt(v: bigint): PublishErrorCode;
|
|
|
1427
1334
|
* See the License for the specific language governing permissions and
|
|
1428
1335
|
* limitations under the License.
|
|
1429
1336
|
*/
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
declare
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
*/
|
|
1455
|
-
getType(): ControlMessageType;
|
|
1456
|
-
/**
|
|
1457
|
-
* @public
|
|
1458
|
-
* Serializes the PublishNamespace message into a {@link FrozenByteBuffer}.
|
|
1459
|
-
*
|
|
1460
|
-
* @returns The serialized buffer.
|
|
1461
|
-
* @throws :{@link LengthExceedsMaxError} If the payload exceeds 65535 bytes.
|
|
1462
|
-
*/
|
|
1463
|
-
serialize(): FrozenByteBuffer;
|
|
1464
|
-
/**
|
|
1465
|
-
* @public
|
|
1466
|
-
* Parses a PublishNamespace message from the given buffer.
|
|
1467
|
-
*
|
|
1468
|
-
* @param buf - The buffer to parse from.
|
|
1469
|
-
* @returns The parsed PublishNamespace message.
|
|
1470
|
-
* @throws :{@link NotEnoughBytesError} If the buffer does not contain enough bytes.
|
|
1471
|
-
*/
|
|
1472
|
-
static parsePayload(buf: BaseByteBuffer): PublishNamespace;
|
|
1337
|
+
declare enum SetupParameterType {
|
|
1338
|
+
Path = 1,
|
|
1339
|
+
MaxRequestId = 2,
|
|
1340
|
+
AuthorizationToken = 3,
|
|
1341
|
+
MaxAuthTokenCacheSize = 4
|
|
1342
|
+
}
|
|
1343
|
+
declare function setupParameterTypeFromNumber(value: number): SetupParameterType;
|
|
1344
|
+
declare enum MessageParameterType {
|
|
1345
|
+
DeliveryTimeout = 2,
|
|
1346
|
+
AuthorizationToken = 3,
|
|
1347
|
+
Expires = 8,
|
|
1348
|
+
LargestObject = 9,
|
|
1349
|
+
Forward = 16,
|
|
1350
|
+
SubscriberPriority = 32,
|
|
1351
|
+
SubscriptionFilter = 33,
|
|
1352
|
+
GroupOrder = 34,
|
|
1353
|
+
NewGroupRequest = 50
|
|
1354
|
+
}
|
|
1355
|
+
declare function messageParameterTypeFromNumber(value: bigint | number): MessageParameterType;
|
|
1356
|
+
declare enum TokenAliasType {
|
|
1357
|
+
Delete = 0,
|
|
1358
|
+
Register = 1,
|
|
1359
|
+
UseAlias = 2,
|
|
1360
|
+
UseValue = 3
|
|
1473
1361
|
}
|
|
1362
|
+
declare function tokenAliasTypeFromNumber(value: number): TokenAliasType;
|
|
1474
1363
|
|
|
1475
1364
|
/**
|
|
1476
1365
|
* Copyright 2025 The MOQtail Authors
|
|
@@ -1488,27 +1377,12 @@ declare class PublishNamespace {
|
|
|
1488
1377
|
* limitations under the License.
|
|
1489
1378
|
*/
|
|
1490
1379
|
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
fullTrackName: FullTrackName;
|
|
1494
|
-
subscriberPriority: number;
|
|
1495
|
-
groupOrder: GroupOrder;
|
|
1496
|
-
forward: boolean;
|
|
1497
|
-
filterType: FilterType;
|
|
1498
|
-
startLocation: Location | undefined;
|
|
1499
|
-
endGroup: bigint | undefined;
|
|
1500
|
-
parameters: KeyValuePair[];
|
|
1501
|
-
private constructor();
|
|
1502
|
-
static newNextGroupStart(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, parameters: KeyValuePair[]): Subscribe;
|
|
1503
|
-
static newLatestObject(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, parameters: KeyValuePair[]): Subscribe;
|
|
1504
|
-
static newAbsoluteStart(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, parameters: KeyValuePair[]): Subscribe;
|
|
1505
|
-
static newAbsoluteRange(requestId: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, parameters: KeyValuePair[]): Subscribe;
|
|
1506
|
-
serialize(): FrozenByteBuffer;
|
|
1507
|
-
static parsePayload(buf: BaseByteBuffer): Subscribe;
|
|
1380
|
+
interface Parameter {
|
|
1381
|
+
toKeyValuePair(): KeyValuePair;
|
|
1508
1382
|
}
|
|
1509
1383
|
|
|
1510
1384
|
/**
|
|
1511
|
-
* Copyright
|
|
1385
|
+
* Copyright 2026 The MOQtail Authors
|
|
1512
1386
|
*
|
|
1513
1387
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1514
1388
|
* you may not use this file except in compliance with the License.
|
|
@@ -1523,18 +1397,36 @@ declare class Subscribe {
|
|
|
1523
1397
|
* limitations under the License.
|
|
1524
1398
|
*/
|
|
1525
1399
|
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1400
|
+
type AuthTokenVariant = {
|
|
1401
|
+
aliasType: TokenAliasType.Delete;
|
|
1402
|
+
tokenAlias: bigint;
|
|
1403
|
+
} | {
|
|
1404
|
+
aliasType: TokenAliasType.Register;
|
|
1405
|
+
tokenAlias: bigint;
|
|
1406
|
+
tokenType: bigint;
|
|
1407
|
+
tokenValue: Uint8Array;
|
|
1408
|
+
} | {
|
|
1409
|
+
aliasType: TokenAliasType.UseAlias;
|
|
1410
|
+
tokenAlias: bigint;
|
|
1411
|
+
} | {
|
|
1412
|
+
aliasType: TokenAliasType.UseValue;
|
|
1413
|
+
tokenType: bigint;
|
|
1414
|
+
tokenValue: Uint8Array;
|
|
1415
|
+
};
|
|
1416
|
+
declare class AuthorizationToken implements Parameter {
|
|
1417
|
+
readonly variant: AuthTokenVariant;
|
|
1418
|
+
static readonly TYPE = MessageParameterType.AuthorizationToken;
|
|
1419
|
+
private constructor();
|
|
1420
|
+
static newDelete(tokenAlias: bigint | number): AuthorizationToken;
|
|
1421
|
+
static newRegister(tokenAlias: bigint | number, tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
1422
|
+
static newUseAlias(tokenAlias: bigint | number): AuthorizationToken;
|
|
1423
|
+
static newUseValue(tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
1424
|
+
toKeyValuePair(): KeyValuePair;
|
|
1425
|
+
static fromKeyValuePair(pair: KeyValuePair): AuthorizationToken | undefined;
|
|
1534
1426
|
}
|
|
1535
1427
|
|
|
1536
1428
|
/**
|
|
1537
|
-
* Copyright
|
|
1429
|
+
* Copyright 2026 The MOQtail Authors
|
|
1538
1430
|
*
|
|
1539
1431
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1540
1432
|
* you may not use this file except in compliance with the License.
|
|
@@ -1549,16 +1441,22 @@ declare class PublishNamespaceError {
|
|
|
1549
1441
|
* limitations under the License.
|
|
1550
1442
|
*/
|
|
1551
1443
|
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1444
|
+
/**
|
|
1445
|
+
* Duration in milliseconds the relay SHOULD continue to attempt forwarding Objects.
|
|
1446
|
+
* Value MUST be greater than 0; a value of 0 is a PROTOCOL_VIOLATION.
|
|
1447
|
+
* This parameter is subscription-specific and SHOULD NOT be forwarded upstream
|
|
1448
|
+
* by a relay serving multiple subscriptions for the same track.
|
|
1449
|
+
*/
|
|
1450
|
+
declare class DeliveryTimeout implements Parameter {
|
|
1451
|
+
readonly timeout: bigint;
|
|
1452
|
+
static readonly TYPE = MessageParameterType.DeliveryTimeout;
|
|
1453
|
+
constructor(timeout: bigint);
|
|
1454
|
+
toKeyValuePair(): KeyValuePair;
|
|
1455
|
+
static fromKeyValuePair(pair: KeyValuePair): DeliveryTimeout | undefined;
|
|
1558
1456
|
}
|
|
1559
1457
|
|
|
1560
1458
|
/**
|
|
1561
|
-
* Copyright
|
|
1459
|
+
* Copyright 2026 The MOQtail Authors
|
|
1562
1460
|
*
|
|
1563
1461
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1564
1462
|
* you may not use this file except in compliance with the License.
|
|
@@ -1573,14 +1471,405 @@ declare class PublishNamespaceOk {
|
|
|
1573
1471
|
* limitations under the License.
|
|
1574
1472
|
*/
|
|
1575
1473
|
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
static
|
|
1474
|
+
/**
|
|
1475
|
+
* Time in milliseconds after which the sender will terminate the subscription.
|
|
1476
|
+
* A value of 0 means the subscription does not expire or expires at an unknown time.
|
|
1477
|
+
* The receiver can extend the subscription by sending a REQUEST_UPDATE.
|
|
1478
|
+
*/
|
|
1479
|
+
declare class Expires implements Parameter {
|
|
1480
|
+
readonly expires: bigint;
|
|
1481
|
+
static readonly TYPE = MessageParameterType.Expires;
|
|
1482
|
+
constructor(expires: bigint);
|
|
1483
|
+
toKeyValuePair(): KeyValuePair;
|
|
1484
|
+
static fromKeyValuePair(pair: KeyValuePair): Expires | undefined;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* Copyright 2026 The MOQtail Authors
|
|
1489
|
+
*
|
|
1490
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1491
|
+
* you may not use this file except in compliance with the License.
|
|
1492
|
+
* You may obtain a copy of the License at
|
|
1493
|
+
*
|
|
1494
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1495
|
+
*
|
|
1496
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1497
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1498
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1499
|
+
* See the License for the specific language governing permissions and
|
|
1500
|
+
* limitations under the License.
|
|
1501
|
+
*/
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
* Forwarding state for affected subscriptions.
|
|
1505
|
+
* Allowed wire values: 0 (don't forward) or 1 (forward).
|
|
1506
|
+
* Any other value is a PROTOCOL_VIOLATION.
|
|
1507
|
+
* Default (when omitted) is 1 (forward).
|
|
1508
|
+
*/
|
|
1509
|
+
declare class Forward implements Parameter {
|
|
1510
|
+
readonly forward: boolean;
|
|
1511
|
+
static readonly TYPE = MessageParameterType.Forward;
|
|
1512
|
+
constructor(forward: boolean);
|
|
1513
|
+
toKeyValuePair(): KeyValuePair;
|
|
1514
|
+
static fromKeyValuePair(pair: KeyValuePair): Forward | undefined;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Copyright 2026 The MOQtail Authors
|
|
1519
|
+
*
|
|
1520
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1521
|
+
* you may not use this file except in compliance with the License.
|
|
1522
|
+
* You may obtain a copy of the License at
|
|
1523
|
+
*
|
|
1524
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1525
|
+
*
|
|
1526
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1527
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1528
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1529
|
+
* See the License for the specific language governing permissions and
|
|
1530
|
+
* limitations under the License.
|
|
1531
|
+
*/
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* How to prioritize Objects from different groups (Ascending=0x1 or Descending=0x2).
|
|
1535
|
+
* Values outside this range are a PROTOCOL_VIOLATION (Original/0x0 is not a valid wire value).
|
|
1536
|
+
* If omitted from SUBSCRIBE, the publisher's track preference is used.
|
|
1537
|
+
* If omitted from FETCH, Ascending (0x1) is used.
|
|
1538
|
+
*/
|
|
1539
|
+
declare class GroupOrderParam implements Parameter {
|
|
1540
|
+
readonly order: GroupOrder.Ascending | GroupOrder.Descending;
|
|
1541
|
+
static readonly TYPE = MessageParameterType.GroupOrder;
|
|
1542
|
+
constructor(order: GroupOrder.Ascending | GroupOrder.Descending);
|
|
1543
|
+
toKeyValuePair(): KeyValuePair;
|
|
1544
|
+
static fromKeyValuePair(pair: KeyValuePair): GroupOrderParam | undefined;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Copyright 2026 The MOQtail Authors
|
|
1549
|
+
*
|
|
1550
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1551
|
+
* you may not use this file except in compliance with the License.
|
|
1552
|
+
* You may obtain a copy of the License at
|
|
1553
|
+
*
|
|
1554
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1555
|
+
*
|
|
1556
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1557
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1558
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1559
|
+
* See the License for the specific language governing permissions and
|
|
1560
|
+
* limitations under the License.
|
|
1561
|
+
*/
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* The largest Location in the Track observed by the sending endpoint.
|
|
1565
|
+
* If omitted from a message, the sending endpoint has not published or
|
|
1566
|
+
* received any Objects in the Track.
|
|
1567
|
+
*/
|
|
1568
|
+
declare class LargestObject implements Parameter {
|
|
1569
|
+
readonly location: Location;
|
|
1570
|
+
static readonly TYPE = MessageParameterType.LargestObject;
|
|
1571
|
+
constructor(location: Location);
|
|
1572
|
+
toKeyValuePair(): KeyValuePair;
|
|
1573
|
+
static fromKeyValuePair(pair: KeyValuePair): LargestObject | undefined;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Copyright 2026 The MOQtail Authors
|
|
1578
|
+
*
|
|
1579
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1580
|
+
* you may not use this file except in compliance with the License.
|
|
1581
|
+
* You may obtain a copy of the License at
|
|
1582
|
+
*
|
|
1583
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1584
|
+
*
|
|
1585
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1586
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1587
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1588
|
+
* See the License for the specific language governing permissions and
|
|
1589
|
+
* limitations under the License.
|
|
1590
|
+
*/
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* The largest Group ID in the Track known by the subscriber, plus 1.
|
|
1594
|
+
* A value of 0 indicates the subscriber has no Group information for the Track.
|
|
1595
|
+
* Only valid for tracks with the DYNAMIC_GROUPS extension (value 1).
|
|
1596
|
+
*/
|
|
1597
|
+
declare class NewGroupRequest implements Parameter {
|
|
1598
|
+
readonly group: bigint;
|
|
1599
|
+
static readonly TYPE = MessageParameterType.NewGroupRequest;
|
|
1600
|
+
constructor(group: bigint);
|
|
1601
|
+
toKeyValuePair(): KeyValuePair;
|
|
1602
|
+
static fromKeyValuePair(pair: KeyValuePair): NewGroupRequest | undefined;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* Copyright 2026 The MOQtail Authors
|
|
1607
|
+
*
|
|
1608
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1609
|
+
* you may not use this file except in compliance with the License.
|
|
1610
|
+
* You may obtain a copy of the License at
|
|
1611
|
+
*
|
|
1612
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1613
|
+
*
|
|
1614
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1615
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1616
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1617
|
+
* See the License for the specific language governing permissions and
|
|
1618
|
+
* limitations under the License.
|
|
1619
|
+
*/
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* Priority of a subscription relative to others in the same session.
|
|
1623
|
+
* Lower numbers have higher priority. Range: 0-255.
|
|
1624
|
+
* Values outside this range are a PROTOCOL_VIOLATION.
|
|
1625
|
+
* Default (when omitted from SUBSCRIBE, PUBLISH_OK, or FETCH) is 128.
|
|
1626
|
+
*/
|
|
1627
|
+
declare class SubscriberPriority implements Parameter {
|
|
1628
|
+
readonly priority: number;
|
|
1629
|
+
static readonly TYPE = MessageParameterType.SubscriberPriority;
|
|
1630
|
+
constructor(priority: number);
|
|
1631
|
+
toKeyValuePair(): KeyValuePair;
|
|
1632
|
+
static fromKeyValuePair(pair: KeyValuePair): SubscriberPriority | undefined;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* Copyright 2026 The MOQtail Authors
|
|
1637
|
+
*
|
|
1638
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1639
|
+
* you may not use this file except in compliance with the License.
|
|
1640
|
+
* You may obtain a copy of the License at
|
|
1641
|
+
*
|
|
1642
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1643
|
+
*
|
|
1644
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1645
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1646
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1647
|
+
* See the License for the specific language governing permissions and
|
|
1648
|
+
* limitations under the License.
|
|
1649
|
+
*/
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Length-prefixed Subscription Filter specifying what objects the subscriber wants.
|
|
1653
|
+
* If omitted from SUBSCRIBE or PUBLISH_OK, the subscription is unfiltered (LatestObject).
|
|
1654
|
+
* If omitted from REQUEST_UPDATE, the value is unchanged.
|
|
1655
|
+
*/
|
|
1656
|
+
declare class SubscriptionFilter implements Parameter {
|
|
1657
|
+
readonly filterType: FilterType;
|
|
1658
|
+
readonly startLocation?: Location | undefined;
|
|
1659
|
+
readonly endGroup?: bigint | undefined;
|
|
1660
|
+
static readonly TYPE = MessageParameterType.SubscriptionFilter;
|
|
1661
|
+
constructor(filterType: FilterType, startLocation?: Location | undefined, endGroup?: bigint | undefined);
|
|
1662
|
+
toKeyValuePair(): KeyValuePair;
|
|
1663
|
+
static fromKeyValuePair(pair: KeyValuePair): SubscriptionFilter | undefined;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Copyright 2026 The MOQtail Authors
|
|
1668
|
+
*
|
|
1669
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1670
|
+
* you may not use this file except in compliance with the License.
|
|
1671
|
+
* You may obtain a copy of the License at
|
|
1672
|
+
*
|
|
1673
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1674
|
+
*
|
|
1675
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1676
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1677
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1678
|
+
* See the License for the specific language governing permissions and
|
|
1679
|
+
* limitations under the License.
|
|
1680
|
+
*/
|
|
1681
|
+
|
|
1682
|
+
type MessageParameter = DeliveryTimeout | AuthorizationToken | Expires | LargestObject | Forward | SubscriberPriority | GroupOrderParam | SubscriptionFilter | NewGroupRequest;
|
|
1683
|
+
declare namespace MessageParameter {
|
|
1684
|
+
/**
|
|
1685
|
+
* Parses a single KeyValuePair into a MessageParameter.
|
|
1686
|
+
* Returns undefined for unrecognized parameter types (be forgiving).
|
|
1687
|
+
* Still throws ProtocolViolationError for known types with invalid values.
|
|
1688
|
+
*/
|
|
1689
|
+
function fromKeyValuePair(pair: KeyValuePair): MessageParameter | undefined;
|
|
1690
|
+
function toKeyValuePair(param: MessageParameter): KeyValuePair;
|
|
1691
|
+
function isDeliveryTimeout(param: MessageParameter): param is DeliveryTimeout;
|
|
1692
|
+
function isAuthorizationToken(param: MessageParameter): param is AuthorizationToken;
|
|
1693
|
+
function isExpires(param: MessageParameter): param is Expires;
|
|
1694
|
+
function isLargestObject(param: MessageParameter): param is LargestObject;
|
|
1695
|
+
function isForward(param: MessageParameter): param is Forward;
|
|
1696
|
+
function isSubscriberPriority(param: MessageParameter): param is SubscriberPriority;
|
|
1697
|
+
function isGroupOrderParam(param: MessageParameter): param is GroupOrderParam;
|
|
1698
|
+
function isSubscriptionFilter(param: MessageParameter): param is SubscriptionFilter;
|
|
1699
|
+
function isNewGroupRequest(param: MessageParameter): param is NewGroupRequest;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Builder for constructing a list of MessageParameters.
|
|
1703
|
+
* Mirrors the SetupParameters builder pattern.
|
|
1704
|
+
*/
|
|
1705
|
+
declare class MessageParameters {
|
|
1706
|
+
private params;
|
|
1707
|
+
add(param: MessageParameter): this;
|
|
1708
|
+
addDeliveryTimeout(timeout: bigint | number): this;
|
|
1709
|
+
addAuthorizationToken(token: AuthorizationToken): this;
|
|
1710
|
+
addExpires(expires: bigint | number): this;
|
|
1711
|
+
addForward(forward: boolean): this;
|
|
1712
|
+
addSubscriberPriority(priority: number): this;
|
|
1713
|
+
addGroupOrder(order: GroupOrderParam['order']): this;
|
|
1714
|
+
addSubscriptionFilter(filter: SubscriptionFilter): this;
|
|
1715
|
+
addNewGroupRequest(group: bigint | number): this;
|
|
1716
|
+
build(): MessageParameter[];
|
|
1717
|
+
/**
|
|
1718
|
+
* Parses an array of KeyValuePairs into a list of MessageParameters.
|
|
1719
|
+
* Unrecognized parameter types are silently skipped.
|
|
1720
|
+
* Known parameter types with invalid values still throw ProtocolViolationError.
|
|
1721
|
+
*/
|
|
1722
|
+
static fromKeyValuePairs(pairs: KeyValuePair[]): MessageParameter[];
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* Applies a set of parameter updates to an existing parameter list.
|
|
1726
|
+
* For each update, replaces the matching parameter (by wire type value) or appends it.
|
|
1727
|
+
* Per spec: "If omitted from REQUEST_UPDATE/SUBSCRIBE_UPDATE, the value is unchanged."
|
|
1728
|
+
*/
|
|
1729
|
+
declare function applyMessageParameterUpdate(current: MessageParameter[], updates: MessageParameter[]): void;
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Copyright 2025 The MOQtail Authors
|
|
1733
|
+
*
|
|
1734
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1735
|
+
* you may not use this file except in compliance with the License.
|
|
1736
|
+
* You may obtain a copy of the License at
|
|
1737
|
+
*
|
|
1738
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1739
|
+
*
|
|
1740
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1741
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1742
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1743
|
+
* See the License for the specific language governing permissions and
|
|
1744
|
+
* limitations under the License.
|
|
1745
|
+
*/
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Represents a protocol PublishNamespace message, used to announce a track and its parameters.
|
|
1749
|
+
*
|
|
1750
|
+
* @public
|
|
1751
|
+
*/
|
|
1752
|
+
declare class PublishNamespace {
|
|
1753
|
+
readonly requestId: bigint;
|
|
1754
|
+
readonly trackNamespace: Tuple;
|
|
1755
|
+
readonly parameters: MessageParameter[];
|
|
1756
|
+
/**
|
|
1757
|
+
* @public
|
|
1758
|
+
* Constructs a PublishNamespace message.
|
|
1759
|
+
*
|
|
1760
|
+
* @param requestId - The request ID for this publish namespace message.
|
|
1761
|
+
* @param trackNamespace - The track namespace as a Tuple.
|
|
1762
|
+
* @param parameters - The list of strongly-typed message parameters for the track.
|
|
1763
|
+
*/
|
|
1764
|
+
constructor(requestId: bigint, trackNamespace: Tuple, parameters: MessageParameter[]);
|
|
1765
|
+
/**
|
|
1766
|
+
* @public
|
|
1767
|
+
* Gets the message type for this PublishNamespace message.
|
|
1768
|
+
*
|
|
1769
|
+
* @returns The ControlMessageType.PublishNamespace value.
|
|
1770
|
+
*/
|
|
1771
|
+
getType(): ControlMessageType;
|
|
1772
|
+
/**
|
|
1773
|
+
* @public
|
|
1774
|
+
* Serializes the PublishNamespace message into a {@link FrozenByteBuffer}.
|
|
1775
|
+
*
|
|
1776
|
+
* @returns The serialized buffer.
|
|
1777
|
+
* @throws :{@link LengthExceedsMaxError} If the payload exceeds 65535 bytes.
|
|
1778
|
+
*/
|
|
1779
|
+
serialize(): FrozenByteBuffer;
|
|
1780
|
+
/**
|
|
1781
|
+
* @public
|
|
1782
|
+
* Parses a PublishNamespace message from the given buffer.
|
|
1783
|
+
*
|
|
1784
|
+
* @param buf - The buffer to parse from.
|
|
1785
|
+
* @returns The parsed PublishNamespace message.
|
|
1786
|
+
* @throws :{@link NotEnoughBytesError} If the buffer does not contain enough bytes.
|
|
1787
|
+
*/
|
|
1788
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespace;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/**
|
|
1792
|
+
* Copyright 2025 The MOQtail Authors
|
|
1793
|
+
*
|
|
1794
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1795
|
+
* you may not use this file except in compliance with the License.
|
|
1796
|
+
* You may obtain a copy of the License at
|
|
1797
|
+
*
|
|
1798
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1799
|
+
*
|
|
1800
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1801
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1802
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1803
|
+
* See the License for the specific language governing permissions and
|
|
1804
|
+
* limitations under the License.
|
|
1805
|
+
*/
|
|
1806
|
+
|
|
1807
|
+
declare class PublishNamespaceCancel {
|
|
1808
|
+
readonly requestId: bigint;
|
|
1809
|
+
readonly errorCode: RequestErrorCode;
|
|
1810
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
1811
|
+
constructor(requestId: bigint, errorCode: RequestErrorCode, reasonPhrase: ReasonPhrase);
|
|
1812
|
+
getType(): ControlMessageType;
|
|
1813
|
+
serialize(): FrozenByteBuffer;
|
|
1814
|
+
static parsePayload(buf: BaseByteBuffer): PublishNamespaceCancel;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Copyright 2025 The MOQtail Authors
|
|
1819
|
+
*
|
|
1820
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1821
|
+
* you may not use this file except in compliance with the License.
|
|
1822
|
+
* You may obtain a copy of the License at
|
|
1823
|
+
*
|
|
1824
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1825
|
+
*
|
|
1826
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1827
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1828
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1829
|
+
* See the License for the specific language governing permissions and
|
|
1830
|
+
* limitations under the License.
|
|
1831
|
+
*/
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* @public
|
|
1835
|
+
* Represents a NAMESPACE message sent on a SUBSCRIBE_NAMESPACE bi-stream.
|
|
1836
|
+
* Carries the namespace suffix (fields after the subscriber's prefix).
|
|
1837
|
+
*/
|
|
1838
|
+
declare class Namespace {
|
|
1839
|
+
readonly trackNamespaceSuffix: Tuple;
|
|
1840
|
+
constructor(trackNamespaceSuffix: Tuple);
|
|
1841
|
+
getType(): ControlMessageType;
|
|
1842
|
+
serialize(): FrozenByteBuffer;
|
|
1843
|
+
static parsePayload(buf: BaseByteBuffer): Namespace;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* Copyright 2025 The MOQtail Authors
|
|
1848
|
+
*
|
|
1849
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1850
|
+
* you may not use this file except in compliance with the License.
|
|
1851
|
+
* You may obtain a copy of the License at
|
|
1852
|
+
*
|
|
1853
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1854
|
+
*
|
|
1855
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1856
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1857
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1858
|
+
* See the License for the specific language governing permissions and
|
|
1859
|
+
* limitations under the License.
|
|
1860
|
+
*/
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* @public
|
|
1864
|
+
* Represents a NAMESPACE_DONE message sent on a SUBSCRIBE_NAMESPACE bi-stream.
|
|
1865
|
+
* Signals that a previously announced namespace suffix is no longer available.
|
|
1866
|
+
*/
|
|
1867
|
+
declare class NamespaceDone {
|
|
1868
|
+
readonly trackNamespaceSuffix: Tuple;
|
|
1869
|
+
constructor(trackNamespaceSuffix: Tuple);
|
|
1870
|
+
getType(): ControlMessageType;
|
|
1871
|
+
serialize(): FrozenByteBuffer;
|
|
1872
|
+
static parsePayload(buf: BaseByteBuffer): NamespaceDone;
|
|
1584
1873
|
}
|
|
1585
1874
|
|
|
1586
1875
|
/**
|
|
@@ -1600,9 +1889,8 @@ declare class PublishNamespaceCancel {
|
|
|
1600
1889
|
*/
|
|
1601
1890
|
|
|
1602
1891
|
declare class ClientSetup {
|
|
1603
|
-
readonly supportedVersions: number[];
|
|
1604
1892
|
readonly setupParameters: KeyValuePair[];
|
|
1605
|
-
constructor(
|
|
1893
|
+
constructor(setupParameters: KeyValuePair[]);
|
|
1606
1894
|
getType(): ControlMessageType;
|
|
1607
1895
|
serialize(): FrozenByteBuffer;
|
|
1608
1896
|
static parsePayload(buf: BaseByteBuffer): ClientSetup;
|
|
@@ -1626,10 +1914,8 @@ declare class ClientSetup {
|
|
|
1626
1914
|
|
|
1627
1915
|
declare class Fetch {
|
|
1628
1916
|
readonly requestId: bigint;
|
|
1629
|
-
readonly subscriberPriority: number;
|
|
1630
|
-
readonly groupOrder: GroupOrder;
|
|
1631
1917
|
readonly typeAndProps: {
|
|
1632
|
-
readonly type: FetchType.
|
|
1918
|
+
readonly type: FetchType.Standalone;
|
|
1633
1919
|
readonly props: {
|
|
1634
1920
|
fullTrackName: FullTrackName;
|
|
1635
1921
|
startLocation: Location;
|
|
@@ -1648,9 +1934,9 @@ declare class Fetch {
|
|
|
1648
1934
|
joiningStart: bigint;
|
|
1649
1935
|
};
|
|
1650
1936
|
};
|
|
1651
|
-
readonly parameters:
|
|
1652
|
-
constructor(requestId: bigint,
|
|
1653
|
-
readonly type: FetchType.
|
|
1937
|
+
readonly parameters: MessageParameter[];
|
|
1938
|
+
constructor(requestId: bigint, typeAndProps: {
|
|
1939
|
+
readonly type: FetchType.Standalone;
|
|
1654
1940
|
readonly props: {
|
|
1655
1941
|
fullTrackName: FullTrackName;
|
|
1656
1942
|
startLocation: Location;
|
|
@@ -1668,7 +1954,7 @@ declare class Fetch {
|
|
|
1668
1954
|
joiningRequestId: bigint;
|
|
1669
1955
|
joiningStart: bigint;
|
|
1670
1956
|
};
|
|
1671
|
-
}, parameters:
|
|
1957
|
+
}, parameters: MessageParameter[]);
|
|
1672
1958
|
getType(): ControlMessageType;
|
|
1673
1959
|
serialize(): FrozenByteBuffer;
|
|
1674
1960
|
static parsePayload(buf: BaseByteBuffer): Fetch;
|
|
@@ -1713,19 +1999,26 @@ declare class FetchCancel {
|
|
|
1713
1999
|
* See the License for the specific language governing permissions and
|
|
1714
2000
|
* limitations under the License.
|
|
1715
2001
|
*/
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
2002
|
+
declare enum LOCHeaderExtensionId {
|
|
2003
|
+
CaptureTimestamp = 2,
|
|
2004
|
+
VideoFrameMarking = 4,
|
|
2005
|
+
AudioLevel = 6,
|
|
2006
|
+
VideoConfig = 13
|
|
2007
|
+
}
|
|
2008
|
+
declare enum TrackExtensionType {
|
|
2009
|
+
DeliveryTimeout = 2,
|
|
2010
|
+
MaxCacheDuration = 4,
|
|
2011
|
+
ImmutableExtensions = 11,
|
|
2012
|
+
DefaultPublisherPriority = 14,
|
|
2013
|
+
DefaultPublisherGroupOrder = 34,
|
|
2014
|
+
DynamicGroups = 48,
|
|
2015
|
+
PriorGroupIdGap = 60,
|
|
2016
|
+
PriorObjectIdGap = 62
|
|
1725
2017
|
}
|
|
2018
|
+
declare function locHeaderExtensionIdFromNumber(value: number): LOCHeaderExtensionId;
|
|
1726
2019
|
|
|
1727
2020
|
/**
|
|
1728
|
-
* Copyright
|
|
2021
|
+
* Copyright 2026 The MOQtail Authors
|
|
1729
2022
|
*
|
|
1730
2023
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1731
2024
|
* you may not use this file except in compliance with the License.
|
|
@@ -1740,17 +2033,66 @@ declare class FetchError {
|
|
|
1740
2033
|
* limitations under the License.
|
|
1741
2034
|
*/
|
|
1742
2035
|
|
|
1743
|
-
declare class
|
|
1744
|
-
readonly
|
|
1745
|
-
readonly
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
2036
|
+
declare class DeliveryTimeoutExtension {
|
|
2037
|
+
readonly timeoutMs: bigint;
|
|
2038
|
+
static readonly TYPE = TrackExtensionType.DeliveryTimeout;
|
|
2039
|
+
constructor(timeoutMs: bigint);
|
|
2040
|
+
toKeyValuePair(): KeyValuePair;
|
|
2041
|
+
static fromKeyValuePair(pair: KeyValuePair): DeliveryTimeoutExtension | undefined;
|
|
2042
|
+
}
|
|
2043
|
+
declare class MaxCacheDurationExtension {
|
|
2044
|
+
readonly durationMs: bigint;
|
|
2045
|
+
static readonly TYPE = TrackExtensionType.MaxCacheDuration;
|
|
2046
|
+
constructor(durationMs: bigint);
|
|
2047
|
+
toKeyValuePair(): KeyValuePair;
|
|
2048
|
+
static fromKeyValuePair(pair: KeyValuePair): MaxCacheDurationExtension | undefined;
|
|
2049
|
+
}
|
|
2050
|
+
declare class ImmutableExtensionsExtension {
|
|
2051
|
+
readonly extensions: KeyValuePair[];
|
|
2052
|
+
static readonly TYPE = TrackExtensionType.ImmutableExtensions;
|
|
2053
|
+
constructor(extensions: KeyValuePair[]);
|
|
2054
|
+
toKeyValuePair(): KeyValuePair;
|
|
2055
|
+
static fromKeyValuePair(pair: KeyValuePair): ImmutableExtensionsExtension | undefined;
|
|
2056
|
+
}
|
|
2057
|
+
declare class DefaultPublisherPriorityExtension {
|
|
2058
|
+
readonly priority: number;
|
|
2059
|
+
static readonly TYPE = TrackExtensionType.DefaultPublisherPriority;
|
|
2060
|
+
constructor(priority: number);
|
|
2061
|
+
toKeyValuePair(): KeyValuePair;
|
|
2062
|
+
static fromKeyValuePair(pair: KeyValuePair): DefaultPublisherPriorityExtension | undefined;
|
|
2063
|
+
}
|
|
2064
|
+
declare class DefaultPublisherGroupOrderExtension {
|
|
2065
|
+
readonly order: GroupOrder;
|
|
2066
|
+
static readonly TYPE = TrackExtensionType.DefaultPublisherGroupOrder;
|
|
2067
|
+
constructor(order: GroupOrder);
|
|
2068
|
+
toKeyValuePair(): KeyValuePair;
|
|
2069
|
+
static fromKeyValuePair(pair: KeyValuePair): DefaultPublisherGroupOrderExtension | undefined;
|
|
2070
|
+
}
|
|
2071
|
+
declare class DynamicGroupsExtension {
|
|
2072
|
+
readonly enabled: boolean;
|
|
2073
|
+
static readonly TYPE = TrackExtensionType.DynamicGroups;
|
|
2074
|
+
constructor(enabled: boolean);
|
|
2075
|
+
toKeyValuePair(): KeyValuePair;
|
|
2076
|
+
static fromKeyValuePair(pair: KeyValuePair): DynamicGroupsExtension | undefined;
|
|
2077
|
+
}
|
|
2078
|
+
declare class UnknownTrackExtension {
|
|
2079
|
+
readonly kvp: KeyValuePair;
|
|
2080
|
+
constructor(kvp: KeyValuePair);
|
|
2081
|
+
toKeyValuePair(): KeyValuePair;
|
|
2082
|
+
}
|
|
2083
|
+
type TrackExtension = DeliveryTimeoutExtension | MaxCacheDurationExtension | ImmutableExtensionsExtension | DefaultPublisherPriorityExtension | DefaultPublisherGroupOrderExtension | DynamicGroupsExtension | UnknownTrackExtension;
|
|
2084
|
+
declare namespace TrackExtension {
|
|
2085
|
+
function fromKeyValuePair(pair: KeyValuePair): TrackExtension;
|
|
2086
|
+
function toKeyValuePair(ext: TrackExtension): KeyValuePair;
|
|
2087
|
+
function deserializeAll(buf: BaseByteBuffer): TrackExtension[];
|
|
2088
|
+
function serializeInto(exts: TrackExtension[], payload: ByteBuffer): void;
|
|
2089
|
+
function isDeliveryTimeout(ext: TrackExtension): ext is DeliveryTimeoutExtension;
|
|
2090
|
+
function isMaxCacheDuration(ext: TrackExtension): ext is MaxCacheDurationExtension;
|
|
2091
|
+
function isImmutableExtensions(ext: TrackExtension): ext is ImmutableExtensionsExtension;
|
|
2092
|
+
function isDefaultPublisherPriority(ext: TrackExtension): ext is DefaultPublisherPriorityExtension;
|
|
2093
|
+
function isDefaultPublisherGroupOrder(ext: TrackExtension): ext is DefaultPublisherGroupOrderExtension;
|
|
2094
|
+
function isDynamicGroups(ext: TrackExtension): ext is DynamicGroupsExtension;
|
|
2095
|
+
function isUnknown(ext: TrackExtension): ext is UnknownTrackExtension;
|
|
1754
2096
|
}
|
|
1755
2097
|
|
|
1756
2098
|
/**
|
|
@@ -1769,12 +2111,15 @@ declare class FetchOk {
|
|
|
1769
2111
|
* limitations under the License.
|
|
1770
2112
|
*/
|
|
1771
2113
|
|
|
1772
|
-
declare class
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
2114
|
+
declare class FetchOk {
|
|
2115
|
+
readonly requestId: bigint;
|
|
2116
|
+
readonly endOfTrack: boolean;
|
|
2117
|
+
readonly endLocation: Location;
|
|
2118
|
+
readonly parameters: MessageParameter[];
|
|
2119
|
+
readonly trackExtensions: TrackExtension[];
|
|
2120
|
+
constructor(requestId: bigint, endOfTrack: boolean, endLocation: Location, parameters: MessageParameter[], trackExtensions?: TrackExtension[]);
|
|
1776
2121
|
serialize(): FrozenByteBuffer;
|
|
1777
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2122
|
+
static parsePayload(buf: BaseByteBuffer): FetchOk;
|
|
1778
2123
|
}
|
|
1779
2124
|
|
|
1780
2125
|
/**
|
|
@@ -1793,12 +2138,12 @@ declare class GoAway {
|
|
|
1793
2138
|
* limitations under the License.
|
|
1794
2139
|
*/
|
|
1795
2140
|
|
|
1796
|
-
declare class
|
|
1797
|
-
|
|
1798
|
-
constructor(
|
|
1799
|
-
getType(): ControlMessageType;
|
|
2141
|
+
declare class GoAway {
|
|
2142
|
+
newSessionUri?: string | undefined;
|
|
2143
|
+
constructor(newSessionUri?: string);
|
|
2144
|
+
static getType(): ControlMessageType;
|
|
1800
2145
|
serialize(): FrozenByteBuffer;
|
|
1801
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2146
|
+
static parsePayload(buf: BaseByteBuffer): GoAway;
|
|
1802
2147
|
}
|
|
1803
2148
|
|
|
1804
2149
|
/**
|
|
@@ -1817,13 +2162,12 @@ declare class MaxRequestId$1 {
|
|
|
1817
2162
|
* limitations under the License.
|
|
1818
2163
|
*/
|
|
1819
2164
|
|
|
1820
|
-
declare class
|
|
1821
|
-
readonly
|
|
1822
|
-
|
|
1823
|
-
constructor(selectedVersion: number, setupParameters: KeyValuePair[]);
|
|
2165
|
+
declare class MaxRequestId$1 {
|
|
2166
|
+
readonly maxRequestId: bigint;
|
|
2167
|
+
constructor(maxRequestId: bigint | number);
|
|
1824
2168
|
getType(): ControlMessageType;
|
|
1825
2169
|
serialize(): FrozenByteBuffer;
|
|
1826
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2170
|
+
static parsePayload(buf: BaseByteBuffer): MaxRequestId$1;
|
|
1827
2171
|
}
|
|
1828
2172
|
|
|
1829
2173
|
/**
|
|
@@ -1836,22 +2180,18 @@ declare class ServerSetup {
|
|
|
1836
2180
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1837
2181
|
*
|
|
1838
2182
|
* Unless required by applicable law or agreed to in writing, software
|
|
1839
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1840
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1841
|
-
* See the License for the specific language governing permissions and
|
|
1842
|
-
* limitations under the License.
|
|
1843
|
-
*/
|
|
1844
|
-
|
|
1845
|
-
declare class
|
|
1846
|
-
readonly
|
|
1847
|
-
|
|
1848
|
-
readonly streamCount: bigint;
|
|
1849
|
-
readonly errorReason: ReasonPhrase;
|
|
1850
|
-
constructor(requestId: bigint, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase);
|
|
1851
|
-
static new(requestId: bigint | number, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase): PublishDone;
|
|
2183
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2184
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2185
|
+
* See the License for the specific language governing permissions and
|
|
2186
|
+
* limitations under the License.
|
|
2187
|
+
*/
|
|
2188
|
+
|
|
2189
|
+
declare class ServerSetup {
|
|
2190
|
+
readonly setupParameters: KeyValuePair[];
|
|
2191
|
+
constructor(setupParameters: KeyValuePair[]);
|
|
1852
2192
|
getType(): ControlMessageType;
|
|
1853
2193
|
serialize(): FrozenByteBuffer;
|
|
1854
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2194
|
+
static parsePayload(buf: BaseByteBuffer): ServerSetup;
|
|
1855
2195
|
}
|
|
1856
2196
|
|
|
1857
2197
|
/**
|
|
@@ -1870,20 +2210,17 @@ declare class PublishDone {
|
|
|
1870
2210
|
* limitations under the License.
|
|
1871
2211
|
*/
|
|
1872
2212
|
|
|
1873
|
-
declare class
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
constructor(requestId: bigint, fullTrackName: FullTrackName, trackAlias: bigint, groupOrder: number, contentExists: number, largestLocation: Location | undefined, forward: number, parameters: KeyValuePair[]);
|
|
1883
|
-
static new(requestId: bigint | number, fullTrackName: FullTrackName, trackAlias: bigint | number, groupOrder: number, contentExists: number, largestLocation: Location | undefined, forward: number, parameters: KeyValuePair[]): Publish;
|
|
1884
|
-
getType(): ControlMessageType;
|
|
2213
|
+
declare class Subscribe {
|
|
2214
|
+
requestId: bigint;
|
|
2215
|
+
fullTrackName: FullTrackName;
|
|
2216
|
+
parameters: MessageParameter[];
|
|
2217
|
+
private constructor();
|
|
2218
|
+
static newNextGroupStart(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]): Subscribe;
|
|
2219
|
+
static newLatestObject(requestId: bigint, fullTrackName: FullTrackName, parameters: MessageParameter[]): Subscribe;
|
|
2220
|
+
static newAbsoluteStart(requestId: bigint, fullTrackName: FullTrackName, startLocation: Location, parameters: MessageParameter[]): Subscribe;
|
|
2221
|
+
static newAbsoluteRange(requestId: bigint, fullTrackName: FullTrackName, startLocation: Location, endGroup: bigint, parameters: MessageParameter[]): Subscribe;
|
|
1885
2222
|
serialize(): FrozenByteBuffer;
|
|
1886
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2223
|
+
static parsePayload(buf: BaseByteBuffer): Subscribe;
|
|
1887
2224
|
}
|
|
1888
2225
|
|
|
1889
2226
|
/**
|
|
@@ -1902,20 +2239,16 @@ declare class Publish {
|
|
|
1902
2239
|
* limitations under the License.
|
|
1903
2240
|
*/
|
|
1904
2241
|
|
|
1905
|
-
declare class
|
|
2242
|
+
declare class PublishDone {
|
|
1906
2243
|
readonly requestId: bigint;
|
|
1907
|
-
readonly
|
|
1908
|
-
readonly
|
|
1909
|
-
readonly
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
readonly endGroup: bigint | undefined;
|
|
1913
|
-
readonly parameters: KeyValuePair[];
|
|
1914
|
-
constructor(requestId: bigint, forward: number, subscriberPriority: number, groupOrder: number, filterType: FilterType, startLocation: Location | undefined, endGroup: bigint | undefined, parameters: KeyValuePair[]);
|
|
1915
|
-
static new(requestId: bigint | number, forward: number, subscriberPriority: number, groupOrder: number, filterType: FilterType, startLocation: Location | undefined, endGroup: bigint | number | undefined, parameters: KeyValuePair[]): PublishOk;
|
|
2244
|
+
readonly statusCode: PublishDoneStatusCode;
|
|
2245
|
+
readonly streamCount: bigint;
|
|
2246
|
+
readonly errorReason: ReasonPhrase;
|
|
2247
|
+
constructor(requestId: bigint, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase);
|
|
2248
|
+
static new(requestId: bigint | number, statusCode: PublishDoneStatusCode, streamCount: bigint, errorReason: ReasonPhrase): PublishDone;
|
|
1916
2249
|
getType(): ControlMessageType;
|
|
1917
2250
|
serialize(): FrozenByteBuffer;
|
|
1918
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2251
|
+
static parsePayload(buf: BaseByteBuffer): PublishDone;
|
|
1919
2252
|
}
|
|
1920
2253
|
|
|
1921
2254
|
/**
|
|
@@ -1934,15 +2267,16 @@ declare class PublishOk {
|
|
|
1934
2267
|
* limitations under the License.
|
|
1935
2268
|
*/
|
|
1936
2269
|
|
|
1937
|
-
declare class
|
|
2270
|
+
declare class Publish {
|
|
1938
2271
|
readonly requestId: bigint;
|
|
1939
|
-
readonly
|
|
1940
|
-
readonly
|
|
1941
|
-
|
|
1942
|
-
|
|
2272
|
+
readonly fullTrackName: FullTrackName;
|
|
2273
|
+
readonly trackAlias: bigint;
|
|
2274
|
+
readonly parameters: MessageParameter[];
|
|
2275
|
+
readonly trackExtensions: TrackExtension[];
|
|
2276
|
+
constructor(requestId: bigint, fullTrackName: FullTrackName, trackAlias: bigint, parameters: MessageParameter[], trackExtensions?: TrackExtension[]);
|
|
1943
2277
|
getType(): ControlMessageType;
|
|
1944
2278
|
serialize(): FrozenByteBuffer;
|
|
1945
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2279
|
+
static parsePayload(buf: BaseByteBuffer): Publish;
|
|
1946
2280
|
}
|
|
1947
2281
|
|
|
1948
2282
|
/**
|
|
@@ -1961,15 +2295,13 @@ declare class PublishError {
|
|
|
1961
2295
|
* limitations under the License.
|
|
1962
2296
|
*/
|
|
1963
2297
|
|
|
1964
|
-
declare class
|
|
2298
|
+
declare class PublishOk {
|
|
1965
2299
|
readonly requestId: bigint;
|
|
1966
|
-
readonly
|
|
1967
|
-
|
|
1968
|
-
constructor(requestId: bigint, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase);
|
|
1969
|
-
static new(requestId: bigint | number, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase): SubscribeError;
|
|
2300
|
+
readonly parameters: MessageParameter[];
|
|
2301
|
+
constructor(requestId: bigint, parameters: MessageParameter[]);
|
|
1970
2302
|
getType(): ControlMessageType;
|
|
1971
2303
|
serialize(): FrozenByteBuffer;
|
|
1972
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2304
|
+
static parsePayload(buf: BaseByteBuffer): PublishOk;
|
|
1973
2305
|
}
|
|
1974
2306
|
|
|
1975
2307
|
/**
|
|
@@ -1991,16 +2323,10 @@ declare class SubscribeError {
|
|
|
1991
2323
|
declare class SubscribeOk {
|
|
1992
2324
|
requestId: bigint;
|
|
1993
2325
|
trackAlias: bigint;
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
contentExists: boolean;
|
|
1997
|
-
largestLocation?: Location | undefined;
|
|
1998
|
-
parameters: KeyValuePair[];
|
|
2326
|
+
parameters: MessageParameter[];
|
|
2327
|
+
trackExtensions: TrackExtension[];
|
|
1999
2328
|
private constructor();
|
|
2000
|
-
static
|
|
2001
|
-
static newDescendingNoContent(requestId: bigint, trackAlias: bigint, expires: bigint, parameters: KeyValuePair[]): SubscribeOk;
|
|
2002
|
-
static newAscendingWithContent(requestId: bigint, trackAlias: bigint, expires: bigint, largestLocation: Location, parameters: KeyValuePair[]): SubscribeOk;
|
|
2003
|
-
static newDescendingWithContent(requestId: bigint, trackAlias: bigint, expires: bigint, largestLocation: Location, parameters: KeyValuePair[]): SubscribeOk;
|
|
2329
|
+
static create(requestId: bigint, trackAlias: bigint, parameters: MessageParameter[], trackExtensions?: TrackExtension[]): SubscribeOk;
|
|
2004
2330
|
serialize(): FrozenByteBuffer;
|
|
2005
2331
|
static parsePayload(buf: BaseByteBuffer): SubscribeOk;
|
|
2006
2332
|
}
|
|
@@ -2021,18 +2347,15 @@ declare class SubscribeOk {
|
|
|
2021
2347
|
* limitations under the License.
|
|
2022
2348
|
*/
|
|
2023
2349
|
|
|
2024
|
-
declare class
|
|
2350
|
+
declare class RequestUpdate {
|
|
2025
2351
|
requestId: bigint;
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
forward: boolean;
|
|
2031
|
-
parameters: KeyValuePair[];
|
|
2032
|
-
constructor(requestId: bigint, subscriptionRequestId: bigint, startLocation: Location, endGroup: bigint, subscriberPriority: number, forward: boolean, parameters: KeyValuePair[]);
|
|
2352
|
+
existingRequestId: bigint;
|
|
2353
|
+
parameters: MessageParameter[];
|
|
2354
|
+
constructor(requestId: bigint, existingRequestId: bigint, parameters: MessageParameter[]);
|
|
2355
|
+
getType(): ControlMessageType;
|
|
2033
2356
|
serialize(): FrozenByteBuffer;
|
|
2034
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2035
|
-
equals(other:
|
|
2357
|
+
static parsePayload(buf: BaseByteBuffer): RequestUpdate;
|
|
2358
|
+
equals(other: RequestUpdate): boolean;
|
|
2036
2359
|
}
|
|
2037
2360
|
|
|
2038
2361
|
/**
|
|
@@ -2085,12 +2408,12 @@ declare class TrackStatus {
|
|
|
2085
2408
|
filterType: FilterType;
|
|
2086
2409
|
startLocation: Location | undefined;
|
|
2087
2410
|
endGroup: bigint | undefined;
|
|
2088
|
-
subscribeParameters:
|
|
2411
|
+
subscribeParameters: MessageParameter[];
|
|
2089
2412
|
private constructor();
|
|
2090
|
-
static newNextGroupStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters:
|
|
2091
|
-
static newLatestObject(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters:
|
|
2092
|
-
static newAbsoluteStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, subscribeParameters:
|
|
2093
|
-
static newAbsoluteRange(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, subscribeParameters:
|
|
2413
|
+
static newNextGroupStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2414
|
+
static newLatestObject(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2415
|
+
static newAbsoluteStart(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2416
|
+
static newAbsoluteRange(requestId: bigint, trackAlias: bigint, fullTrackName: FullTrackName, subscriberPriority: number, groupOrder: GroupOrder, forward: boolean, startLocation: Location, endGroup: bigint, subscribeParameters: MessageParameter[]): TrackStatus;
|
|
2094
2417
|
serialize(): FrozenByteBuffer;
|
|
2095
2418
|
static parsePayload(buf: BaseByteBuffer): TrackStatus;
|
|
2096
2419
|
}
|
|
@@ -2184,63 +2507,14 @@ declare class Unsubscribe {
|
|
|
2184
2507
|
declare class SubscribeNamespace {
|
|
2185
2508
|
readonly requestId: bigint;
|
|
2186
2509
|
readonly trackNamespacePrefix: Tuple;
|
|
2187
|
-
readonly
|
|
2188
|
-
|
|
2510
|
+
readonly subscribeOptions: NamespaceSubscribeOptions;
|
|
2511
|
+
readonly parameters: MessageParameter[];
|
|
2512
|
+
constructor(requestId: bigint, trackNamespacePrefix: Tuple, subscribeOptions: NamespaceSubscribeOptions, parameters: MessageParameter[]);
|
|
2189
2513
|
getType(): ControlMessageType;
|
|
2190
2514
|
serialize(): FrozenByteBuffer;
|
|
2191
2515
|
static parsePayload(buf: BaseByteBuffer): SubscribeNamespace;
|
|
2192
2516
|
}
|
|
2193
2517
|
|
|
2194
|
-
/**
|
|
2195
|
-
* Copyright 2025 The MOQtail Authors
|
|
2196
|
-
*
|
|
2197
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2198
|
-
* you may not use this file except in compliance with the License.
|
|
2199
|
-
* You may obtain a copy of the License at
|
|
2200
|
-
*
|
|
2201
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2202
|
-
*
|
|
2203
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2204
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2205
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2206
|
-
* See the License for the specific language governing permissions and
|
|
2207
|
-
* limitations under the License.
|
|
2208
|
-
*/
|
|
2209
|
-
|
|
2210
|
-
declare class SubscribeNamespaceOk {
|
|
2211
|
-
readonly requestId: bigint;
|
|
2212
|
-
constructor(requestId: bigint | number);
|
|
2213
|
-
getType(): ControlMessageType;
|
|
2214
|
-
serialize(): FrozenByteBuffer;
|
|
2215
|
-
static parsePayload(buf: BaseByteBuffer): SubscribeNamespaceOk;
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
/**
|
|
2219
|
-
* Copyright 2025 The MOQtail Authors
|
|
2220
|
-
*
|
|
2221
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2222
|
-
* you may not use this file except in compliance with the License.
|
|
2223
|
-
* You may obtain a copy of the License at
|
|
2224
|
-
*
|
|
2225
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2226
|
-
*
|
|
2227
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2228
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2229
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2230
|
-
* See the License for the specific language governing permissions and
|
|
2231
|
-
* limitations under the License.
|
|
2232
|
-
*/
|
|
2233
|
-
|
|
2234
|
-
declare class SubscribeNamespaceError {
|
|
2235
|
-
readonly requestId: bigint;
|
|
2236
|
-
readonly errorCode: SubscribeNamespaceErrorCode;
|
|
2237
|
-
readonly reasonPhrase: ReasonPhrase;
|
|
2238
|
-
constructor(requestId: bigint, errorCode: SubscribeNamespaceErrorCode, reasonPhrase: ReasonPhrase);
|
|
2239
|
-
getType(): ControlMessageType;
|
|
2240
|
-
serialize(): FrozenByteBuffer;
|
|
2241
|
-
static parsePayload(buf: BaseByteBuffer): SubscribeNamespaceError;
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
2518
|
/**
|
|
2245
2519
|
* Copyright 2025 The MOQtail Authors
|
|
2246
2520
|
*
|
|
@@ -2266,13 +2540,13 @@ declare class UnsubscribeNamespace {
|
|
|
2266
2540
|
}
|
|
2267
2541
|
|
|
2268
2542
|
/**
|
|
2269
|
-
* Copyright
|
|
2543
|
+
* Copyright 2026 The MOQtail Authors
|
|
2270
2544
|
*
|
|
2271
2545
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2272
2546
|
* you may not use this file except in compliance with the License.
|
|
2273
2547
|
* You may obtain a copy of the License at
|
|
2274
2548
|
*
|
|
2275
|
-
*
|
|
2549
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2276
2550
|
*
|
|
2277
2551
|
* Unless required by applicable law or agreed to in writing, software
|
|
2278
2552
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
@@ -2281,20 +2555,13 @@ declare class UnsubscribeNamespace {
|
|
|
2281
2555
|
* limitations under the License.
|
|
2282
2556
|
*/
|
|
2283
2557
|
|
|
2284
|
-
declare class
|
|
2285
|
-
requestId: bigint;
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
largestLocation?: Location | undefined;
|
|
2290
|
-
subscribeParameters: KeyValuePair[];
|
|
2291
|
-
private constructor();
|
|
2292
|
-
static newAscendingNoContent(requestId: bigint, expires: bigint, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
2293
|
-
static newDescendingNoContent(requestId: bigint, expires: bigint, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
2294
|
-
static newAscendingWithContent(requestId: bigint, expires: bigint, largestLocation: Location, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
2295
|
-
static newDescendingWithContent(requestId: bigint, expires: bigint, largestLocation: Location, subscribeParameters: KeyValuePair[]): TrackStatusOk;
|
|
2558
|
+
declare class RequestOk {
|
|
2559
|
+
readonly requestId: bigint;
|
|
2560
|
+
readonly parameters: MessageParameter[];
|
|
2561
|
+
constructor(requestId: bigint | number, parameters?: MessageParameter[]);
|
|
2562
|
+
getType(): ControlMessageType;
|
|
2296
2563
|
serialize(): FrozenByteBuffer;
|
|
2297
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2564
|
+
static parsePayload(buf: BaseByteBuffer): RequestOk;
|
|
2298
2565
|
}
|
|
2299
2566
|
|
|
2300
2567
|
/**
|
|
@@ -2313,16 +2580,15 @@ declare class TrackStatusOk {
|
|
|
2313
2580
|
* limitations under the License.
|
|
2314
2581
|
*/
|
|
2315
2582
|
|
|
2316
|
-
declare class
|
|
2583
|
+
declare class RequestError {
|
|
2317
2584
|
readonly requestId: bigint;
|
|
2318
|
-
readonly errorCode:
|
|
2319
|
-
readonly
|
|
2320
|
-
readonly
|
|
2321
|
-
constructor(requestId: bigint, errorCode:
|
|
2322
|
-
static new(requestId: bigint | number, errorCode: SubscribeErrorCode, errorReason: ReasonPhrase, trackAlias: bigint): TrackStatusError;
|
|
2585
|
+
readonly errorCode: RequestErrorCode;
|
|
2586
|
+
readonly retryInterval: bigint;
|
|
2587
|
+
readonly reasonPhrase: ReasonPhrase;
|
|
2588
|
+
constructor(requestId: bigint, errorCode: RequestErrorCode, retryInterval: bigint, reasonPhrase: ReasonPhrase);
|
|
2323
2589
|
getType(): ControlMessageType;
|
|
2324
2590
|
serialize(): FrozenByteBuffer;
|
|
2325
|
-
static parsePayload(buf: BaseByteBuffer):
|
|
2591
|
+
static parsePayload(buf: BaseByteBuffer): RequestError;
|
|
2326
2592
|
}
|
|
2327
2593
|
|
|
2328
2594
|
/**
|
|
@@ -2341,71 +2607,12 @@ declare class TrackStatusError {
|
|
|
2341
2607
|
* limitations under the License.
|
|
2342
2608
|
*/
|
|
2343
2609
|
|
|
2344
|
-
type ControlMessage = Publish |
|
|
2610
|
+
type ControlMessage = Publish | PublishOk | PublishDone | PublishNamespace | PublishNamespaceCancel | Namespace | NamespaceDone | ClientSetup | Fetch | FetchCancel | FetchOk | GoAway | MaxRequestId$1 | ServerSetup | Subscribe | RequestError | SubscribeOk | RequestUpdate | RequestsBlocked | TrackStatus | PublishNamespaceDone | Unsubscribe | SubscribeNamespace | UnsubscribeNamespace | RequestOk;
|
|
2345
2611
|
declare namespace ControlMessage {
|
|
2346
2612
|
function deserialize(buf: FrozenByteBuffer): ControlMessage;
|
|
2347
2613
|
function serialize(msg: ControlMessage): FrozenByteBuffer;
|
|
2348
2614
|
}
|
|
2349
2615
|
|
|
2350
|
-
/**
|
|
2351
|
-
* Copyright 2025 The MOQtail Authors
|
|
2352
|
-
*
|
|
2353
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2354
|
-
* you may not use this file except in compliance with the License.
|
|
2355
|
-
* You may obtain a copy of the License at
|
|
2356
|
-
*
|
|
2357
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2358
|
-
*
|
|
2359
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2360
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2361
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2362
|
-
* See the License for the specific language governing permissions and
|
|
2363
|
-
* limitations under the License.
|
|
2364
|
-
*/
|
|
2365
|
-
declare enum CommonType {
|
|
2366
|
-
AuthorizationToken = 3
|
|
2367
|
-
}
|
|
2368
|
-
declare function commonTypeFromNumber(value: number): CommonType;
|
|
2369
|
-
declare enum SetupParameterType {
|
|
2370
|
-
Path = 1,
|
|
2371
|
-
MaxRequestId = 2,
|
|
2372
|
-
MaxAuthTokenCacheSize = 4
|
|
2373
|
-
}
|
|
2374
|
-
declare function setupParameterTypeFromNumber(value: number): SetupParameterType;
|
|
2375
|
-
declare enum VersionSpecificParameterType {
|
|
2376
|
-
AuthorizationToken = 1,
|
|
2377
|
-
DeliveryTimeout = 2,
|
|
2378
|
-
MaxCacheDuration = 4
|
|
2379
|
-
}
|
|
2380
|
-
declare function versionSpecificParameterTypeFromNumber(value: number): VersionSpecificParameterType;
|
|
2381
|
-
declare enum TokenAliasType {
|
|
2382
|
-
Delete = 0,
|
|
2383
|
-
Register = 1,
|
|
2384
|
-
UseAlias = 2,
|
|
2385
|
-
UseValue = 3
|
|
2386
|
-
}
|
|
2387
|
-
declare function tokenAliasTypeFromNumber(value: number): TokenAliasType;
|
|
2388
|
-
|
|
2389
|
-
/**
|
|
2390
|
-
* Copyright 2025 The MOQtail Authors
|
|
2391
|
-
*
|
|
2392
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2393
|
-
* you may not use this file except in compliance with the License.
|
|
2394
|
-
* You may obtain a copy of the License at
|
|
2395
|
-
*
|
|
2396
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2397
|
-
*
|
|
2398
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2399
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2400
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2401
|
-
* See the License for the specific language governing permissions and
|
|
2402
|
-
* limitations under the License.
|
|
2403
|
-
*/
|
|
2404
|
-
|
|
2405
|
-
interface Parameter {
|
|
2406
|
-
toKeyValuePair(): KeyValuePair;
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
2616
|
/**
|
|
2410
2617
|
* Copyright 2025 The MOQtail Authors
|
|
2411
2618
|
*
|
|
@@ -2478,50 +2685,6 @@ declare class MaxAuthTokenCacheSize implements Parameter {
|
|
|
2478
2685
|
static fromKeyValuePair(pair: KeyValuePair): MaxAuthTokenCacheSize | undefined;
|
|
2479
2686
|
}
|
|
2480
2687
|
|
|
2481
|
-
/**
|
|
2482
|
-
* Copyright 2025 The MOQtail Authors
|
|
2483
|
-
*
|
|
2484
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2485
|
-
* you may not use this file except in compliance with the License.
|
|
2486
|
-
* You may obtain a copy of the License at
|
|
2487
|
-
*
|
|
2488
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2489
|
-
*
|
|
2490
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2491
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2492
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2493
|
-
* See the License for the specific language governing permissions and
|
|
2494
|
-
* limitations under the License.
|
|
2495
|
-
*/
|
|
2496
|
-
|
|
2497
|
-
type AuthTokenVariant = {
|
|
2498
|
-
aliasType: TokenAliasType.Delete;
|
|
2499
|
-
tokenAlias: bigint;
|
|
2500
|
-
} | {
|
|
2501
|
-
aliasType: TokenAliasType.Register;
|
|
2502
|
-
tokenAlias: bigint;
|
|
2503
|
-
tokenType: bigint;
|
|
2504
|
-
tokenValue: Uint8Array;
|
|
2505
|
-
} | {
|
|
2506
|
-
aliasType: TokenAliasType.UseAlias;
|
|
2507
|
-
tokenAlias: bigint;
|
|
2508
|
-
} | {
|
|
2509
|
-
aliasType: TokenAliasType.UseValue;
|
|
2510
|
-
tokenType: bigint;
|
|
2511
|
-
tokenValue: Uint8Array;
|
|
2512
|
-
};
|
|
2513
|
-
declare class AuthorizationToken implements Parameter {
|
|
2514
|
-
readonly variant: AuthTokenVariant;
|
|
2515
|
-
static readonly TYPE = CommonType.AuthorizationToken;
|
|
2516
|
-
private constructor();
|
|
2517
|
-
static newDelete(tokenAlias: bigint | number): AuthorizationToken;
|
|
2518
|
-
static newRegister(tokenAlias: bigint | number, tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
2519
|
-
static newUseAlias(tokenAlias: bigint | number): AuthorizationToken;
|
|
2520
|
-
static newUseValue(tokenType: bigint | number, tokenValue: Uint8Array): AuthorizationToken;
|
|
2521
|
-
toKeyValuePair(): KeyValuePair;
|
|
2522
|
-
static fromKeyValuePair(pair: KeyValuePair): AuthorizationToken | undefined;
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
2688
|
/**
|
|
2526
2689
|
* Copyright 2025 The MOQtail Authors
|
|
2527
2690
|
*
|
|
@@ -2558,86 +2721,4 @@ declare class SetupParameters {
|
|
|
2558
2721
|
static fromKeyValuePairs(kvps: KeyValuePair[]): SetupParameter[];
|
|
2559
2722
|
}
|
|
2560
2723
|
|
|
2561
|
-
|
|
2562
|
-
* Copyright 2025 The MOQtail Authors
|
|
2563
|
-
*
|
|
2564
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2565
|
-
* you may not use this file except in compliance with the License.
|
|
2566
|
-
* You may obtain a copy of the License at
|
|
2567
|
-
*
|
|
2568
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2569
|
-
*
|
|
2570
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2571
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2572
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2573
|
-
* See the License for the specific language governing permissions and
|
|
2574
|
-
* limitations under the License.
|
|
2575
|
-
*/
|
|
2576
|
-
|
|
2577
|
-
declare class DeliveryTimeout implements Parameter {
|
|
2578
|
-
readonly objectTimeout: bigint;
|
|
2579
|
-
static readonly TYPE = VersionSpecificParameterType.DeliveryTimeout;
|
|
2580
|
-
constructor(objectTimeout: bigint);
|
|
2581
|
-
toKeyValuePair(): KeyValuePair;
|
|
2582
|
-
static fromKeyValuePair(pair: KeyValuePair): DeliveryTimeout | undefined;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
/**
|
|
2586
|
-
* Copyright 2025 The MOQtail Authors
|
|
2587
|
-
*
|
|
2588
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2589
|
-
* you may not use this file except in compliance with the License.
|
|
2590
|
-
* You may obtain a copy of the License at
|
|
2591
|
-
*
|
|
2592
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2593
|
-
*
|
|
2594
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2595
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2596
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2597
|
-
* See the License for the specific language governing permissions and
|
|
2598
|
-
* limitations under the License.
|
|
2599
|
-
*/
|
|
2600
|
-
|
|
2601
|
-
declare class MaxCacheDuration implements Parameter {
|
|
2602
|
-
readonly duration: bigint;
|
|
2603
|
-
static readonly TYPE = VersionSpecificParameterType.MaxCacheDuration;
|
|
2604
|
-
constructor(duration: bigint);
|
|
2605
|
-
toKeyValuePair(): KeyValuePair;
|
|
2606
|
-
static fromKeyValuePair(pair: KeyValuePair): MaxCacheDuration | undefined;
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
/**
|
|
2610
|
-
* Copyright 2025 The MOQtail Authors
|
|
2611
|
-
*
|
|
2612
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2613
|
-
* you may not use this file except in compliance with the License.
|
|
2614
|
-
* You may obtain a copy of the License at
|
|
2615
|
-
*
|
|
2616
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2617
|
-
*
|
|
2618
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2619
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2620
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2621
|
-
* See the License for the specific language governing permissions and
|
|
2622
|
-
* limitations under the License.
|
|
2623
|
-
*/
|
|
2624
|
-
|
|
2625
|
-
type VersionSpecificParameter = MaxCacheDuration | DeliveryTimeout | AuthorizationToken;
|
|
2626
|
-
declare namespace VersionSpecificParameter {
|
|
2627
|
-
function fromKeyValuePair(pair: KeyValuePair): VersionSpecificParameter | undefined;
|
|
2628
|
-
function toKeyValuePair(param: VersionSpecificParameter): KeyValuePair;
|
|
2629
|
-
function isMaxCacheDuration(param: VersionSpecificParameter): param is MaxCacheDuration;
|
|
2630
|
-
function isDeliveryTimeout(param: VersionSpecificParameter): param is DeliveryTimeout;
|
|
2631
|
-
function isAuthorizationToken(param: VersionSpecificParameter): param is AuthorizationToken;
|
|
2632
|
-
}
|
|
2633
|
-
declare class VersionSpecificParameters {
|
|
2634
|
-
private kvps;
|
|
2635
|
-
addMaxCacheDuration(duration: bigint | number): this;
|
|
2636
|
-
addDeliveryTimeout(timeout: bigint | number): this;
|
|
2637
|
-
addAuthorizationToken(auth: AuthorizationToken): this;
|
|
2638
|
-
addRaw(pair: KeyValuePair): this;
|
|
2639
|
-
build(): KeyValuePair[];
|
|
2640
|
-
static fromKeyValuePairs(kvps: KeyValuePair[]): VersionSpecificParameter[];
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
export { PublishNamespaceOk as $, type AuthTokenVariant as A, BaseByteBuffer as B, ClientSetup as C, DRAFT_14 as D, MoqtObject as E, Fetch as F, GoAway as G, Header as H, ObjectDatagramType as I, ObjectForwardingPreference as J, KeyValuePair as K, Location as L, MAX_FULL_TRACK_NAME_LENGTH as M, ObjectStatus as N, ObjectDatagramStatusType as O, type Parameter as P, Path as Q, Publish as R, PublishDone as S, PublishDoneStatusCode as T, PublishError as U, PublishErrorCode as V, PublishNamespace as W, PublishNamespaceCancel as X, PublishNamespaceDone as Y, PublishNamespaceError as Z, PublishNamespaceErrorCode as _, AuthorizationToken as a, PublishOk as a0, ReasonPhrase as a1, RequestIdMap as a2, RequestsBlocked as a3, ServerSetup as a4, SetupParameter as a5, SetupParameterType as a6, SetupParameters as a7, SubgroupHeader as a8, SubgroupHeaderType as a9, filterTypeFromBigInt as aA, groupOrderFromNumber as aB, isBytes as aC, isVarInt as aD, publishDoneStatusCodeFromBigInt as aE, publishErrorCodeFromBigInt as aF, publishNamespaceErrorCodeFromBigInt as aG, setupParameterTypeFromNumber as aH, subscribeErrorCodeFromBigInt as aI, subscribeNamespaceErrorCodeFromBigInt as aJ, tokenAliasTypeFromNumber as aK, trackStatusCodeFromBigInt as aL, versionSpecificParameterTypeFromNumber as aM, SubgroupObject as aa, Subscribe as ab, SubscribeError as ac, SubscribeErrorCode as ad, SubscribeNamespace as ae, SubscribeNamespaceError as af, SubscribeNamespaceErrorCode as ag, SubscribeNamespaceOk as ah, SubscribeOk as ai, SubscribeUpdate as aj, TokenAliasType as ak, TrackStatus as al, TrackStatusCode as am, TrackStatusError as an, TrackStatusOk as ao, Tuple as ap, TupleField as aq, Unsubscribe as ar, UnsubscribeNamespace as as, VersionSpecificParameter as at, VersionSpecificParameterType as au, VersionSpecificParameters as av, commonTypeFromNumber as aw, controlMessageTypeFromBigInt as ax, fetchErrorCodeFromBigInt as ay, fetchTypeFromBigInt as az, ByteBuffer as b, CommonType as c, ControlMessage as d, ControlMessageType as e, DatagramObject as f, DatagramStatus as g, DeliveryTimeout as h, FetchCancel as i, FetchError as j, FetchErrorCode as k, FetchHeader as l, FetchHeaderType as m, FetchObject as n, FetchOk as o, FetchType as p, FilterType as q, FrozenByteBuffer as r, FullTrackName as s, GroupOrder as t, MAX_NAMESPACE_TUPLE_COUNT as u, MAX_REASON_PHRASE_LEN as v, MaxAuthTokenCacheSize as w, MaxCacheDuration as x, MaxRequestId$1 as y, MaxRequestId as z };
|
|
2724
|
+
export { ObjectStatus as $, type AuthTokenVariant as A, BaseByteBuffer as B, ClientSetup as C, Datagram as D, EndOfRangeKind as E, Fetch as F, GoAway as G, Header as H, ImmutableExtensionsExtension as I, MAX_REASON_PHRASE_LEN as J, KeyValuePair as K, LOCHeaderExtensionId as L, MAX_FULL_TRACK_NAME_LENGTH as M, MaxAuthTokenCacheSize as N, MaxCacheDurationExtension as O, MaxRequestId$1 as P, MaxRequestId as Q, MessageParameter as R, MessageParameterType as S, MessageParameters as T, MoqtObject as U, Namespace as V, NamespaceDone as W, NamespaceSubscribeOptions as X, NewGroupRequest as Y, ObjectDatagramType as Z, ObjectForwardingPreference as _, AuthorizationToken as a, type Parameter as a0, Path as a1, Publish as a2, PublishDone as a3, PublishDoneStatusCode as a4, PublishNamespace as a5, PublishNamespaceCancel as a6, PublishNamespaceDone as a7, PublishOk as a8, ReasonPhrase as a9, UnknownTrackExtension as aA, Unsubscribe as aB, UnsubscribeNamespace as aC, applyMessageParameterUpdate as aD, controlMessageTypeFromBigInt as aE, fetchTypeFromBigInt as aF, filterTypeFromBigInt as aG, groupOrderFromNumber as aH, isBytes as aI, isVarInt as aJ, locHeaderExtensionIdFromNumber as aK, messageParameterTypeFromNumber as aL, publishDoneStatusCodeFromBigInt as aM, requestErrorCodeFromBigInt as aN, setupParameterTypeFromNumber as aO, tokenAliasTypeFromNumber as aP, trackStatusCodeFromBigInt as aQ, RequestError as aa, RequestErrorCode as ab, RequestIdMap as ac, RequestOk as ad, RequestUpdate as ae, RequestsBlocked as af, SUPPORTED_VERSIONS as ag, ServerSetup as ah, SetupParameter as ai, SetupParameterType as aj, SetupParameters as ak, SubgroupHeader as al, SubgroupHeaderType as am, SubgroupObject as an, Subscribe as ao, SubscribeNamespace as ap, SubscribeOk as aq, SubscriberPriority as ar, SubscriptionFilter as as, TokenAliasType as at, TrackExtension as au, TrackExtensionType as av, TrackStatus as aw, TrackStatusCode as ax, Tuple as ay, TupleField as az, ByteBuffer as b, ControlMessage as c, ControlMessageType as d, DefaultPublisherGroupOrderExtension as e, DefaultPublisherPriorityExtension as f, DeliveryTimeout as g, DeliveryTimeoutExtension as h, DynamicGroupsExtension as i, Expires as j, FetchCancel as k, FetchHeader as l, FetchHeaderType as m, FetchObject as n, type FetchObjectContext as o, FetchOk as p, FetchType as q, FilterType as r, Forward as s, FrozenByteBuffer as t, FullTrackName as u, GroupOrder as v, GroupOrderParam as w, LargestObject as x, Location as y, MAX_NAMESPACE_TUPLE_COUNT as z };
|