-
Notifications
You must be signed in to change notification settings - Fork 180
/
BroadcastConfig.ts
83 lines (70 loc) · 1.7 KB
/
BroadcastConfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { LayoutType, Resolution, StreamMode } from '../enums';
import { RTMPStream } from './RTMPStream';
/**
* Interface representing configuration options for HLS streaming.
*/
export 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).
*/
export 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.
*/
export 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;
}