@blockcast/mmt-transport 0.2.0 → 0.2.2-main.02dfe3276f87

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.
Files changed (149) hide show
  1. package/README.md +250 -0
  2. package/dist/.build-stamp +0 -0
  3. package/dist/abr-controller.d.ts +37 -4
  4. package/dist/abr-controller.d.ts.map +1 -1
  5. package/dist/abr-controller.js +71 -17
  6. package/dist/abr-controller.js.map +1 -1
  7. package/dist/amt-gateway.d.ts.map +1 -1
  8. package/dist/amt-gateway.js +5 -5
  9. package/dist/amt-gateway.js.map +1 -1
  10. package/dist/driad-discovery.d.ts.map +1 -1
  11. package/dist/driad-discovery.js +3 -6
  12. package/dist/driad-discovery.js.map +1 -1
  13. package/dist/endpoint-config.d.ts +88 -0
  14. package/dist/endpoint-config.d.ts.map +1 -0
  15. package/dist/endpoint-config.js +218 -0
  16. package/dist/endpoint-config.js.map +1 -0
  17. package/dist/index.d.ts +14 -5
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +13 -9
  20. package/dist/index.js.map +1 -1
  21. package/dist/mmt-transport.no-modules.js +1975 -0
  22. package/dist/mmt-transport.no-modules.js.map +7 -0
  23. package/dist/moqt-priority.d.ts +39 -0
  24. package/dist/moqt-priority.d.ts.map +1 -0
  25. package/dist/moqt-priority.js +41 -0
  26. package/dist/moqt-priority.js.map +1 -0
  27. package/dist/multicast-catalog-policy.d.ts +96 -0
  28. package/dist/multicast-catalog-policy.d.ts.map +1 -0
  29. package/dist/multicast-catalog-policy.js +660 -0
  30. package/dist/multicast-catalog-policy.js.map +1 -0
  31. package/dist/multicast-orchestrator.d.ts +80 -0
  32. package/dist/multicast-orchestrator.d.ts.map +1 -0
  33. package/dist/multicast-orchestrator.js +216 -0
  34. package/dist/multicast-orchestrator.js.map +1 -0
  35. package/dist/multicast-signaling-reconciler.d.ts +37 -0
  36. package/dist/multicast-signaling-reconciler.d.ts.map +1 -0
  37. package/dist/multicast-signaling-reconciler.js +161 -0
  38. package/dist/multicast-signaling-reconciler.js.map +1 -0
  39. package/dist/multicast-subscription-pool.d.ts +18 -0
  40. package/dist/multicast-subscription-pool.d.ts.map +1 -0
  41. package/dist/multicast-subscription-pool.js +157 -0
  42. package/dist/multicast-subscription-pool.js.map +1 -0
  43. package/dist/multicast-tier.d.ts +33 -0
  44. package/dist/multicast-tier.d.ts.map +1 -0
  45. package/dist/multicast-tier.js +39 -0
  46. package/dist/multicast-tier.js.map +1 -0
  47. package/dist/no-modules.d.ts +66 -0
  48. package/dist/no-modules.d.ts.map +1 -0
  49. package/dist/no-modules.js +62 -0
  50. package/dist/no-modules.js.map +1 -0
  51. package/dist/packet-batch.d.ts +13 -0
  52. package/dist/packet-batch.d.ts.map +1 -0
  53. package/dist/packet-batch.js +14 -0
  54. package/dist/packet-batch.js.map +1 -0
  55. package/dist/stall-detector.d.ts +32 -0
  56. package/dist/stall-detector.d.ts.map +1 -0
  57. package/dist/stall-detector.js +67 -0
  58. package/dist/stall-detector.js.map +1 -0
  59. package/dist/takeover.d.ts +52 -0
  60. package/dist/takeover.d.ts.map +1 -0
  61. package/dist/takeover.js +76 -0
  62. package/dist/takeover.js.map +1 -0
  63. package/dist/transport-manager.d.ts +49 -35
  64. package/dist/transport-manager.d.ts.map +1 -1
  65. package/dist/transport-manager.js +252 -164
  66. package/dist/transport-manager.js.map +1 -1
  67. package/dist/types.d.ts +128 -153
  68. package/dist/types.d.ts.map +1 -1
  69. package/dist/types.js +12 -50
  70. package/dist/types.js.map +1 -1
  71. package/dist/unicast-fallback.d.ts +36 -0
  72. package/dist/unicast-fallback.d.ts.map +1 -0
  73. package/dist/unicast-fallback.js +53 -0
  74. package/dist/unicast-fallback.js.map +1 -0
  75. package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
  76. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  77. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
  78. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
  79. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
  80. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
  81. package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
  82. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
  83. package/node_modules/@blockcast/mmt-base/README.md +134 -0
  84. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  85. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
  86. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
  87. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
  88. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
  89. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
  90. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
  91. package/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
  92. package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
  93. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
  94. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
  95. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
  96. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
  97. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
  98. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
  99. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
  100. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
  101. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
  102. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
  103. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
  104. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
  105. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
  106. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
  107. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
  108. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
  109. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
  110. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
  111. package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
  112. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
  113. package/node_modules/@blockcast/mmt-base/package.json +49 -0
  114. package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
  115. package/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
  116. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
  117. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
  118. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
  119. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
  120. package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
  121. package/package.json +16 -9
  122. package/src/abr-controller.ts +90 -17
  123. package/src/amt-gateway.ts +5 -6
  124. package/src/driad-discovery.ts +3 -6
  125. package/src/endpoint-config.ts +275 -0
  126. package/src/index.ts +126 -35
  127. package/src/moqt-priority.ts +51 -0
  128. package/src/multicast-catalog-policy.ts +753 -0
  129. package/src/multicast-orchestrator.ts +254 -0
  130. package/src/multicast-signaling-reconciler.ts +156 -0
  131. package/src/multicast-subscription-pool.ts +199 -0
  132. package/src/multicast-tier.ts +59 -0
  133. package/src/no-modules.ts +96 -0
  134. package/src/packet-batch.ts +17 -0
  135. package/src/stall-detector.ts +100 -0
  136. package/src/takeover.ts +109 -0
  137. package/src/transport-manager.ts +263 -183
  138. package/src/types.ts +146 -184
  139. package/src/unicast-fallback.ts +57 -0
  140. package/dist/fec-client.d.ts +0 -442
  141. package/dist/fec-client.d.ts.map +0 -1
  142. package/dist/fec-client.js +0 -784
  143. package/dist/fec-client.js.map +0 -1
  144. package/dist/fec-client.test.d.ts +0 -8
  145. package/dist/fec-client.test.d.ts.map +0 -1
  146. package/dist/fec-client.test.js +0 -112
  147. package/dist/fec-client.test.js.map +0 -1
  148. package/src/fec-client.test.ts +0 -140
  149. package/src/fec-client.ts +0 -1097
package/README.md ADDED
@@ -0,0 +1,250 @@
1
+ # @blockcast/mmt-transport
2
+
3
+ Unified transport manager for browser MoQ players. Picks the right transport per stream — MoQ over WebTransport (moqtail and moqlite/moq-lib wire protocols), SSM multicast via Direct Sockets in an Isolated Web App, AMT tunneling (RFC 7450) with DRIAD relay discovery (RFC 8777), and a WebSocket fallback — and keeps a progressive ABR controller and A/V `SharedClock` plumbed through every mode. WebTransport-first promotion means a tab connects immediately for fast channel select, then promotes in the background to native multicast where the platform supports it.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @blockcast/mmt-transport
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```ts
14
+ import {
15
+ TransportManager,
16
+ SharedClock,
17
+ catalogQualityLadder,
18
+ } from "@blockcast/mmt-transport"
19
+
20
+ const transport = new TransportManager()
21
+ const clock = new SharedClock()
22
+
23
+ transport.setPacketCallback((data) => {
24
+ // Hand raw packets to @blockcast/mmt-container. Container/FEC state stays
25
+ // downstream of transport selection.
26
+ router.processPacket(new Uint8Array(data), "multicast")
27
+ })
28
+
29
+ transport.setStateCallback((s) => console.log("[transport] mode=", s.mode))
30
+
31
+ // ABR adapts over the stream's own renditions and nothing else: there is no
32
+ // built-in ladder. One rung per catalog video rendition, under its catalog
33
+ // name (e.g. "video/720p"), costed at its catalog bitrate; `catalog` is the
34
+ // stream's catalog. Throws if a rendition states no bitrate (see ABR ladder).
35
+ const abrLadder = catalogQualityLadder(catalog) // use "audio" for an audio-only catalog
36
+
37
+ const connected = await transport.connect({
38
+ group: "232.1.1.1",
39
+ source: "203.0.113.10",
40
+ port: 5004,
41
+ streamType: "video",
42
+ amtRelay: undefined, // omit to let DRIAD discover one
43
+ driadEnabled: true,
44
+ abrLadder, // required; starts on its lowest bitrate
45
+ })
46
+ ```
47
+
48
+ The manager owns capability detection, transport selection, and the bandwidth/loss bookkeeping that drives ABR. It does not own the container, FEC, renderer, or MoQ session; it hands raw `ArrayBuffer` packets to the consumer wired through `setPacketCallback`.
49
+
50
+ ## Exports
51
+
52
+ | Path | Purpose |
53
+ |------|---------|
54
+ | `@blockcast/mmt-transport` | `TransportManager`, DRIAD, AMT, ABR, repair-track naming, types |
55
+ | `@blockcast/mmt-transport/clock` | `SharedClock`, `SYNC_TOLERANCE_US`, `PTS_OFFSET_US` |
56
+
57
+ The root export also re-emits the clock surface. Use the clock subpath when you want a narrower dependency graph.
58
+
59
+ ## Transport matrix
60
+
61
+ | Mode | When it's used | Requirements | Latency profile | Fallback |
62
+ |------|----------------|--------------|------------------|----------|
63
+ | **Native SSM** (`mode: "multicast"`) | Best path. `window.multicast.subscribe` is present and the config carries a source address. | IWA + custom Chromium with the SSM patch, or a Chrome flag exposing `window.multicast`. PIM-SSM reachable to the source. | One-hop network latency (no relay, no MoQ relay). | Falls back to IGMP, then AMT, then MoQ. |
64
+ | **Native IGMP** (`mode: "multicast"`) | ASM groups (no source filter) where the OS can issue an IGMPv3 join. | `window.multicast.subscribe`. No source address. | One-hop. | Falls back to AMT, then MoQ. |
65
+ | **AMT tunnel** (`mode: "amt"`) | Cellular, no-multicast access networks, or anywhere PIM doesn't reach the client. | A WebSocket AMT proxy at `wss://<relay>/amt-proxy`. AMT relay (RFC 7450) reachable on UDP/2268. | Two-hop: client → relay → source-side multicast tree. Adds the unicast tunnel RTT. | Relay discovery via DRIAD when `driadEnabled` and `source` are set; otherwise the configured `amtRelay`; otherwise gives up and lets the caller fall through to MoQ. |
66
+ | **MoQ-over-WebTransport** | Default startup path and final fallback. | Browser with WebTransport (RFC 9220 over QUIC RFC 9000). MoQ relay endpoint. | Relay-mediated; ALPN dispatches to either the moqtail (newer IETF MoQT draft) or moqlite (moq-lib draft) wire protocol. | None — this is the floor. |
67
+ | **Mobile native multicast** | Android/iOS apps using the `blockcast-sdk-*` packages from the parent monorepo. | Native multicast on WiFi, MBMS, ATSC dongle, or DVB dongle. | One-hop on broadcast networks. | Hands off to AMT on cellular. |
68
+
69
+ Promotion is always best-effort: WebTransport connects first for fast channel select, the manager probes capabilities in parallel, and it promotes to native multicast when available. The `TransportState` event stream surfaces every transition so the UI can render the current mode.
70
+
71
+ ## MoQ wire-protocol coverage
72
+
73
+ Two MoQ wire protocols are supported behind a single WebTransport session, dispatched via QUIC ALPN:
74
+
75
+ - **moqtail** — current IETF MOQT draft. Uses fetch-style subscriptions and group/object addressing. FEC parameters are signalled in each track's catalog `fec` block, not via the `FEC_CONFIG` control message that `draft-ramadan-moq-fec-00` defines — that message is neither sent nor parsed here. A repair track's source, layer and symbol budget come from the catalog via `resolveRepairLayers` in `@blockcast/mmt-container`, never from its name; `repairTrackPath` is a producer-side naming convenience only.
76
+ - **moqlite / moq-lib** — older moq.dev draft. Used by the `@moq/hang` web component and the moq-lib publisher. Same WebTransport carrier, simpler control plane.
77
+
78
+ The transport manager itself does not implement either protocol stack — those live in the player libraries (`@moq/hang`, `moqtail-ts`). This package provides the `repairTrackPath` naming helper and the `MoqFecConfig` / `RepairObjectHeader` signaling types. Decode and recovery state belongs to `@blockcast/mmt-container` or `@blockcast/fec-worker`.
79
+
80
+ ## SSM multicast
81
+
82
+ Native SSM is the gold path: zero-copy from kernel socket to JavaScript `ArrayBuffer`, no relay, no tunnel framing. It requires the lowercase `window.multicast` gateway (`WindowMulticastGateway`: `subscribe` + `capabilities`, nothing else), which today means an Isolated Web App running in a Chromium with the Direct Sockets API plus the Blockcast SSM patch (see the parent `pim-multicast-gateway` repo for the build).
83
+
84
+ ```ts
85
+ const cap = await transport.detectCapabilities()
86
+ // cap.nativeSSM === true when window.multicast.subscribe exists and
87
+ // capabilities.consumeModes (if advertised) includes "bytes"
88
+ // cap.directSockets === true when window.UDPSocket exists (raw UDP path)
89
+ // cap.fecDecode === true when the platform offers in-process FEC decode
90
+ ```
91
+
92
+ Under the hood the manager calls `window.multicast.subscribe({ group, source, port, consume: "bytes" })`. The returned subscription is an `EventTarget`: packets arrive as `"bytes"` events carrying `CustomEvent<ArrayBuffer>`, with `"state"` and `"error"` events alongside, and `unsubscribe()` to tear down. The packet path is the same `ArrayBuffer` you'd get from any other transport, which keeps downstream code (FEC, MFU reassembler, container parser) transport-agnostic. The legacy uppercase `window.Multicast.subscribeSSM` surface is deliberately not used; a page exposing only that gets no gateway connection and the manager falls through to AMT/MoQ.
93
+
94
+ ## AMT tunnel
95
+
96
+ `amt-gateway.ts` ships two AMT (RFC 7450) implementations:
97
+
98
+ - **`AMTGatewayManager`** — service-worker-based. The SW owns the UDP socket via `chrome.sockets.udp` (extension context) or Direct Sockets (IWA). The manager handles the AMT handshake state machine (`DISCOVERING` → `REQUESTING` → `QUERYING` → `ACTIVE`), nonce generation, response-MAC validation, and packet decapsulation. Subscriptions are keyed by `(S, G, port)` so multiple groups multiplex over a single tunnel.
99
+ - **`AMTGateway`** — Direct-Sockets-based. Same state machine, but the UDP socket lives in the page. Used when no service worker is available.
100
+
101
+ When no relay is configured, the manager calls `DRIADDiscovery.discoverRelays(source)` to find one. Per RFC 8777, AMT relays are advertised by the **source network operator** keyed on the source address (not the multicast group), so DRIAD requires `config.source` to be set.
102
+
103
+ If both DRIAD and the manual relay path fail, AMT mode is skipped and the manager continues down the fallback chain.
104
+
105
+ ## DRIAD discovery
106
+
107
+ `driad-discovery.ts` implements RFC 8777 (DNS Reverse IP AMT Discovery). The query name is built from the reversed source octets:
108
+
109
+ ```
110
+ source 203.0.113.10 → 10.113.0.203.amt.in-addr.arpa
111
+ ```
112
+
113
+ Browsers can't issue raw DNS queries, so `DRIADDiscovery` tries three transports in order:
114
+
115
+ 1. A list of HTTPS DRIAD proxy endpoints (`https://driad.amt.net/api/v1/relays?source=…`, `https://multicast-gateway.cloudflare.com/driad?source=…`).
116
+ 2. DNS-over-HTTPS via Cloudflare (`https://cloudflare-dns.com/dns-query?name=<reversed>.amt.in-addr.arpa&type=A`), parsing the JSON answer.
117
+ 3. A built-in fallback list of well-known public AMT relays (`amt-relay.m2icast.net`, `amt.akamaistream.net`).
118
+
119
+ Discovered relays are cached for 5 minutes per source address. `selectBestRelay` orders by RFC priority and then by an HTTP HEAD-based RTT probe to break ties.
120
+
121
+ ## FEC ownership
122
+
123
+ FEC is deliberately not implemented in this transport package. The host loads
124
+ the exact `mmt-wasm` build it deployed, and `@blockcast/mmt-container` or
125
+ `@blockcast/fec-worker` owns decoder state, ISO Source/Repair FEC Payload ID
126
+ coordinates, deadlines, and reinjection of recovered MMTP symbols. This avoids
127
+ a second parser and a second, incompatible WASM binding surface in the
128
+ transport layer.
129
+
130
+ ## Clock (`./clock` export)
131
+
132
+ `SharedClock` is the A/V sync primitive shared across video and audio renderers. It's modeled on the ExoPlayer MMT plugin (`SystemClockAnchor` / `MfuClockAnchor`):
133
+
134
+ ```ts
135
+ import { SharedClock, getSharedClock, SYNC_TOLERANCE_US } from "@blockcast/mmt-transport/clock"
136
+
137
+ const clock = getSharedClock() // process-wide singleton
138
+
139
+ // First decoded frame from EITHER track sets the anchor
140
+ clock.setAnchor(frame.timestamp as Micro)
141
+
142
+ // Per-frame render decision
143
+ const decision = clock.shouldRender(frame.timestamp as Micro)
144
+ if (decision === "render") paint(frame)
145
+ else if (decision === "hold") wait(clock.getWaitTimeMs(frame.timestamp as Micro))
146
+ else frame.close() // discard, too late
147
+ ```
148
+
149
+ `SYNC_TOLERANCE_US` is 66 000 µs (~2 video frames at 30 fps). Frames inside the tolerance window render; frames more than 66 ms ahead hold; frames more than 66 ms behind are discarded. The same anchor is read by both video and audio paths so they stay locked together — independent per-track pacers cause measurable A/V drift, see `CLAUDE.md` in the parent monorepo for the war story.
150
+
151
+ ## Configuration
152
+
153
+ ```ts
154
+ import type {
155
+ TransportConfig,
156
+ TransportConnectConfig,
157
+ TransportSubscription,
158
+ TransportCapabilities,
159
+ TransportState,
160
+ QualityLevel,
161
+ MoqFecConfig,
162
+ } from "@blockcast/mmt-transport"
163
+
164
+ const config: TransportConnectConfig = {
165
+ group: "232.1.1.1", // SSM group (232/8 for IPv4 SSM)
166
+ source: "203.0.113.10", // required for SSM and DRIAD
167
+ port: 5004,
168
+ streamType: "video",
169
+ amtRelay: undefined, // explicit relay; otherwise DRIAD finds one
170
+ driadEnabled: true,
171
+ abrLadder, // required: the catalog-derived ladder (Quick start)
172
+ initialQuality: abrLadder.at(-1), // optional: a rung OF abrLadder, matched by name
173
+ }
174
+
175
+ const subscription: TransportSubscription = {
176
+ id: "video-1",
177
+ config,
178
+ onpacket: (data) => fec.processPacket(new Uint8Array(data)),
179
+ onerror: (err) => console.warn("[transport]", err),
180
+ onqualitychange: (q) => renderer.setQuality(q),
181
+ close: () => transport.disconnect(),
182
+ }
183
+ ```
184
+
185
+ ### ABR ladder
186
+
187
+ The ABR controller adapts over `abrLadder` and nothing else, so it can only ever pick a rendition the stream carries. Build the ladder from the catalog, as in the Quick start; never from a fixed list such as the deprecated `QUALITY_LEVELS`, whose `"720p"` names no catalog rendition.
188
+
189
+ - **`abrLadder`** (required): every rung needs a unique `name` and a positive `bitrate`. `width`, `height` and `fps` are optional and, when present, must be positive. Rungs may share a bitrate; the controller walks the ladder by ascending bitrate, and equal bitrates keep the ladder's order.
190
+ - **`catalogQualityLadder(catalog, role)`** builds `abrLadder`: one rung per catalog rendition for `role` (`"video"` by default; pass `"audio"` for an audio-only stream), named by its track name, priced at its `bitrate`, and sized from `codedWidth`/`codedHeight`/`framerate` only when the catalog states them.
191
+ - **A catalog that omits a rendition's `bitrate` has no ABR ladder.** ABR costs measured throughput against each rung's bitrate, and a rank by coded size or name orders renditions without pricing them, so `catalogQualityLadder` throws a `RangeError` naming the rendition rather than inventing a price. Have the publisher state `bitrate` for every rendition, or pass a ladder of only the renditions you can price.
192
+ - **`initialQuality`** (optional), matched by `name`: omitted, the controller starts on the lowest-bitrate rung. A name `abrLadder` does not carry is not a fallback to that rung; `connect()` refuses the config.
193
+ - **When either is invalid**, `connect()` refuses before it tears anything down: the error goes to `setErrorCallback` (or, with no callback installed, to `console.error`) and `connect()` resolves `false`, the same shape as an invalid endpoint. Unlike an invalid endpoint, which closes the live subscription first, a refused ABR config leaves the live subscription, `getState()` and any connect already in flight untouched.
194
+ - **The ladder lives as long as the connection.** `getQuality()` returns the current rung, or `null` when there is no ladder: before `connect()` succeeds, after `disconnect()`, and after a reconnect that tore the old connection down and then failed (an invalid endpoint, say). `setQuality(name)` throws `Error` when there is no ladder and `RangeError` for a name the ladder does not carry; it never falls back to another rung.
195
+
196
+ `TransportState.mode` takes one of `"multicast" | "amt" | "moq" | "disconnected"` and is reported on every transition via `setStateCallback`. `TransportCapabilities.fecDecode` reflects whether the platform offers in-process FEC decode (some builds of `window.multicast` do); when false, the FEC client runs in WASM in the page.
197
+
198
+ ## Falling back
199
+
200
+ `TransportManager.connect` walks a fixed promotion order and stops on the first success:
201
+
202
+ ```
203
+ detectCapabilities()
204
+ ├─ caps.nativeSSM || caps.nativeIGMP ? → connectWindowMulticast → mode: "multicast"
205
+ │ (gateway.subscribe({ group, source?, port, consume: "bytes" }))
206
+ ├─ always tried → connectAmt → mode: "amt"
207
+ │ ├─ config.amtRelay set ? use it
208
+ │ └─ else DRIAD.discoverRelays(source) + selectBestRelay
209
+ │ └─ connectAmtProxy → wss://<relay>/amt-proxy WebSocket
210
+ └─ all failed → return false (caller falls through to MoQ)
211
+ ```
212
+
213
+ When the player layer (e.g. `@moq/hang`) sees `connect` resolve to `false`, it stays on its already-open WebTransport session, and `state.mode` reports `"moq"`. The ABR controller keeps running across transitions, and FEC stats persist — promotion to multicast doesn't reset the loss-rate window.
214
+
215
+ The selection algorithm is deliberately stateless and synchronous-feeling: every call to `connect` re-runs the probe. If you need to retry promotion later (e.g. user moved from cellular to WiFi), call `disconnect()` then `connect(config)` again.
216
+
217
+ ## Specifications
218
+
219
+ - **RFC 7450** — Automatic Multicast Tunneling (AMT)
220
+ - **RFC 8777** — DNS Reverse IP AMT Discovery (DRIAD)
221
+ - **RFC 9000** — QUIC: A UDP-Based Multiplexed and Secure Transport
222
+ - **RFC 9220** — Bootstrapping WebSockets / HTTP/3 over WebTransport (browser carrier for MoQ)
223
+ - **RFC 6330** — RaptorQ Forward Error Correction Scheme (FEC OTI consumed by downstream decoders)
224
+ - **RFC 3376 / RFC 3810** — IGMPv3 / MLDv2 (issued by the OS via `window.multicast.subscribe`)
225
+ - **draft-ietf-moq-transport** — IETF MOQT (the moqtail wire protocol)
226
+ - **draft-ramadan-moq-fec-00** — AL-FEC over MoQ (the `FEC_CONFIG` message, repair-track convention, repair object header)
227
+
228
+ ## Related packages
229
+
230
+ - **[`@blockcast/mmt-container`](../container)** — MMTP / LOC container parser, MFU reassembler, CARP catalog, signaling. Sits downstream of this package and consumes the `ArrayBuffer` packets it emits.
231
+ - **[`@blockcast/mmt-fec`](../fec)** — Container-agnostic FEC geometry, mapping, OTI, and recovered-block primitives used by container and render packages.
232
+ - **[`@blockcast/fec-worker`](../fec-worker)** — Web Worker owner for the canonical `MmtFecDecoder`; use it to keep decode CPU off the main thread.
233
+ - **[`@blockcast/mmt-render`](../mmt-render)** — Reference renderer + diagnostics overlay; consumes `TransportState` and `ProcessingStats`.
234
+
235
+ The parent monorepo also ships `@blockcast/multicast` (npm-public type-only API), the IWA + Chrome Extension that exposes `window.multicast`, and the mobile SDKs that implement the native-multicast leg of the matrix above.
236
+
237
+ ## Testing
238
+
239
+ ```bash
240
+ pnpm --filter @blockcast/mmt-transport test # vitest run
241
+ pnpm --filter @blockcast/mmt-transport test:watch # vitest watch
242
+ pnpm --filter @blockcast/mmt-transport typecheck # tsc --noEmit
243
+ pnpm --filter @blockcast/mmt-transport build # tsc → dist/
244
+ ```
245
+
246
+ The transport manager is exercised end-to-end through the moqtail and moq-lib player builds in the parent repo (`pnpm build:players` in `packages/moq-server`), which is where you verify a real promotion sequence: open a stream on WebTransport, watch it promote to SSM in an IWA, kill the relay, and confirm packets keep flowing on the multicast leg.
247
+
248
+ ## License
249
+
250
+ Apache-2.0 — see `LICENSE`.
File without changes
@@ -9,6 +9,7 @@
9
9
  * mask burst losses without unnecessarily downgrading quality.
10
10
  */
11
11
  import type { QualityLevel } from "./types.js";
12
+ import { type MulticastTierEndpoint } from "./multicast-tier.js";
12
13
  /**
13
14
  * FEC statistics for ABR decisions
14
15
  */
@@ -23,9 +24,36 @@ export interface FecStatsForAbr {
23
24
  fecEnabled: boolean;
24
25
  }
25
26
  /**
26
- * Standard quality levels for progressive ABR
27
+ * A generic 240p..4K ladder, kept as public API only.
28
+ *
29
+ * @deprecated Not a stream's ladder and never a default: the controller
30
+ * adapts over the ladder its caller supplies (`AdaptiveBitrateControllerOptions.ladder`,
31
+ * e.g. the catalog's video renditions). Walking this list is how a player on a
32
+ * 360p/480p/720p catalog logged upgrades to 1080p and 1440p it could never
33
+ * switch to (BLO-35597).
34
+ */
35
+ export declare const QUALITY_LEVELS: readonly QualityLevel[];
36
+ /** What the controller adapts over and where it starts; both from the caller. */
37
+ export interface AdaptiveBitrateControllerOptions {
38
+ /**
39
+ * The renditions this stream carries (e.g. the catalog's video tracks), in
40
+ * any order: a unique name and a bitrate (bps) each, plus dimensions and
41
+ * fps when the catalog states them. Renditions may share a bitrate.
42
+ */
43
+ ladder: readonly QualityLevel[];
44
+ /** Name of the ladder rendition presented at construction; the lowest
45
+ * rung when omitted. A name that matches no rung is refused. */
46
+ initialQuality?: string;
47
+ }
48
+ /**
49
+ * Validate a caller ladder and return it frozen, ascending by bitrate. Throws
50
+ * on an empty ladder, a rung without a name or a positive finite bitrate, a
51
+ * width, height or fps that is present but not positive finite, or a name that
52
+ * appears twice: a name is how `setQuality` and the initial rendition find a
53
+ * rung. A shared bitrate is legal (e.g. 720p30 and 720p60, or two codecs);
54
+ * `Array.prototype.sort` is stable, so equal bitrates keep the caller's order.
27
55
  */
28
- export declare const QUALITY_LEVELS: QualityLevel[];
56
+ export declare function validateQualityLadder(ladder: readonly QualityLevel[]): readonly QualityLevel[];
29
57
  /**
30
58
  * Progressive Adaptive Bitrate Controller
31
59
  *
@@ -37,6 +65,8 @@ export declare const QUALITY_LEVELS: QualityLevel[];
37
65
  * - Fast quality downgrades on congestion
38
66
  */
39
67
  export declare class AdaptiveBitrateController {
68
+ /** The caller's renditions, ascending by bitrate (`validateQualityLadder`). */
69
+ readonly ladder: readonly QualityLevel[];
40
70
  private currentQualityIndex;
41
71
  private history;
42
72
  private readonly historyWindow;
@@ -46,9 +76,11 @@ export declare class AdaptiveBitrateController {
46
76
  private lastQualityChange;
47
77
  private onQualityChange?;
48
78
  private fecStats;
49
- constructor(initialQuality?: QualityLevel);
79
+ constructor(options: AdaptiveBitrateControllerOptions);
50
80
  setCallback(callback: (quality: QualityLevel) => void): void;
51
81
  getCurrentQuality(): QualityLevel;
82
+ /** Selects the multicast (S,G) tier without replacing a player's unicast ABR manager. */
83
+ selectMulticastTier(endpoints: readonly MulticastTierEndpoint[], estimate?: number | undefined): MulticastTierEndpoint | undefined;
52
84
  /**
53
85
  * Record network sample for bitrate adaptation
54
86
  *
@@ -73,7 +105,8 @@ export declare class AdaptiveBitrateController {
73
105
  private upgrade;
74
106
  private downgrade;
75
107
  /**
76
- * Force quality level (for testing)
108
+ * Select a ladder rendition: the caller switched to it (a manual override,
109
+ * or a switch the caller made). Throws for a name the ladder does not carry.
77
110
  */
78
111
  setQuality(name: string): void;
79
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"abr-controller.d.ts","sourceRoot":"","sources":["../src/abr-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,kDAAkD;IAClD,WAAW,EAAE,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O,CAAC,QAAQ,CAKd;gBAEU,OAAO,EAAE,gCAAgC;IAYrD,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI;IAIrD,iBAAiB,IAAI,YAAY;IAIjC,yFAAyF;IACzF,mBAAmB,CAClB,SAAS,EAAE,SAAS,qBAAqB,EAAE,EAC3C,QAAQ,GAAE,MAAM,GAAG,SAA0D,GAC3E,qBAAqB,GAAG,SAAS;IAIpC;;;;;OAKG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAwCvD;;;;;;;OAOG;IACH,WAAW,CAAC,KAAK,EAAE,cAAc;IAIjC;;OAEG;IACH,WAAW,IAAI,cAAc;IAI7B,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,SAAS;IAYjB;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM;IAQvB;;OAEG;IACH,UAAU,IAAI;QACb,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACpB;IAWD;;OAEG;IACH,KAAK;CAIL"}
@@ -8,10 +8,17 @@
8
8
  * after FEC recovery, not the raw transport-level loss rate. This allows FEC to
9
9
  * mask burst losses without unnecessarily downgrading quality.
10
10
  */
11
+ import { selectMulticastTier } from "./multicast-tier.js";
11
12
  /**
12
- * Standard quality levels for progressive ABR
13
+ * A generic 240p..4K ladder, kept as public API only.
14
+ *
15
+ * @deprecated Not a stream's ladder and never a default: the controller
16
+ * adapts over the ladder its caller supplies (`AdaptiveBitrateControllerOptions.ladder`,
17
+ * e.g. the catalog's video renditions). Walking this list is how a player on a
18
+ * 360p/480p/720p catalog logged upgrades to 1080p and 1440p it could never
19
+ * switch to (BLO-35597).
13
20
  */
14
- export const QUALITY_LEVELS = [
21
+ export const QUALITY_LEVELS = Object.freeze([
15
22
  { name: "240p", bitrate: 300_000, width: 426, height: 240, fps: 15 },
16
23
  { name: "360p", bitrate: 500_000, width: 640, height: 360, fps: 24 },
17
24
  { name: "480p", bitrate: 1_000_000, width: 854, height: 480, fps: 30 },
@@ -19,7 +26,41 @@ export const QUALITY_LEVELS = [
19
26
  { name: "1080p", bitrate: 5_000_000, width: 1920, height: 1080, fps: 30 },
20
27
  { name: "1440p", bitrate: 8_000_000, width: 2560, height: 1440, fps: 30 },
21
28
  { name: "4K", bitrate: 15_000_000, width: 3840, height: 2160, fps: 30 },
22
- ];
29
+ ].map((level) => Object.freeze(level)));
30
+ function positiveFinite(value) {
31
+ return typeof value === "number" && Number.isFinite(value) && value > 0;
32
+ }
33
+ /**
34
+ * Validate a caller ladder and return it frozen, ascending by bitrate. Throws
35
+ * on an empty ladder, a rung without a name or a positive finite bitrate, a
36
+ * width, height or fps that is present but not positive finite, or a name that
37
+ * appears twice: a name is how `setQuality` and the initial rendition find a
38
+ * rung. A shared bitrate is legal (e.g. 720p30 and 720p60, or two codecs);
39
+ * `Array.prototype.sort` is stable, so equal bitrates keep the caller's order.
40
+ */
41
+ export function validateQualityLadder(ladder) {
42
+ if (!Array.isArray(ladder) || ladder.length === 0) {
43
+ throw new TypeError("[ABR] ladder must list at least one rendition (e.g. the catalog's video tracks)");
44
+ }
45
+ const names = new Set();
46
+ for (const level of ladder) {
47
+ if (typeof level?.name !== "string" || level.name.length === 0) {
48
+ throw new TypeError("[ABR] every ladder rendition needs a name");
49
+ }
50
+ if (!positiveFinite(level.bitrate)) {
51
+ throw new RangeError(`[ABR] rendition ${level.name}: bitrate must be a positive finite number, got ${String(level.bitrate)}`);
52
+ }
53
+ for (const field of ["width", "height", "fps"]) {
54
+ if (level[field] !== undefined && !positiveFinite(level[field])) {
55
+ throw new RangeError(`[ABR] rendition ${level.name}: ${field} must be a positive finite number when stated, got ${String(level[field])}`);
56
+ }
57
+ }
58
+ if (names.has(level.name))
59
+ throw new RangeError(`[ABR] rendition ${level.name} appears twice in the ladder`);
60
+ names.add(level.name);
61
+ }
62
+ return Object.freeze([...ladder].sort((a, b) => a.bitrate - b.bitrate).map((level) => Object.freeze({ ...level })));
63
+ }
23
64
  /**
24
65
  * Progressive Adaptive Bitrate Controller
25
66
  *
@@ -31,6 +72,8 @@ export const QUALITY_LEVELS = [
31
72
  * - Fast quality downgrades on congestion
32
73
  */
33
74
  export class AdaptiveBitrateController {
75
+ /** The caller's renditions, ascending by bitrate (`validateQualityLadder`). */
76
+ ladder;
34
77
  currentQualityIndex;
35
78
  history = [];
36
79
  historyWindow = 10_000; // 10 second window
@@ -46,16 +89,26 @@ export class AdaptiveBitrateController {
46
89
  recoveryRate: 1,
47
90
  fecEnabled: false,
48
91
  };
49
- constructor(initialQuality) {
50
- this.currentQualityIndex = initialQuality ? QUALITY_LEVELS.findIndex((q) => q.name === initialQuality.name) : 0;
51
- if (this.currentQualityIndex < 0)
52
- this.currentQualityIndex = 0;
92
+ constructor(options) {
93
+ if (!options || typeof options !== "object") {
94
+ throw new TypeError("[ABR] AdaptiveBitrateController needs { ladder, initialQuality }");
95
+ }
96
+ this.ladder = validateQualityLadder(options.ladder);
97
+ this.currentQualityIndex =
98
+ options.initialQuality === undefined ? 0 : this.ladder.findIndex((q) => q.name === options.initialQuality);
99
+ if (this.currentQualityIndex < 0) {
100
+ throw new RangeError(`[ABR] initial rendition ${String(options.initialQuality)} is not in the ladder`);
101
+ }
53
102
  }
54
103
  setCallback(callback) {
55
104
  this.onQualityChange = callback;
56
105
  }
57
106
  getCurrentQuality() {
58
- return QUALITY_LEVELS[this.currentQualityIndex];
107
+ return this.ladder[this.currentQualityIndex];
108
+ }
109
+ /** Selects the multicast (S,G) tier without replacing a player's unicast ABR manager. */
110
+ selectMulticastTier(endpoints, estimate = this.getMetrics().measuredBitrate || undefined) {
111
+ return selectMulticastTier(endpoints, estimate);
59
112
  }
60
113
  /**
61
114
  * Record network sample for bitrate adaptation
@@ -89,7 +142,7 @@ export class AdaptiveBitrateController {
89
142
  // Check for upgrade (progressive increase) - use effective loss rate
90
143
  if (measuredBitrate > currentQuality.bitrate * this.upgradeThreshold &&
91
144
  effectiveLossRate < 0.01 &&
92
- this.currentQualityIndex < QUALITY_LEVELS.length - 1) {
145
+ this.currentQualityIndex < this.ladder.length - 1) {
93
146
  this.upgrade();
94
147
  }
95
148
  }
@@ -122,7 +175,7 @@ export class AdaptiveBitrateController {
122
175
  return { measuredBitrate, lossRate };
123
176
  }
124
177
  upgrade() {
125
- if (this.currentQualityIndex >= QUALITY_LEVELS.length - 1)
178
+ if (this.currentQualityIndex >= this.ladder.length - 1)
126
179
  return;
127
180
  this.currentQualityIndex++;
128
181
  this.lastQualityChange = Date.now();
@@ -140,15 +193,16 @@ export class AdaptiveBitrateController {
140
193
  this.onQualityChange?.(newQuality);
141
194
  }
142
195
  /**
143
- * Force quality level (for testing)
196
+ * Select a ladder rendition: the caller switched to it (a manual override,
197
+ * or a switch the caller made). Throws for a name the ladder does not carry.
144
198
  */
145
199
  setQuality(name) {
146
- const index = QUALITY_LEVELS.findIndex((q) => q.name === name);
147
- if (index >= 0) {
148
- this.currentQualityIndex = index;
149
- this.lastQualityChange = Date.now();
150
- this.onQualityChange?.(this.getCurrentQuality());
151
- }
200
+ const index = this.ladder.findIndex((q) => q.name === name);
201
+ if (index < 0)
202
+ throw new RangeError(`[ABR] rendition ${name} is not in the ladder`);
203
+ this.currentQualityIndex = index;
204
+ this.lastQualityChange = Date.now();
205
+ this.onQualityChange?.(this.getCurrentQuality());
152
206
  }
153
207
  /**
154
208
  * Get current metrics including both raw and effective loss rates
@@ -1 +1 @@
1
- {"version":3,"file":"abr-controller.js","sourceRoot":"","sources":["../src/abr-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkBH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC7C,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE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Q,EAAE,MAAM,CAAC;KACjB,CAAC;IAaF;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB3B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B;;OAEG;IACH,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK;IAI7B;;OAEG;IACH,QAAQ,IAAI,YAAY;IAIxB;;OAEG;IACH,QAAQ,IAAI,OAAO;CAGnB;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -7,8 +7,7 @@
7
7
  * RFC 7450: Automatic Multicast Tunneling
8
8
  */
9
9
  import { DRIADDiscovery } from "./driad-discovery.js";
10
- /** Default AMT port (RFC 7450) */
11
- const DEFAULT_AMT_PORT = 2268;
10
+ import { DEFAULT_AMT_RELAY_PORT } from "@blockcast/mmt-base";
12
11
  /** AMT message types */
13
12
  const AMT_MESSAGE_TYPES = {
14
13
  RELAY_DISCOVERY: 1,
@@ -75,12 +74,13 @@ export class AMTGatewayManager {
75
74
  const { key } = config;
76
75
  const keyStr = this.getKeyString(key);
77
76
  if (this.subscriptions.has(keyStr)) {
78
- throw new Error(`Already subscribed to ${keyStr}`);
77
+ console.log(`[AMT] Reusing existing subscription to ${keyStr}`);
78
+ return keyStr;
79
79
  }
80
80
  try {
81
81
  let relayAddress;
82
82
  let discoveryMethod;
83
- const relayPort = config.relayPort || DEFAULT_AMT_PORT;
83
+ const relayPort = config.relayPort || DEFAULT_AMT_RELAY_PORT;
84
84
  if (config.relayAddress) {
85
85
  relayAddress = config.relayAddress;
86
86
  discoveryMethod = "manual";
@@ -265,7 +265,7 @@ export class AMTGateway {
265
265
  };
266
266
  constructor(options) {
267
267
  this.relayAddress = options.relayAddress;
268
- this.relayPort = options.relayPort || DEFAULT_AMT_PORT;
268
+ this.relayPort = options.relayPort || DEFAULT_AMT_RELAY_PORT;
269
269
  this.onPacket = options.onPacket || (() => { });
270
270
  this.onStateChange = options.onStateChange || (() => { });
271
271
  this.onError = options.onError || ((err) => console.error("AMT Error:", err));
@@ -1 +1 @@
1
- {"version":3,"file":"amt-gateway.js","sourceRoot":"","sources":["../src/amt-gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,kCAAkC;AAClC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,wBAAwB;AACxB,MAAM,iBAAiB,GAAG;IACzB,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,CAAC;IACtB,OAAO,EAAE,CAAC;IACV,gBAAgB,EAAE,CAAC;IACnB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC;CACF,CAAC;AAEX,yBAAyB;AACzB,MAAM,cAAc,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACP,CAAC;AA6CX,+BAA+B;AAC/B,SAAS,MAAM,CAAC,OAAe;IAC9B,OAAO,sCAAsC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IACrB,aAAa,GAAG,IAAI,GAAG,EAA2B,CAAC;IACnD,cAAc,CAAiC;IAC/C,cAAc,GAAG,IAAI,GAAG,EAAmF,CAAC;IAC5G,KAAK,GAAG,IAAI,cAAc,EAAE,CAAC;IAErC;QACC,yDAAyD;QACzD,IAAI,CAAC,cAAc,GAAG,CAAC,KAAmB,EAAE,EAAE;YAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAmG,CAAC;YACvH,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACrD,IAAI,IAAI,CAAC,I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EAAE,CAAC;QAEpB,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,QAAQ;QACP,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,QAAQ;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,QAAQ;QACP,OAAO,IAAI,CAAC,KAAK,KAAK,cAAc,CAAC,MAAM,CAAC;IAC7C,CAAC;CACD;AAED,oCAAoC;AACpC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"driad-discovery.d.ts","sourceRoot":"","sources":["../src/driad-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,WAAW,CAAW;IAE9B;;;;;OAKG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IA6B3D;;OAEG;YACW,eAAe;IAsC7B;;OAEG;YACW,iBAAiB;IAoC/B;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;YAqBzD,UAAU;IAexB;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,SAAS;CAGnD;AAGD,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
1
+ {"version":3,"file":"driad-discovery.d.ts","sourceRoot":"","sources":["../src/driad-discovery.ts"],"names":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