MoqInputSettings interface

Signature:

export interface MoqInputSettings extends SourceNodeSettings<MoqInputNode>, StreamStatisticsMixin

Properties

Property Type Description

authToken?

string

(Optional) Client mode: a MoQ auth token presented to the peer (the SETUP AUTHORIZATION TOKEN). Replace it for the next reconnect with MoqInputNode.updateAuthToken().

c2paVerification?

C2paVerificationSettings

(Optional) When set, each incoming init and media segment is validated against the C2PA Live Video continuity chain (spec ยง19.3). Per-segment outcomes are delivered to onC2paSegmentVerified. Reporting-only: media flows regardless of validation result.

deliveryTimeoutMs?

number

(Optional) Ask the publisher to drop objects it could not send within this many milliseconds (a MOQT delivery timeout) rather than deliver them late. Unset means none. Client mode.

disableTlsVerify?

boolean

(Optional) Disable verification of remote server’s TLS certificate (for development use ONLY, not for production)

groupOrder?

"ascending" | "descending"

(Optional) The order the media subscriptions ask for groups when the publisher has more than one to send: "descending" puts the newest first. Unset leaves it to the publisher. Client mode.

listener?

MoqInputListenerSettings

(Optional) Optional: start a listener for direct publisher connections. When set, the ingest accepts incoming MoQT publisher connections instead of (or in addition to) connecting to a relay as a subscriber.

moqProtocolVersion?

"auto" | "draft14" | "draft16" | "draft18"

(Optional) Pin the MoQT transport draft this ingest uses when it connects out (client and relayListener modes; a listening ingest offers drafts 18/16/14/07 and ignores this). Omit (or "auto") to negotiate the newest draft both ends support, which is draft-18 against another Norsk (draft-16 or later enables the joining-FETCH catalog bootstrap; draft14 has no FETCH). Mainly useful to talk to a peer that mis-negotiates, or to test a specific draft. relayListener rejects "draft14". Mirrors MoqOutputSettings.moqProtocolVersion.

namespace

string[]

The namespace to subscribe to (client mode only), as a list of segments (the on-the-wire MoQT tuple). For listener mode, set listener.namespacePrefix instead — incoming publishers are matched by prefix and identified per-connection via MoqInputSettings.onConnection.

onC2paSegmentVerified?

(info: { representationId: string; isInit: boolean; outcome: C2paValidationOutcome; }) ⇒ void

(Optional) Called once per init segment and once per media segment when MoqInputSettings.c2paVerification is configured. For MoQ inputs, representationId carries the MoQ track name from the underlying CMAF stream.

onConnection?

(connectionIndex: number, remoteHost: string, publishedNamespace: string[], auth?: MoqConnectionAuth) ⇒ MoqConnectionResult

(Optional) Called when a new publisher connects via QUIC or WebTransport (listener mode), or is announced at the relay (relay-listener mode). publishedNamespace is the full namespace tuple the publisher announced, as a list of segments — e.g. for the namespace <"stage", "primary"> it’s ["stage", "primary"]. Return accept with a sourceName, or reject to deny.

onConnectionStatusChange?

(connectionIndex: number, state: string) ⇒ void

(Optional) Called when a publisher connection status changes (listener and relay-listener modes). state is "connected", "disconnected", or, in relay-listener mode, "replaced": the relay announced the namespace again for a new session with the same auth sid (a reload) while this one was live. A new connection for the replacement follows.

onIngestStats?

(stats: MoqIngestStats) ⇒ void

(Optional) Called about once a second with ingest-side counters for this input — chiefly how the reorder buffer is behaving. See MoqIngestStats.

onTimecode?

(ntpTimestamp: number, mediaTime: number) ⇒ void

(Optional) Called when a PRFT (Producer Reference Time) box is detected in an incoming CMAF segment. Carries the NTP wall-clock timestamp and the media decode time from the PRFT box.

onTrack?

(track: MoqTrack) ⇒ MoqTrackResult

(Optional) Called as each track arrives, before any of it comes out: the stream key it gets and its language, or refuse it. The track waits for the answer; one not given within 2 seconds leaves it the input’s own key. A key another track of this input already has is refused.

Without it, every track takes the input’s own key (see MoqTrackKey).

relayListener?

MoqInputRelayListenerSettings

(Optional) Optional: relay-listener mode — dial the relay at url and take every publisher announced there under a prefix, each offered to MoqInputSettings.onConnection. See MoqInputRelayListenerSettings. Not together with listener.

reorderBufferMs?

number

(Optional) How long, in milliseconds, to hold each arriving object so that a late-arriving earlier one can overtake it, before emitting in {group, object} order. Defaults to 100.

MoQ carries each group on its own QUIC stream, and QUIC orders objects only within a stream — so a group’s tail objects can arrive after the next group has already started. Emitting those in arrival order steps the media timeline backwards, and a downstream sync will eventually drop the offending stream entirely rather than emit out of order. Measured lateness against a public relay was 0-61ms.

This is added latency on this input, and any object arriving later than it is dropped. Raise it for a lossy or heavily-relayed path; lower it only where the delay matters more than the occasional dropped object. Set 0 to disable reordering and emit on arrival.

sourceName?

string

(Optional) The source name to give the ingested media (client mode). Omit to derive it from the namespace. Set a distinct name when two MoQ inputs in the same instance subscribe to the SAME namespace — otherwise they produce identical stream keys and collide.

startupThreshold?

InputThresholdSettings

(Optional) When specified, drop data until the input is ticking at realtime. As with the other live inputs, a publisher that goes away and comes back is held back again until stable.

subscribeFilter?

"nextGroupStart" | "latestObject" | "fromStart"

(Optional) Where in the publication media-track subscriptions start (client mode). - "nextGroupStart" (default): join at the next group boundary, so the first delivered object is a keyframe — clean decode start, latency up to one group/GOP. - "latestObject": join mid-group at the very next published object — lowest latency, but video is undecodable until the next keyframe. - "fromStart": replay whatever history the publisher retains, then continue live — for consumers that want the whole publication (e.g. file-output workflows).

subscriberPriority?

number

(Optional) MOQT subscriber priority (0-255, lower first) of this input’s media subscriptions, relative to the publisher’s other subscriptions on the same connection. Unset means 128. Client mode.

timeDomain?

TimeDomain

(Optional) Optional time-domain configuration. When set, the input is placed into a named coordinator and is timestamp-aligned with all other inputs sharing the same domain id within this Norsk instance. Omit for the default (uncoordinated) behaviour.

tlsCaFile?

string

(Optional) A PEM file, on the Norsk host, of the CA certificates the remote server’s certificate must chain to, in place of the system bundle (client mode, verification on). A self-signed server certificate may be named directly.

url?

string

(Optional) The URL of the MoQT relay to connect to (e.g. 'moqt://relay.example.com:4443'). Omit when using listener mode.