@caprid/moq-core 0.0.0 → 0.1.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/LICENSE +20 -0
- package/NOTICE +5 -0
- package/README.md +37 -2
- package/UPSTREAM.json +38 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol/bytes.d.ts +59 -0
- package/dist/protocol/bytes.d.ts.map +1 -0
- package/dist/protocol/bytes.js +211 -0
- package/dist/protocol/bytes.js.map +1 -0
- package/dist/protocol/control-messages.d.ts +560 -0
- package/dist/protocol/control-messages.d.ts.map +1 -0
- package/dist/protocol/control-messages.js +1146 -0
- package/dist/protocol/control-messages.js.map +1 -0
- package/dist/protocol/errors.d.ts +64 -0
- package/dist/protocol/errors.d.ts.map +1 -0
- package/dist/protocol/errors.js +67 -0
- package/dist/protocol/errors.js.map +1 -0
- package/dist/protocol/object-stream.d.ts +133 -0
- package/dist/protocol/object-stream.d.ts.map +1 -0
- package/dist/protocol/object-stream.js +265 -0
- package/dist/protocol/object-stream.js.map +1 -0
- package/dist/protocol/publish-session.d.ts +196 -0
- package/dist/protocol/publish-session.d.ts.map +1 -0
- package/dist/protocol/publish-session.js +1174 -0
- package/dist/protocol/publish-session.js.map +1 -0
- package/dist/protocol/request-stream.d.ts +51 -0
- package/dist/protocol/request-stream.d.ts.map +1 -0
- package/dist/protocol/request-stream.js +94 -0
- package/dist/protocol/request-stream.js.map +1 -0
- package/dist/protocol/session.d.ts +340 -0
- package/dist/protocol/session.d.ts.map +1 -0
- package/dist/protocol/session.js +908 -0
- package/dist/protocol/session.js.map +1 -0
- package/dist/protocol/stream-reset.d.ts +10 -0
- package/dist/protocol/stream-reset.d.ts.map +1 -0
- package/dist/protocol/stream-reset.js +24 -0
- package/dist/protocol/stream-reset.js.map +1 -0
- package/dist/protocol/subgroup-writer.d.ts +67 -0
- package/dist/protocol/subgroup-writer.d.ts.map +1 -0
- package/dist/protocol/subgroup-writer.js +172 -0
- package/dist/protocol/subgroup-writer.js.map +1 -0
- package/dist/protocol/transport-error.d.ts +29 -0
- package/dist/protocol/transport-error.d.ts.map +1 -0
- package/dist/protocol/transport-error.js +39 -0
- package/dist/protocol/transport-error.js.map +1 -0
- package/dist/protocol/varint.d.ts +20 -0
- package/dist/protocol/varint.d.ts.map +1 -0
- package/dist/protocol/varint.js +99 -0
- package/dist/protocol/varint.js.map +1 -0
- package/dist/track-source.d.ts +13 -0
- package/dist/track-source.d.ts.map +1 -0
- package/dist/track-source.js +2 -0
- package/dist/track-source.js.map +1 -0
- package/package.json +31 -4
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MOQT control-message wire codecs (moq-transport draft-22 §9).
|
|
3
|
+
*
|
|
4
|
+
* Every control or request-stream message is framed as:
|
|
5
|
+
*
|
|
6
|
+
* MOQT Control Message {
|
|
7
|
+
* Message Type (vi64),
|
|
8
|
+
* Message Length (16),
|
|
9
|
+
* Message Body (..),
|
|
10
|
+
* }
|
|
11
|
+
*
|
|
12
|
+
* Scope follows the subscribe-only engine: the encoders cover what a subscriber sends (SETUP, SUBSCRIBE, FETCH,
|
|
13
|
+
* TRACK_STATUS, SUBSCRIBE_NAMESPACE, REQUEST_UPDATE, GOAWAY, and REQUEST_OK / REQUEST_ERROR responses to incoming
|
|
14
|
+
* PUBLISH); the decoders cover what it receives. All draft-version specifics live in this directory — this is the
|
|
15
|
+
* churn-absorption layer for pre-WGLC drafts.
|
|
16
|
+
*
|
|
17
|
+
* Where the draft text and the deployed relay (moq-relay, moq-dev/moq) disagree on a wire detail, the codec follows the
|
|
18
|
+
* relay and says so at the site — interop is with the relay, not the prose.
|
|
19
|
+
*
|
|
20
|
+
* Namespace fields and track names are byte strings on the wire; this codec surfaces them as UTF-8 `string`s, which is
|
|
21
|
+
* what MSF (the streaming format this engine speaks) constrains them to.
|
|
22
|
+
*/
|
|
23
|
+
import { ByteReader, ByteWriter } from './bytes.js';
|
|
24
|
+
/**
|
|
25
|
+
* ALPN / WebTransport protocol identifiers the core implements, in the order a client offers them (§6.2: `moqt-` plus
|
|
26
|
+
* the draft number). Version negotiation happens at connection time (`WT-Available-Protocols` in WebTransport, ALPN in
|
|
27
|
+
* native QUIC) — not in SETUP. Draft-22 is the default; draft-20 stays as a fallback for a peer that does not speak
|
|
28
|
+
* draft-22. The two differ on the wire only in the LOCATION_FILTER parameter (§9.20.9), so one codec serves both, and
|
|
29
|
+
* every function that encodes or decodes message parameters takes the negotiated identifier.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MOQT_PROTOCOL_IDS: readonly ["moqt-22", "moqt-20"];
|
|
32
|
+
/** A protocol identifier the core implements. */
|
|
33
|
+
export type MoqtProtocolId = (typeof MOQT_PROTOCOL_IDS)[number];
|
|
34
|
+
/** The preferred protocol identifier, and the codec's default when a caller names none. */
|
|
35
|
+
export declare const MOQT_PROTOCOL_ID: MoqtProtocolId;
|
|
36
|
+
/**
|
|
37
|
+
* The codec for a transport's negotiated `protocol`. The SDK's connecting layer refuses any protocol outside
|
|
38
|
+
* `MOQT_PROTOCOL_IDS` before a session starts (spec/transport-adapter.md TA-8), so a value outside it here (a test
|
|
39
|
+
* transport, or an embedder's transport that cannot report one) gets the default, `moqt-22`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveMoqtProtocol(protocol: string | undefined): MoqtProtocolId;
|
|
42
|
+
/** Control/request message type codes (§9, Table 5). */
|
|
43
|
+
export declare const MESSAGE_TYPE: {
|
|
44
|
+
readonly SETUP: 12032;
|
|
45
|
+
readonly GOAWAY: 16;
|
|
46
|
+
readonly SUBSCRIBE: 3;
|
|
47
|
+
readonly SUBSCRIBE_OK: 4;
|
|
48
|
+
readonly REQUEST_ERROR: 5;
|
|
49
|
+
readonly PUBLISH_NAMESPACE: 6;
|
|
50
|
+
readonly REQUEST_OK: 7;
|
|
51
|
+
readonly NAMESPACE: 8;
|
|
52
|
+
readonly PUBLISH_DONE: 11;
|
|
53
|
+
readonly TRACK_STATUS: 13;
|
|
54
|
+
readonly NAMESPACE_DONE: 14;
|
|
55
|
+
readonly PUBLISH_SKIPPED: 15;
|
|
56
|
+
readonly FETCH: 22;
|
|
57
|
+
readonly FETCH_OK: 24;
|
|
58
|
+
readonly PUBLISH: 29;
|
|
59
|
+
readonly PUBLISH_STATE_NOTIFY: 34;
|
|
60
|
+
readonly REQUEST_UPDATE: 2;
|
|
61
|
+
readonly SUBSCRIBE_NAMESPACE: 80;
|
|
62
|
+
readonly SUBSCRIBE_TRACKS: 81;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Setup Option types (§9.1). A namespace separate from message parameters. A session sends
|
|
66
|
+
* options of these types through its `setupOptions` config, beside the MOQT_IMPLEMENTATION it adds
|
|
67
|
+
* itself.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SETUP_OPTION: {
|
|
70
|
+
/** The endpoint's path and query, sent only on native QUIC (§9.1.2). */
|
|
71
|
+
readonly PATH: 1;
|
|
72
|
+
/** A token authorizing the session (§9.1.4). */
|
|
73
|
+
readonly AUTHORIZATION_TOKEN: 3;
|
|
74
|
+
/** How many bytes of registered tokens the sender will cache (§9.1.3). */
|
|
75
|
+
readonly MAX_AUTH_TOKEN_CACHE_SIZE: 4;
|
|
76
|
+
/** The endpoint's host and port, sent only on native QUIC (§9.1.1). */
|
|
77
|
+
readonly AUTHORITY: 5;
|
|
78
|
+
/** The most ranges the sender accepts in one location filter (§9.1.6). */
|
|
79
|
+
readonly MAX_FILTER_RANGES: 6;
|
|
80
|
+
/** The sender's implementation name (§9.1.5). */
|
|
81
|
+
readonly MOQT_IMPLEMENTATION: 7;
|
|
82
|
+
/** The most REQUEST_UPDATE messages the sender accepts unanswered on one request stream (§9.1.7). */
|
|
83
|
+
readonly MAX_REQUEST_UPDATES: 8;
|
|
84
|
+
/**
|
|
85
|
+
* The MoQ Solicit extension (draft-lcurley-moq-solicit-00), not a draft-22 option: `1` asks the peer to advertise
|
|
86
|
+
* namespaces only on a SUBSCRIBE_NAMESPACE, never as unsolicited PUBLISH_NAMESPACE. moq-relay honors it from 0.17.0.
|
|
87
|
+
* Even, so the value is a bare varint.
|
|
88
|
+
*/
|
|
89
|
+
readonly SOLICIT: 265050;
|
|
90
|
+
};
|
|
91
|
+
/** Message parameter types (§9.20, §16.7). */
|
|
92
|
+
export declare const PARAMETER_TYPE: {
|
|
93
|
+
readonly OBJECT_DELIVERY_TIMEOUT: 2;
|
|
94
|
+
readonly AUTHORIZATION_TOKEN: 3;
|
|
95
|
+
readonly RENDEZVOUS_TIMEOUT: 4;
|
|
96
|
+
readonly SUBGROUP_DELIVERY_TIMEOUT: 6;
|
|
97
|
+
readonly EXPIRES: 8;
|
|
98
|
+
readonly LARGEST_OBJECT: 9;
|
|
99
|
+
readonly FILL_TIMEOUT: 10;
|
|
100
|
+
readonly FORWARD: 16;
|
|
101
|
+
readonly SUBSCRIBER_PRIORITY: 32;
|
|
102
|
+
readonly LOCATION_FILTER: 33;
|
|
103
|
+
readonly GROUP_ORDER: 34;
|
|
104
|
+
readonly FILL_PARAMETERS: 35;
|
|
105
|
+
readonly SUBGROUP_FILTER: 37;
|
|
106
|
+
readonly OBJECTID_FILTER: 38;
|
|
107
|
+
readonly PRIORITY_FILTER: 39;
|
|
108
|
+
readonly OBJECT_PROPERTY_FILTER: 40;
|
|
109
|
+
readonly TRACK_PROPERTY_FILTER: 41;
|
|
110
|
+
readonly NEW_GROUP_REQUEST: 50;
|
|
111
|
+
readonly TRACK_NAMESPACE_PREFIX: 52;
|
|
112
|
+
readonly INCLUDE_PROPERTIES: 53;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Track Property types (§9.7) — the KVP block trailing SUBSCRIBE_OK / PUBLISH / FETCH_OK. A registry of its own,
|
|
116
|
+
* distinct from both Setup Options and message parameters.
|
|
117
|
+
*/
|
|
118
|
+
export declare const TRACK_PROPERTY: {
|
|
119
|
+
/**
|
|
120
|
+
* Units-per-second for the track's object TIMESTAMP extensions. Declaring it in SUBSCRIBE_OK is what opts the track
|
|
121
|
+
* into timestamp forwarding on moq-lite-rs relays — without it they parse and discard the extensions and re-stamp
|
|
122
|
+
* frames on arrival.
|
|
123
|
+
*/
|
|
124
|
+
readonly TIMESCALE: 8;
|
|
125
|
+
};
|
|
126
|
+
/** REQUEST_ERROR codes (§16.11.2). */
|
|
127
|
+
export declare const REQUEST_ERROR_CODE: {
|
|
128
|
+
/** An implementation-specific or otherwise unclassified error. */
|
|
129
|
+
readonly INTERNAL_ERROR: 0;
|
|
130
|
+
/** The requester is not authorized for this request. */
|
|
131
|
+
readonly UNAUTHORIZED: 1;
|
|
132
|
+
/** The responder could not complete the request in time. */
|
|
133
|
+
readonly TIMEOUT: 2;
|
|
134
|
+
/** The responder does not support this request. */
|
|
135
|
+
readonly NOT_SUPPORTED: 3;
|
|
136
|
+
/** An authorization token could not be parsed. */
|
|
137
|
+
readonly MALFORMED_AUTH_TOKEN: 4;
|
|
138
|
+
/** An authorization token has expired. */
|
|
139
|
+
readonly EXPIRED_AUTH_TOKEN: 5;
|
|
140
|
+
/** The responder is going away and takes no new requests. */
|
|
141
|
+
readonly GOING_AWAY: 6;
|
|
142
|
+
/** The responder is overloaded. */
|
|
143
|
+
readonly EXCESSIVE_LOAD: 9;
|
|
144
|
+
/** The requested track or namespace does not exist (yet). */
|
|
145
|
+
readonly DOES_NOT_EXIST: 16;
|
|
146
|
+
/** The requested range is invalid. */
|
|
147
|
+
readonly INVALID_RANGE: 17;
|
|
148
|
+
/** The track is malformed and cannot be served as requested. */
|
|
149
|
+
readonly MALFORMED_TRACK: 18;
|
|
150
|
+
/** The responder is not interested in what was offered. */
|
|
151
|
+
readonly UNINTERESTED: 32;
|
|
152
|
+
/** The namespace prefix overlaps one already requested. */
|
|
153
|
+
readonly PREFIX_OVERLAP: 48;
|
|
154
|
+
/** The track namespace is too large. */
|
|
155
|
+
readonly NAMESPACE_TOO_LARGE: 49;
|
|
156
|
+
/** The request needs an extension the responder does not support. */
|
|
157
|
+
readonly UNSUPPORTED_EXTENSION: 51;
|
|
158
|
+
/** The request should be made elsewhere; REQUEST_ERROR carries a {@link Redirect}. */
|
|
159
|
+
readonly REDIRECT: 52;
|
|
160
|
+
/** The request's filters conflict with each other. */
|
|
161
|
+
readonly CONFLICTING_FILTERS: 53;
|
|
162
|
+
/** A filter in the request is invalid. */
|
|
163
|
+
readonly INVALID_FILTER: 54;
|
|
164
|
+
};
|
|
165
|
+
/** PUBLISH_DONE status codes (§12.4). */
|
|
166
|
+
export declare const PUBLISH_DONE_STATUS: {
|
|
167
|
+
/** An implementation-specific or otherwise unclassified error. */
|
|
168
|
+
readonly INTERNAL_ERROR: 0;
|
|
169
|
+
/** The subscriber is no longer authorized. */
|
|
170
|
+
readonly UNAUTHORIZED: 1;
|
|
171
|
+
/** The track ended. */
|
|
172
|
+
readonly TRACK_ENDED: 2;
|
|
173
|
+
/** The publisher or relay is going away. */
|
|
174
|
+
readonly GOING_AWAY: 4;
|
|
175
|
+
/** The subscriber fell too far behind the track. */
|
|
176
|
+
readonly TOO_FAR_BEHIND: 5;
|
|
177
|
+
/** The subscription expired. */
|
|
178
|
+
readonly EXPIRED: 6;
|
|
179
|
+
/** A REQUEST_UPDATE for the subscription could not be applied. */
|
|
180
|
+
readonly UPDATE_FAILED: 8;
|
|
181
|
+
/** The publisher or relay is overloaded. */
|
|
182
|
+
readonly EXCESSIVE_LOAD: 9;
|
|
183
|
+
/** The track is malformed. */
|
|
184
|
+
readonly MALFORMED_TRACK: 18;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Whether a failed request is worth re-issuing unchanged after a backoff. The transient family (`DOES_NOT_EXIST` while
|
|
188
|
+
* a broadcast has not started, `TIMEOUT`, `INTERNAL_ERROR`, overload, `GOING_AWAY`) reflects relay or publisher _state_
|
|
189
|
+
* that time can fix; the permanent family reflects the request itself and loops forever if retried.
|
|
190
|
+
*/
|
|
191
|
+
export declare function isRetryableRequestErrorCode(errorCode: number): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether a subscription that ended with PUBLISH_DONE `statusCode` is worth re-subscribing. Every status but the
|
|
194
|
+
* permanent ones (`UNAUTHORIZED`, `EXPIRED`, `MALFORMED_TRACK`) is.
|
|
195
|
+
*/
|
|
196
|
+
export declare function isRetryablePublishDoneStatus(statusCode: number): boolean;
|
|
197
|
+
/** Stream reset / STOP_SENDING error codes (§12.5). */
|
|
198
|
+
export declare const STREAM_RESET_CODE: {
|
|
199
|
+
readonly INTERNAL_ERROR: 0;
|
|
200
|
+
readonly CANCELLED: 1;
|
|
201
|
+
readonly DELIVERY_TIMEOUT: 2;
|
|
202
|
+
readonly SESSION_CLOSED: 3;
|
|
203
|
+
readonly GOING_AWAY: 4;
|
|
204
|
+
readonly TOO_FAR_BEHIND: 5;
|
|
205
|
+
readonly UNKNOWN_OBJECT_STATUS: 6;
|
|
206
|
+
readonly EXPIRED_AUTH_TOKEN: 7;
|
|
207
|
+
readonly EXCESSIVE_LOAD: 9;
|
|
208
|
+
readonly MALFORMED_TRACK: 18;
|
|
209
|
+
};
|
|
210
|
+
/** Maximum body size — the frame length field is 16 bits. */
|
|
211
|
+
export declare const MAX_CONTROL_MESSAGE_LENGTH = 65535;
|
|
212
|
+
/** Most fields a track namespace may have; the codec rejects longer namespaces with `MoqtProtocolError`. */
|
|
213
|
+
export declare const MAX_NAMESPACE_FIELDS = 32;
|
|
214
|
+
/** A particular Object in a Group within a Track (§8.2). */
|
|
215
|
+
export interface Location {
|
|
216
|
+
/** Group ID. */
|
|
217
|
+
group: number;
|
|
218
|
+
/** Object ID within the group. */
|
|
219
|
+
object: number;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Compare two Locations in Location order (§8.2): group first, then object. Negative when `a` precedes `b`, zero when
|
|
223
|
+
* they are equal, positive when `a` follows `b`, so it sorts with `Array.prototype.sort`.
|
|
224
|
+
*/
|
|
225
|
+
export declare function compareLocations(a: Location, b: Location): number;
|
|
226
|
+
/** Track namespace as an ordered tuple of UTF-8 fields. Byte strings on the wire; MSF constrains them to UTF-8 text. */
|
|
227
|
+
export type TrackNamespace = string[];
|
|
228
|
+
export interface FullTrackName {
|
|
229
|
+
namespace: TrackNamespace;
|
|
230
|
+
name: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* A generic MOQT Key-Value-Pair. Even types carry a varint value, odd types a byte field. Used for Setup Options and
|
|
234
|
+
* Track/Object Properties (message parameters use per-type encodings instead — see `MessageParameters`).
|
|
235
|
+
*/
|
|
236
|
+
export interface KeyValuePair {
|
|
237
|
+
/** Key type; its parity selects the value form. */
|
|
238
|
+
type: number;
|
|
239
|
+
/** A varint `number` for an even `type`, a byte field for an odd one. */
|
|
240
|
+
value: number | Uint8Array;
|
|
241
|
+
}
|
|
242
|
+
/** Serialize pairs in ascending type order with delta-encoded types. */
|
|
243
|
+
export declare function encodeKeyValuePairs(writer: ByteWriter, pairs: readonly KeyValuePair[]): void;
|
|
244
|
+
/** Parse pairs until `reader` reaches `endOffset` (KVP blocks are length-bounded). */
|
|
245
|
+
export declare function decodeKeyValuePairs(reader: ByteReader, endOffset: number): KeyValuePair[];
|
|
246
|
+
/**
|
|
247
|
+
* Which Objects a subscription or fetch covers. Draft-22 opens the LOCATION_FILTER value with a Location Filter Type
|
|
248
|
+
* that selects the fields after it; draft-20 length-prefixes up to four varints (StartGroup, StartObject,
|
|
249
|
+
* EndGroupDelta, EndObject) and the number present selects the meaning. The variants mean the same on both:
|
|
250
|
+
*
|
|
251
|
+
* - `none` — no location constraint, the same as sending no LOCATION_FILTER at all (type 0x00; zero fields on
|
|
252
|
+
* draft-20). A fetch covers `{0,0}` up to Largest Object. A subscription passes all Objects published or received via
|
|
253
|
+
* upstream subscriptions; the draft does not say whether that reaches back into Objects a relay cached before the
|
|
254
|
+
* subscription, so what an ongoing track delivers is the relay's choice, and a relay may start at the live edge.
|
|
255
|
+
* `relative-group` and `absolute` ask for earlier groups explicitly. In REQUEST_UPDATE it clears the filter.
|
|
256
|
+
* - `relative-group` — start at `{Largest.Group + 1 − groupsBeforeNext, 0}`, open-ended: `0` is the next group, `1` the
|
|
257
|
+
* start of the current group (a decodable join), `N` N−1 groups before it (type 0x01; one field on draft-20).
|
|
258
|
+
* - `next-object` — `{Largest.Group, Largest.Object + 1}`, the live edge, which can begin mid-group (type 0x05; the
|
|
259
|
+
* two-field spelling `{0,0}` on draft-20).
|
|
260
|
+
* - `absolute` — an explicit start, optionally bounded by an end group (delta from the start group, whole group
|
|
261
|
+
* included unless `endObject` narrows it) (types 0x02 to 0x04; two to four fields on draft-20). On draft-20 an
|
|
262
|
+
* open-ended absolute `{0,0}` is unfiltered by definition and encodes as `none`, since its two-field spelling reads as
|
|
263
|
+
* `next-object`; draft-22 has a spelling for it.
|
|
264
|
+
*/
|
|
265
|
+
export type LocationFilter = {
|
|
266
|
+
/** No location constraint. */
|
|
267
|
+
type: 'none';
|
|
268
|
+
} | {
|
|
269
|
+
/** Start at the live edge, the Object after Largest Object. */
|
|
270
|
+
type: 'next-object';
|
|
271
|
+
} | {
|
|
272
|
+
/** Start a number of groups back from the next group. */
|
|
273
|
+
type: 'relative-group';
|
|
274
|
+
/** `0` for the next group, `1` for the start of the current group, `N` for N−1 groups before it. */
|
|
275
|
+
groupsBeforeNext: number;
|
|
276
|
+
} | {
|
|
277
|
+
/** Start at an explicit Location. */
|
|
278
|
+
type: 'absolute';
|
|
279
|
+
/** First Location covered. */
|
|
280
|
+
start: Location;
|
|
281
|
+
/** End group as a delta from `start.group`; absent leaves the filter open-ended. */
|
|
282
|
+
endGroupDelta?: number;
|
|
283
|
+
/** Last Object ID covered in the end group; requires `endGroupDelta`. Absent covers the whole end group. */
|
|
284
|
+
endObject?: number;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Serialize a filter as the LOCATION_FILTER parameter's value as it follows the Parameter Type: on draft-22 the
|
|
288
|
+
* Location Filter Type and the fields it selects, on draft-20 the field list without its length prefix.
|
|
289
|
+
*/
|
|
290
|
+
export declare function encodeLocationFilter(filter: LocationFilter, protocol?: MoqtProtocolId): Uint8Array;
|
|
291
|
+
/** Decode a LOCATION_FILTER value as `encodeLocationFilter` produces it; every byte must belong to the filter. */
|
|
292
|
+
export declare function decodeLocationFilter(bytes: Uint8Array, protocol?: MoqtProtocolId): LocationFilter;
|
|
293
|
+
/**
|
|
294
|
+
* Whether a Location filter, evaluated with the fetch rules of §9.20.9, selects no Objects. A fetch range, and so a
|
|
295
|
+
* subscription's fill range (§3.4), never extends beyond Largest Object: with no Largest Object nothing exists to fetch,
|
|
296
|
+
* the Next Object and the Next Group both lie past it, an absolute start past it selects nothing, and a bounded
|
|
297
|
+
* absolute range whose end precedes its start is empty. A publisher opens no fill fetch stream for an empty range.
|
|
298
|
+
*
|
|
299
|
+
* @param filter - The fill range's filter: the one inside FILL_PARAMETERS, else the subscription's, else `none`.
|
|
300
|
+
* @param largestObject - The track's Largest Object, `undefined` when nothing has been published yet.
|
|
301
|
+
*/
|
|
302
|
+
export declare function isEmptyFetchRange(filter: LocationFilter, largestObject: Location | undefined): boolean;
|
|
303
|
+
/** GROUP_ORDER: the order in which the publisher delivers groups. */
|
|
304
|
+
export type GroupOrder = 'ascending' | 'descending';
|
|
305
|
+
/**
|
|
306
|
+
* Decoded message parameters. Unlike Setup Options, message parameters use per-type encodings (uint8 / varint /
|
|
307
|
+
* length-prefixed), so the codec is registry-driven. Per §9.20 an unknown parameter type is a PROTOCOL_VIOLATION
|
|
308
|
+
* (parameters cannot be skipped — the block is bounded by count, not length).
|
|
309
|
+
*/
|
|
310
|
+
export interface MessageParameters {
|
|
311
|
+
/** OBJECT_DELIVERY_TIMEOUT value. */
|
|
312
|
+
objectDeliveryTimeout?: number;
|
|
313
|
+
/** SUBGROUP_DELIVERY_TIMEOUT value. */
|
|
314
|
+
subgroupDeliveryTimeout?: number;
|
|
315
|
+
/** RENDEZVOUS_TIMEOUT value. */
|
|
316
|
+
rendezvousTimeout?: number;
|
|
317
|
+
/** FILL_TIMEOUT value. */
|
|
318
|
+
fillTimeout?: number;
|
|
319
|
+
/** Serialized Token structures (§9.20.2). May repeat. */
|
|
320
|
+
authorizationTokens?: Uint8Array[];
|
|
321
|
+
/** EXPIRES value. */
|
|
322
|
+
expires?: number;
|
|
323
|
+
/** LARGEST_OBJECT: the largest Location the responder has for the track. */
|
|
324
|
+
largestObject?: Location;
|
|
325
|
+
/** FORWARD: `1` to send Objects for the subscription, `0` to hold them. */
|
|
326
|
+
forward?: 0 | 1;
|
|
327
|
+
/** SUBSCRIBER_PRIORITY, a single byte. */
|
|
328
|
+
subscriberPriority?: number;
|
|
329
|
+
/** LOCATION_FILTER: which Objects the request covers. */
|
|
330
|
+
locationFilter?: LocationFilter;
|
|
331
|
+
/** GROUP_ORDER: the order the requester wants groups delivered in. */
|
|
332
|
+
groupOrder?: GroupOrder;
|
|
333
|
+
/**
|
|
334
|
+
* FILL_PARAMETERS (§9.20.15): asks the publisher to deliver a fill range on a fetch stream alongside the subscription
|
|
335
|
+
* — its presence alone requests the fill. A nested parameter scope: only the fill-scoped subset is legal inside, and
|
|
336
|
+
* omitted entries inherit the subscription's own values.
|
|
337
|
+
*/
|
|
338
|
+
fillParameters?: FillParameters;
|
|
339
|
+
/** NEW_GROUP_REQUEST value. */
|
|
340
|
+
newGroupRequest?: number;
|
|
341
|
+
/** Range-filter parameters (§3.3.2), kept opaque — the engine never sends or interprets them. */
|
|
342
|
+
rangeFilters?: {
|
|
343
|
+
/** Parameter type. */
|
|
344
|
+
type: number;
|
|
345
|
+
/** Encoded parameter value, without its length prefix. */
|
|
346
|
+
value: Uint8Array;
|
|
347
|
+
}[];
|
|
348
|
+
/** TRACK_NAMESPACE_PREFIX: the namespace prefix the request applies to. */
|
|
349
|
+
trackNamespacePrefix?: TrackNamespace;
|
|
350
|
+
/** INCLUDE_PROPERTIES (§9.20.21): `0` asks the responder to send empty Track Properties. Default `1`. */
|
|
351
|
+
includeProperties?: 0 | 1;
|
|
352
|
+
}
|
|
353
|
+
/** The parameters FILL_PARAMETERS may carry (§9.20.15, Table 7). */
|
|
354
|
+
export type FillParameters = Pick<MessageParameters, 'fillTimeout' | 'subscriberPriority' | 'locationFilter' | 'groupOrder' | 'rangeFilters'>;
|
|
355
|
+
type ParameterScope = 'message' | 'fill';
|
|
356
|
+
/**
|
|
357
|
+
* Serialize as `Number of Parameters (vi64)` + delta-typed parameter list. The `'fill'` scope is the nested list inside
|
|
358
|
+
* FILL_PARAMETERS, where only Table 7's types are legal.
|
|
359
|
+
*/
|
|
360
|
+
export declare function encodeMessageParameters(writer: ByteWriter, parameters?: MessageParameters, protocol?: MoqtProtocolId, scope?: ParameterScope): void;
|
|
361
|
+
export declare function decodeMessageParameters(reader: ByteReader, protocol?: MoqtProtocolId, scope?: ParameterScope): MessageParameters;
|
|
362
|
+
/**
|
|
363
|
+
* Serialize a Token structure with Alias Type USE_VALUE (0x3) — the stateless form the engine uses to attach an
|
|
364
|
+
* MSF-provided token to a request without alias registration.
|
|
365
|
+
*/
|
|
366
|
+
export declare function encodeAuthTokenUseValue(tokenType: number, value: Uint8Array): Uint8Array;
|
|
367
|
+
/** A decoded frame: message type + body bytes (not yet interpreted). */
|
|
368
|
+
export interface ControlMessageFrame {
|
|
369
|
+
type: number;
|
|
370
|
+
body: Uint8Array;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Incremental control-message deframer. Feed it stream chunks; it yields complete `ControlMessageFrame`s as they
|
|
374
|
+
* materialize. Used for both the control streams and request streams (same framing).
|
|
375
|
+
*/
|
|
376
|
+
export declare class ControlMessageDeframer {
|
|
377
|
+
#private;
|
|
378
|
+
push(chunk: Uint8Array): ControlMessageFrame[];
|
|
379
|
+
/** Bytes buffered but not yet forming a complete frame. */
|
|
380
|
+
get pendingBytes(): number;
|
|
381
|
+
}
|
|
382
|
+
/** SETUP (§9.1) — first message on the endpoint's control stream. */
|
|
383
|
+
export declare function encodeSetup(options?: readonly KeyValuePair[]): Uint8Array;
|
|
384
|
+
export interface SubscribeRequest {
|
|
385
|
+
requestId: number;
|
|
386
|
+
trackNamespace: TrackNamespace;
|
|
387
|
+
trackName: string;
|
|
388
|
+
parameters?: MessageParameters | undefined;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* FETCH (§9.11) has the SUBSCRIBE body: the range is `parameters.locationFilter`, evaluated with the fetch rules of
|
|
392
|
+
* §3.3.1 — relative starts count back from Largest Object, an omitted end stops there, and no filter means the whole
|
|
393
|
+
* track. Nothing selects "standalone" or "joining" any more; a join is a subscription with FILL_PARAMETERS.
|
|
394
|
+
*/
|
|
395
|
+
export type FetchRequest = SubscribeRequest;
|
|
396
|
+
/** SUBSCRIBE (§9.6) — first message on a new request stream. */
|
|
397
|
+
export declare function encodeSubscribe(request: SubscribeRequest, protocol?: MoqtProtocolId): Uint8Array;
|
|
398
|
+
/** TRACK_STATUS (§9.13) — identical wire format to SUBSCRIBE. */
|
|
399
|
+
export declare function encodeTrackStatus(request: SubscribeRequest, protocol?: MoqtProtocolId): Uint8Array;
|
|
400
|
+
/** FETCH (§9.11) — first message on a new request stream. */
|
|
401
|
+
export declare function encodeFetch(request: FetchRequest, protocol?: MoqtProtocolId): Uint8Array;
|
|
402
|
+
export interface SubscribeNamespaceRequest {
|
|
403
|
+
requestId: number;
|
|
404
|
+
trackNamespacePrefix: TrackNamespace;
|
|
405
|
+
parameters?: MessageParameters | undefined;
|
|
406
|
+
}
|
|
407
|
+
/** SUBSCRIBE_NAMESPACE (§9.15) — first message on a new request stream. */
|
|
408
|
+
export declare function encodeSubscribeNamespace(request: SubscribeNamespaceRequest, protocol?: MoqtProtocolId): Uint8Array;
|
|
409
|
+
/**
|
|
410
|
+
* REQUEST_UPDATE (§9.5) — sent on an existing request stream. `requestId` is the update's own, freshly allocated
|
|
411
|
+
* Request ID (§6.4.2.1 counts REQUEST_UPDATE among the messages that consume one); the stream identifies the request being
|
|
412
|
+
* updated.
|
|
413
|
+
*/
|
|
414
|
+
export declare function encodeRequestUpdate(requestId: number, parameters?: MessageParameters, protocol?: MoqtProtocolId): Uint8Array;
|
|
415
|
+
/**
|
|
416
|
+
* GOAWAY (§9.2). Clients MUST send a zero-length New Session URI, so the encoder takes only the timeout (milliseconds;
|
|
417
|
+
* 0 = no specific timeout).
|
|
418
|
+
*/
|
|
419
|
+
export declare function encodeGoaway(timeout?: number): Uint8Array;
|
|
420
|
+
/**
|
|
421
|
+
* REQUEST_OK (§9.3). The subscriber sends this to accept an incoming PUBLISH (PUBLISH_OK). Track Properties are always
|
|
422
|
+
* empty in that role, and since draft-20 so are the parameters — a subscriber changes subscription parameters with
|
|
423
|
+
* REQUEST_UPDATE, not in PUBLISH_OK (§9.8); the session driver's `accept()` therefore takes none. The parameter slot
|
|
424
|
+
* stays for the publisher-side roles of REQUEST_OK (TRACK_STATUS_OK, REQUEST_UPDATE_OK), which the fake peer in tests
|
|
425
|
+
* exercises.
|
|
426
|
+
*/
|
|
427
|
+
export declare function encodeRequestOk(parameters?: MessageParameters, protocol?: MoqtProtocolId): Uint8Array;
|
|
428
|
+
/** REQUEST_ERROR (§9.4) without a Redirect — enough to reject incoming requests. */
|
|
429
|
+
export declare function encodeRequestError(errorCode: number, reason?: string, retryInterval?: number): Uint8Array;
|
|
430
|
+
/** SUBSCRIBE_OK (§9.7). */
|
|
431
|
+
export declare function encodeSubscribeOk(trackAlias: number, parameters?: MessageParameters, trackProperties?: readonly KeyValuePair[], protocol?: MoqtProtocolId): Uint8Array;
|
|
432
|
+
/** PUBLISH_DONE (§9.9). */
|
|
433
|
+
export declare function encodePublishDone(statusCode: number, streamCount: number, reason?: string): Uint8Array;
|
|
434
|
+
/** PUBLISH_STATE_NOTIFY (§9.10) — the publisher's unilateral "these subscription parameters changed". */
|
|
435
|
+
export declare function encodePublishStateNotify(parameters?: MessageParameters, protocol?: MoqtProtocolId): Uint8Array;
|
|
436
|
+
/** FETCH_OK (§9.12). */
|
|
437
|
+
export declare function encodeFetchOk(endOfTrack: boolean, endLocation: Location, parameters?: MessageParameters, trackProperties?: readonly KeyValuePair[], protocol?: MoqtProtocolId): Uint8Array;
|
|
438
|
+
/** PUBLISH (§9.8). */
|
|
439
|
+
export declare function encodePublish(request: SubscribeRequest & {
|
|
440
|
+
trackAlias: number;
|
|
441
|
+
}, trackProperties?: readonly KeyValuePair[], protocol?: MoqtProtocolId): Uint8Array;
|
|
442
|
+
export interface PublishNamespaceRequest {
|
|
443
|
+
requestId: number;
|
|
444
|
+
trackNamespace: TrackNamespace;
|
|
445
|
+
parameters?: MessageParameters;
|
|
446
|
+
}
|
|
447
|
+
/** PUBLISH_NAMESPACE (§9.14) — a publisher announcing a namespace. */
|
|
448
|
+
export declare function encodePublishNamespace(request: PublishNamespaceRequest, protocol?: MoqtProtocolId): Uint8Array;
|
|
449
|
+
/**
|
|
450
|
+
* NAMESPACE (§9.16) — announce one namespace on an accepted inbound SUBSCRIBE_NAMESPACE request stream. The body is
|
|
451
|
+
* the namespace suffix relative to that stream's subscribed prefix and nothing else: peers bound-check the tuple
|
|
452
|
+
* against the frame length (moq-lite-rs treats even a zero parameter count as a malformed entry and kills the announce
|
|
453
|
+
* stream), so no parameter block is written.
|
|
454
|
+
*/
|
|
455
|
+
export declare function encodeNamespace(trackNamespaceSuffix: TrackNamespace): Uint8Array;
|
|
456
|
+
/** NAMESPACE_DONE (§9.17) — retract a NAMESPACE announcement (same body shape). */
|
|
457
|
+
export declare function encodeNamespaceDone(trackNamespaceSuffix: TrackNamespace): Uint8Array;
|
|
458
|
+
/** Where a REQUEST_ERROR with code `REDIRECT` sends the requester. */
|
|
459
|
+
export interface Redirect {
|
|
460
|
+
/** URI of the endpoint to make the request to. */
|
|
461
|
+
connectUri: string;
|
|
462
|
+
/** Track namespace to request there. */
|
|
463
|
+
trackNamespace: TrackNamespace;
|
|
464
|
+
/** Track name to request there. */
|
|
465
|
+
trackName: string;
|
|
466
|
+
}
|
|
467
|
+
export type ControlMessage = {
|
|
468
|
+
kind: 'setup';
|
|
469
|
+
options: KeyValuePair[];
|
|
470
|
+
} | {
|
|
471
|
+
kind: 'goaway';
|
|
472
|
+
newSessionUri: string;
|
|
473
|
+
timeout: number;
|
|
474
|
+
} | {
|
|
475
|
+
kind: 'subscribe';
|
|
476
|
+
requestId: number;
|
|
477
|
+
trackNamespace: TrackNamespace;
|
|
478
|
+
trackName: string;
|
|
479
|
+
parameters: MessageParameters;
|
|
480
|
+
} | {
|
|
481
|
+
kind: 'track-status';
|
|
482
|
+
requestId: number;
|
|
483
|
+
trackNamespace: TrackNamespace;
|
|
484
|
+
trackName: string;
|
|
485
|
+
parameters: MessageParameters;
|
|
486
|
+
} | {
|
|
487
|
+
kind: 'fetch';
|
|
488
|
+
request: FetchRequest & {
|
|
489
|
+
parameters: MessageParameters;
|
|
490
|
+
};
|
|
491
|
+
} | {
|
|
492
|
+
kind: 'subscribe-namespace';
|
|
493
|
+
requestId: number;
|
|
494
|
+
trackNamespacePrefix: TrackNamespace;
|
|
495
|
+
parameters: MessageParameters;
|
|
496
|
+
} | {
|
|
497
|
+
kind: 'subscribe-ok';
|
|
498
|
+
trackAlias: number;
|
|
499
|
+
parameters: MessageParameters;
|
|
500
|
+
trackProperties: KeyValuePair[];
|
|
501
|
+
} | {
|
|
502
|
+
kind: 'request-ok';
|
|
503
|
+
parameters: MessageParameters;
|
|
504
|
+
trackProperties: KeyValuePair[];
|
|
505
|
+
} | {
|
|
506
|
+
kind: 'request-error';
|
|
507
|
+
errorCode: number;
|
|
508
|
+
retryInterval: number;
|
|
509
|
+
reason: string;
|
|
510
|
+
redirect?: Redirect;
|
|
511
|
+
} | {
|
|
512
|
+
kind: 'request-update';
|
|
513
|
+
requestId: number;
|
|
514
|
+
parameters: MessageParameters;
|
|
515
|
+
} | {
|
|
516
|
+
kind: 'publish-state-notify';
|
|
517
|
+
parameters: MessageParameters;
|
|
518
|
+
} | {
|
|
519
|
+
kind: 'publish-done';
|
|
520
|
+
statusCode: number;
|
|
521
|
+
/** `undefined` when the publisher could not count its streams (the 2^64−1 sentinel, §9.9). */
|
|
522
|
+
streamCount: number | undefined;
|
|
523
|
+
reason: string;
|
|
524
|
+
} | {
|
|
525
|
+
kind: 'publish';
|
|
526
|
+
requestId: number;
|
|
527
|
+
trackNamespace: TrackNamespace;
|
|
528
|
+
trackName: string;
|
|
529
|
+
trackAlias: number;
|
|
530
|
+
parameters: MessageParameters;
|
|
531
|
+
trackProperties: KeyValuePair[];
|
|
532
|
+
} | {
|
|
533
|
+
kind: 'publish-namespace';
|
|
534
|
+
requestId: number;
|
|
535
|
+
trackNamespace: TrackNamespace;
|
|
536
|
+
parameters: MessageParameters;
|
|
537
|
+
} | {
|
|
538
|
+
kind: 'fetch-ok';
|
|
539
|
+
endOfTrack: boolean;
|
|
540
|
+
endLocation: Location;
|
|
541
|
+
parameters: MessageParameters;
|
|
542
|
+
trackProperties: KeyValuePair[];
|
|
543
|
+
} | {
|
|
544
|
+
kind: 'namespace';
|
|
545
|
+
trackNamespaceSuffix: TrackNamespace;
|
|
546
|
+
} | {
|
|
547
|
+
kind: 'namespace-done';
|
|
548
|
+
trackNamespaceSuffix: TrackNamespace;
|
|
549
|
+
} | {
|
|
550
|
+
kind: 'publish-skipped';
|
|
551
|
+
trackNamespaceSuffix: TrackNamespace;
|
|
552
|
+
trackName: string;
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* Decode one control-message frame into a typed message. Throws `MoqtProtocolError` for unknown message types (§9: "An
|
|
556
|
+
* endpoint that receives an unknown message type MUST close the session") and for malformed bodies.
|
|
557
|
+
*/
|
|
558
|
+
export declare function decodeControlMessage(frame: ControlMessageFrame, protocol?: MoqtProtocolId): ControlMessage;
|
|
559
|
+
export {};
|
|
560
|
+
//# sourceMappingURL=control-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-messages.d.ts","sourceRoot":"","sources":["../../src/protocol/control-messages.ts"],"names":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