/*! * 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'; /** * Options for {@link NetworkSource}. * * @group \@mediabunny/server * @public */ export type NetworkSourceOptions = { /** * Seconds to wait for a sender to appear, listening or connecting out. Defaults to 30. Never * infinite: a wait cannot be cancelled once started. */ connectTimeout?: number; /** * Seconds to wait for data from a connected sender before failing. Defaults to 30. When calling * out, the protocol bounds the connect with this same option, so the larger of the two applies. */ readTimeout?: number; /** Maximum bytes to keep for re-reads. Passed through to Mediabunny's `ReadableStreamSource`. */ maxCacheSize?: number; }; /** * A {@link https://mediabunny.dev/guide/reading-media-files#source | Source} that reads a live network * stream — SRT, or MPEG-TS over UDP, RTP, TCP or HTTP — so an `Input` can read it like any other source. * * Supplies bytes only; Mediabunny does the demuxing. The socket is opened on the first read, so * constructing one never blocks. Listens (`srt://0.0.0.0:9000?mode=listener`) or calls out * (`srt://host:9000`). RTMP is not supported; see FORK.md. * * @example * ```ts * const input = new Input({ * source: new NetworkSource('srt://0.0.0.0:9000?mode=listener'), * formats: ALL_FORMATS, * }); * ``` * * @group \@mediabunny/server * @public */ export declare class NetworkSource extends ReadableStreamSource { constructor(url: string, options?: NetworkSourceOptions); } //# sourceMappingURL=network-source.d.ts.map