forked from howardchung/watchparty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
82 lines (72 loc) · 1.58 KB
/
global.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
declare module 'youtube-api';
declare module 'react-semantic-ui-range';
declare module 'srt-webvtt';
type StringDict = { [key: string]: string };
type NumberDict = { [key: string]: number };
type BooleanDict = { [key: string]: boolean };
type AnyDict = { [key: string]: any };
type PCDict = { [key: string]: RTCPeerConnection };
type HTMLVideoElementDict = { [key: string]: HTMLVideoElement };
type MediaType = 'vbrowser' | 'screenshare' | 'video' | 'youtube';
interface User {
id: string;
isVideoChat?: boolean;
isMuted?: boolean;
isScreenShare?: boolean;
isSub?: boolean;
clientId: string;
}
interface Reaction {
user: string;
value: string;
msgId: string;
msgTimestamp: string;
}
interface ChatMessageBase {
id: string;
cmd?: string;
msg: string;
system?: boolean;
isSub?: boolean;
}
interface ChatMessage extends ChatMessageBase {
timestamp: string;
videoTS?: number;
reactions?: { [value: string]: string[] };
}
interface Settings {
disableChatSound?: boolean;
}
interface PlaylistVideo {
url: string;
name: string;
img?: string;
channel?: string;
duration: number;
}
interface SearchResult extends PlaylistVideo {
size?: string;
seeders?: string;
magnet?: string;
type: string;
url: string;
name: string;
duration: number;
}
interface HostState {
video: string;
videoTS: number;
subtitle: string;
paused: boolean;
isVBrowserLarge: boolean;
controller?: string;
}
interface PersistentRoom {
roomId: string;
password: string;
owner: string;
vanity: string;
isChatDisabled: boolean;
isSubRoom: boolean;
data: any;
}