UNPKG

@vonage/video

Version:

Package to interact with the Vonage Video API (Not OpenTok Compatible)

76 lines (73 loc) 1.98 kB
import { LayoutType } from '../enums/LayoutType.js'; import { Resolution } from '../enums/Resolution.js'; import { StreamMode } from '../enums/StreamMode.js'; import { RTMPStream } from './RTMPStream.js'; /** * Interface representing configuration options for HLS streaming. */ type HLSConfig = { /** * Whether to enable low-latency mode for the HLS stream. */ lowLatency?: boolean; /** * Whether to enable DVR functionality (rewinding, pausing, and resuming) in players that support it. */ dvr?: boolean; }; /** * Interface representing configuration options for different types of broadcast streams (HLS and RTMP). */ type BroadcastOutputs = { /** * Configuration options for HLS streaming. */ hls?: HLSConfig; /** * Configuration options for RTMP streaming. */ rtmp: RTMPStream[]; }; /** * Interface representing configuration options for a live streaming broadcast. */ type BroadcastConfig = { /** * The unique tag for simultaneous broadcasts (if one was set). */ multiBroadcastTag?: string; /** * The maximum duration for the broadcast, in seconds. The broadcast will * automatically stop when the maximum duration is reached. */ maxDuration?: number; /** * The maximum bitrate for the stream. */ maxBitrate?: number; /** * The layout type for the broadcast. */ layout?: LayoutType; /** * Whether the broadcast has audio. */ hasAudio?: boolean; /** * Whether the broadcast has video. */ hasVideo?: boolean; /** * Configuration options for different types of broadcast streams (HLS and RTMP). */ outputs: BroadcastOutputs; /** * The stream mode for the broadcast. */ streamMode?: StreamMode; /** * The resolution of the broadcast. */ resolution?: Resolution; }; export type { BroadcastConfig, BroadcastOutputs, HLSConfig };