HealthThresholdsSettings interface

Opt-in thresholds that make an input emit degraded / recovered on onConnectionStatusChange, evaluated engine-side from the health it already measures. Every field is optional; an unset threshold never trips. Behind / ahead are the smoothed delivery rate (only once settled), NOT the relative realtimeDelta. Pass "recommended" for sensible defaults in one line.

Signature:

export interface HealthThresholdsSettings

Properties

Property Type Description

clearAfterMs?

number

(Optional) hysteresis: condition must be clear this long before recovered (default 0). Not applied to stalled, which recovers as soon as media is back

droppedPerSecond?

number

(Optional) lossy (SRT) when the unrecovered dropped-packet rate exceeds this

latencyOverRttMin?

number

(Optional) latency_below_rtt (SRT) when latencyOverRtt falls below this (aim >= 3-4)

lossRatio?

number

(Optional) lossy (SRT) when received-lost/received over a sample exceeds this

maxCcErrorsPerSecond?

number

(Optional) transport_errors (inputs carrying TS: udpTs, tcpTs, rist, srt) when continuity-count errors per second over a sample exceed this: lost or duplicated TS packets, or two senders mixed; over SRT, what retransmission did not recover. A lossy link errors in bursts, a mixed feed on nearly every packet. Not in "recommended": what rate is tolerable is the link’s business.

maxDeliveryRate?

number

(Optional) ahead_of_realtime when settled deliveryRate exceeds this (e.g. 1.15)

maxTimestampResetsPerSecond?

number

(Optional) unstable_timestamps when the timestamp corrector’s resets per second over a sample exceed this (e.g. 1). A healthy source resets only at a real break; one whose timestamps hold no timeline (two senders interleaved on one UDP port, a muxer stamping garbage) resets on nearly every frame.

minDeliveryRate?

number

(Optional) behind_realtime when settled deliveryRate falls below this (e.g. 0.85)

minDurationMs?

number

(Optional) hysteresis: hold a condition this long before degraded (default 0). Not applied to stalled, whose stalledMs is already how long media must be missing

stalledMs?

number

(Optional) stalled when lastMediaAgeMs exceeds this (progressing:false also stalls)