SrtCommonInputSettings interface

Settings for an SRT Input node see: NorskInput.srt()

Signature:

export interface SrtCommonInputSettings

Events

Property Type Description

onConnection?

( streamId: string, index: number, remoteHost: string, parsed?: SrtStreamIdParsed) ⇒ SrtConnectionResult

(Optional) On connect callback, notifying that a new caller has connected (in listener mode) and set the source name accordingly

onConnectionRejected?

(rejection: { streamId: string; route: string; user?: string; remoteHost: string; reason: string; }) ⇒ void

(Optional) A connection refused at the CRYPTO layer by the (route, user) passphrase table — the handshake was rejected before could run, so this is the only visibility the application gets (probe / DoS auditing). Reasons: "unknown_route" | "unknown_user". NB a WRONG passphrase fails later in SRT’s key-material exchange and produces no event; those attempts appear only in the engine’s srt logs.

onConnectionStatusChange?

( status: SrtInputStatus, sourceName: string | undefined, index: number, health?: InputHealthStatus) ⇒ void

(Optional) Called when the connection status has changed (e.g. when the SRT socket is closed)

Properties

Property Type Description

cta708Charset?

Cta708CharsetSetting

(Optional) Character set used to interpret CTA-708 P16 (16-bit) captions — for East-Asian services whose P16 code set is a legacy DBCS rather than Unicode. The code set is signalled out of band, so it must be chosen per input; it does not affect Latin/ASCII text. Defaults to 'unicode'.

debugDumpSource?

string

(Optional) When specified dump the raw source input for debug purposes to the given directory

host

string

The IP or hostname of the remote server

inputBandwidth?

number

(Optional) Input bandwidth (SRTO_INPUTBW)

maxBandwidth?

number

(Optional) Max bandwidth (SRTO_MAXBW)

mode

SrtMode

The mode to act in (caller or listener)

onBind?

(info: { port: number; }) ⇒ void

(Optional) Called when a listener-mode SRT input binds to the interface

overheadBandwidth?

number

(Optional) Overhead bandwidth (SRTO_OHEADBW)

passphrase?

string

(Optional) Passphrase for encryption

peerIdleTimeoutMs?

number

(Optional) libsrt’s native peer-idle timeout (SRTO_PEERIDLETIMEO), in milliseconds: the connection is declared broken when no packet of any kind (data, keepalive, ACK, control) has been received from the peer for this long — i.e. a link-death detector. Unspecified leaves libsrt’s default (5000ms).

Breaking change: this previously drove an application-level "no media delivered" timer (default 500ms) that closed the socket when media stopped even while the SRT link was healthy. That timer has been removed; because libsrt keepalives keep the native timeout from firing on a media-only stall, this no longer reacts to "connected but no media". To act on a media stall, use the per-connection health event’s InputStreamHealth.lastMediaAgeMs (via RtmpServerInputSettings.onConnectionHealth-style callbacks) or a stalled HealthThresholdsSettings verdict, and call closeConnection.

peerLatency?

number

(Optional) The latency value provided by the sender side as a minimum value for the receiver (SRTO_PEERLATENCY)

port

number

The port to listen on in listener mode, or to connect to in caller mode

In listener mode the port may be given as 0 to bind to an automatically assigned port, which can be retrieved in onBind.

programFilter?

number

(Optional) Optionally filter a single program from MPTS at decode time

receiveLatency?

number

(Optional) The latency value in the receiving direction of the socket (SRTO_RCVLATENCY)

reportTsErrors?

boolean

(Optional) Whether decoded frames carry per-frame TR 101 290 (TS error) metrics. Only NorskInspect.qualityMonitoring() reads them; carrying them makes every frame’s quality-metrics map a per-frame allocation that is copied on each processing hop, so many-stream deployments that do no quality monitoring should set false. Default true.

startupThreshold?

InputThresholdSettings

(Optional) when specified, drop data until the input is ticking at realtime

statsPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample SRT socket statistics. Stats feed metrics, so tune this to the rate at which you want metric updates. When unspecified a default is used.

statusPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample the underlying SRT socket’s connection state for the per-connection status metric (visible in the visualiser / metrics). When unspecified a default is used.

Note this does not drive : that callback fires on actual disconnection detection (a receive failure, including libsrt’s native peer-idle timeout breaking the link), not on this poll.

streamId?

string

(Optional) Stream ID to set on the socket when acting in caller 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.

tlpktdrop?

boolean

(Optional)