forked from davidohayon669/react-native-youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
46 lines (40 loc) · 1.37 KB
/
index.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
declare module "react-native-youtube" {
interface Event {
target: number;
}
export interface State extends Event {
state: "buffering" | "playing" | "paused" | "ended";
}
export interface Progress extends Event {
duration: number;
currentTime: number;
}
export interface Error extends Event {
error: "invalid_param" | "html5_error" | "video_not_found" | "not_embeddable" | "unknown";
}
export interface Quality extends Event {
quality: "small" | "medium" | "large" | "hd720" | "hd1080" | "high_res" | "auto" | "default" | "unknown";
}
export interface YoutubeProps {
videoId: string;
play?: boolean;
hidden?: boolean;
playsInline?: boolean;
loop?: boolean;
modestbranding?: boolean;
fs?: boolean;
rel? :boolean;
showinfo?: boolean;
onRead?: () => void;
onChangeState?: (event: State) => void;
onChangeQuality?: (event: Quality) => void;
onError?: (event: Error) => void;
onProgress?: (event: Progress) => void;
onFullScreenExit?: () => void;
onFullScreenEnter?: () => void;
apiKey?: string;
style?: React.ViewStyle;
ref?: React.Ref<React.WebViewStatic & React.ViewStatic>
}
export default class Youtube extends React.Component<YoutubeProps, any>{}
}