Scan your whole stack
Are you using @blockcast/mmt-transport?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.2.0-main.27ed33206afe
@blockcast/mmt-transport was last scanned on 27 Nov 2026 at version 2.2.0-main.27ed33206afe. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.2.0-main.27ed33206afe LATEST | 27 Nov 2026 | No rules fired |
| 2.2.0-main.9684cdc1a86c | 27 Nov 2026 | No rules fired |
| 2.2.0-main.32c089a563e3 | 27 Nov 2026 | No rules fired |
| 2.2.0-main.d346de981128 | 26 Nov 2026 | Not shown |
| 2.2.0-main.89314a283940 | 26 Nov 2026 | Not shown |
Findings for v2.2.0-main.27ed33206afe. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.2.0-main.27ed33206afe; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
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.
pnpm add @blockcast/mmt-transport
import {
TransportManager,
SharedClock,
catalogQualityLadder,
} from "@blockcast/mmt-transport"
const transport = new TransportManager()
const clock = new SharedClock()
transport.setPacketCallback((data) => {
// Hand raw packets to @blockcast/mmt-container. Container/FEC state stays
// downstream of transport selection.
router.processPacket(new Uint8Array(data), "multicast")
})
transport.setStateCallback((s) => console.log("[transport] mode=", s.mode))
// ABR adapts over the stream's own renditions and nothing else: there is no
// built-in ladder. One rung per catalog video rendition, under its catalog
// name (e.g. "video/720p"), costed at its catalog bitrate; `catalog` is the
// stream's catalog. Throws if a rendition states no bitrate (see ABR ladder).
const abrLadder = catalogQualityLadder(catalog) // use "audio" for an audio-only catalog
const connected = await transport.connect({
group: "232.1.1.1",
source: "203.0.113.10",
port: 5004,
streamType: "video",
amtRelay: undefined, // omit to let the gateway discover one via DRIAD
driadEnabled: true,
abrLadder, // required; starts on its lowest bitrate
})
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.
| Path | Purpose |
|---|---|
@blockcast/mmt-transport |
TransportManager, AMT, ABR, repair-track naming, types |
@blockcast/mmt-transport/clock |
SharedClock, SYNC_TOLERANCE_US, PTS_OFFSET_US |
@blockcast/mmt-transport/multicast-catalog-policy |
Catalog → endpoint/packet-ID policy (normalizeCatalogEndpoints, selectMulticastCandidateForTracks, endpointToMulticastConfig, selectEndpointPacketIdsForTracks, …) |
@blockcast/mmt-transport/multicast-tiers |
Tier switching without TransportManager (MulticastOrchestrator, MulticastTierExecutor, tierPacketFromRouted, endpointKey, selectMulticastTier, …) |
The root export also re-emits the clock surface. Use the clock subpath when you want a narrower dependency graph.
The root export constructs the AMT gateway singleton when it is loaded. A player that only needs the catalog policy imports the multicast-catalog-policy subpath, and one that drives tier joins with its own engine imports the multicast-tiers subpath. Neither has load-time side effects.
| Mode | When it's used | Requirements | Latency profile | Fallback |
|---|---|---|---|---|
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. |
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. |
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. | The configured amtRelay; otherwise gateway DRIAD discovery when source is set and driadEnabled is not false; otherwise gives up and lets the caller fall through to MoQ. |
| 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. |
| 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. |
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.
Two MoQ wire protocols are supported behind a single WebTransport session, dispatched via QUIC ALPN:
fec block, not via a control message: the FEC drafts define none, and none is sent or 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.@moq/hang web component and the moq-lib publisher. Same WebTransport carrier, simpler control plane.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 RepairObjectHeader type. Decode and recovery state belongs to @blockcast/mmt-container or @blockcast/fec-worker.
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).
const cap = await transport.detectCapabilities()
// cap.nativeSSM === true when window.multicast.subscribe exists and
// capabilities.consumeModes (if advertised) includes "bytes"
// cap.directSockets === true when window.UDPSocket exists (raw UDP path)
// cap.fecDecode === true when the platform offers in-process FEC decode
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.
amt-gateway.ts ships two AMT (RFC 7450) implementations:
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.AMTGateway — Direct-Sockets-based. Same state machine, but the UDP socket lives in the page. Used when no service worker is available.Both need a configured relay; neither discovers one.
DRIAD (RFC 8777) relay discovery belongs to the window.multicast gateway (the IWA), which runs it with its own candidates and failover. This package only asks for it: a join carrying amtDiscovery: "driad" with no relay becomes { origin: "amt", discovery: "driad" } on the gateway request. Per RFC 8777 relays are keyed on the source address, so DRIAD requires source. TransportManager.connect() makes that request when the native join fails, no amtRelay is set, source is set and driadEnabled is not false. A DRIAD join is pooled separately from a native join of the same (S, G, port).
The former in-page DRIADDiscovery / driadDiscovery (HTTPS proxy endpoints plus an A query under amt.in-addr.arpa, returning at most one relay) was not RFC 8777 and was removed (BLO-43606).
FEC is deliberately not implemented in this transport package. The host loads
the exact mmt-wasm build it deployed, and @blockcast/mmt-container or
@blockcast/fec-worker owns decoder state, ISO Source/Repair FEC Payload ID
coordinates, deadlines, and reinjection of recovered MMTP symbols. This avoids
a second parser and a second, incompatible WASM binding surface in the
transport layer.
./clock export)SharedClock is the A/V sync primitive shared across video and audio renderers. It's modeled on the ExoPlayer MMT plugin (SystemClockAnchor / MfuClockAnchor):
import { SharedClock, getSharedClock, SYNC_TOLERANCE_US } from "@blockcast/mmt-transport/clock"
const clock = getSharedClock() // process-wide singleton
// First decoded frame from EITHER track sets the anchor
clock.setAnchor(frame.timestamp as Micro)
// Per-frame render decision
const decision = clock.shouldRender(frame.timestamp as Micro)
if (decision === "render") paint(frame)
else if (decision === "hold") wait(clock.getWaitTimeMs(frame.timestamp as Micro))
else frame.close() // discard, too late
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.
import type {
TransportConfig,
TransportConnectConfig,
TransportSubscription,
TransportCapabilities,
TransportState,
QualityLevel,
} from "@blockcast/mmt-transport"
const config: TransportConnectConfig = {
group: "232.1.1.1", // SSM group (232/8 for IPv4 SSM)
source: "203.0.113.10", // required for SSM and DRIAD
port: 5004,
streamType: "video",
amtRelay: undefined, // explicit relay; otherwise the gateway runs DRIAD
driadEnabled: true,
abrLadder, // required: the catalog-derived ladder (Quick start)
initialQuality: abrLadder.at(-1), // optional: a rung OF abrLadder, matched by name
}
const subscription: TransportSubscription = {
id: "video-1",
config,
onpacket: (data) => fec.processPacket(new Uint8Array(data)),
onerror: (err) => console.warn("[transport]", err),
onqualitychange: (q) => renderer.setQuality(q),
close: () => transport.disconnect(),
}
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.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.