/*! * Copyright (c) 2026-present, Vanilagy and contributors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { ReadableStreamSource } from 'mediabunny'; /** * Milliseconds the reorder buffer holds a packet before giving up on the ones missing before it. * * @group \@mediabunny/server * @public */ export declare const DEFAULT_RIST_BUFFER_MS = 1000; /** * Options for {@link RistSource}. * * @group \@mediabunny/server * @public */ export type RistSourceOptions = { /** * Whether to bind and wait for a sender (`'listener'`, the default) or to announce this receiver to one * (`'caller'`). A caller binds an ephemeral port pair and sends RTCP to the URL's address until media * arrives, which is what lets a sender behind NAT learn where to send. */ mode?: 'listener' | 'caller'; /** * Milliseconds a packet may wait for the ones before it, which is also how long a lost packet has to be * retransmitted. Defaults to {@link DEFAULT_RIST_BUFFER_MS}. This is the latency knob MediaConnect * states as "max latency". */ bufferMs?: number; /** Seconds without media before the stream ends. Defaults to 30. */ readTimeout?: number; /** Milliseconds between NACKs for the same missing packet. Defaults to 20. */ nackIntervalMs?: number; /** Maximum bytes to keep for re-reads. Passed through to Mediabunny's `ReadableStreamSource`. */ maxCacheSize?: number; }; /** * Reads a RIST Simple Profile stream (VSF TR-06-1) as an MPEG-TS byte stream: RTP on the URL's even port * carries the transport stream, RTCP on the next port carries the NACKs that ask for what was lost. * * Packets are released in sequence order once their predecessors arrive or `bufferMs` runs out, so a * stream with loss beyond recovery continues with a gap rather than stalling. * * @group \@mediabunny/server * @public */ export declare class RistSource extends ReadableStreamSource { constructor(url: string, options?: RistSourceOptions); } //# sourceMappingURL=rist-source.d.ts.map