generated from lanseria/word-replacer-tauri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshims.d.ts
102 lines (95 loc) · 2.02 KB
/
shims.d.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// 定义日志级别类型
type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error'
// 定义API配置
interface ApiConfig {
listen?: string
username?: string
password?: string
base_path?: string
static_dir?: string
origin?: '*'
tls_listen?: string
tls_cert?: string
tls_key?: string
unix_listen?: string
}
// 定义FFmpeg配置
interface FfmpegConfig {
bin?: string
[key: string]: string
}
// 定义HomeKit配件配置
interface HomekitAccessory {
pin?: string
name?: string
device_id?: string
device_private?: string
pairings?: string[]
}
// 定义日志配置
interface LogConfig {
format?: 'color' | 'json' | 'text'
level?: LogLevel
output?: '' | 'stdout' | 'stderr'
time?: string
api?: LogLevel
echo?: LogLevel
exec?: LogLevel
expr?: LogLevel
ffmpeg?: LogLevel
hass?: LogLevel
hls?: LogLevel
homekit?: LogLevel
mp4?: LogLevel
ngrok?: LogLevel
onvif?: LogLevel
rtmp?: LogLevel
rtsp?: LogLevel
streams?: LogLevel
webrtc?: LogLevel
webtorrent?: LogLevel
}
// 定义WebRTC配置
interface WebrtcConfig {
listen?: string
candidates?: string[]
ice_servers?: {
urls: string[]
username?: string
credential?: string
}[]
filters?: {
candidates?: string[]
interfaces?: string[]
ips?: string[]
networks?: ('tcp4' | 'tcp6' | 'udp4' | 'udp6')[]
udp_ports?: [number, number]
}
}
// 定义WebTorrent配置
interface WebtorrentConfig {
trackers?: string[]
shares?: Record<string, { pwd?: string, src?: string }>
}
// 主配置类型
interface Go2RTCConfig {
api: ApiConfig
ffmpeg?: FfmpegConfig
hass?: { config?: string }
homekit?: Record<string, HomekitAccessory>
log: LogConfig
ngrok?: { command?: string }
publish?: Record<string, string | string[]>
rtmp?: { listen?: string }
rtsp?: {
listen?: string
username?: string
password?: string
default_query?: string
pkt_size?: number
}
srtp?: { listen?: string }
streams: Record<string, string>
webrtc: WebrtcConfig
webtorrent?: WebtorrentConfig
}