forked from cookpete/react-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
76 lines (72 loc) · 1.5 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
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
import * as React from 'react';
export interface SourceProps {
src: string;
type: string;
}
export interface TrackProps {
kind: string;
src: string;
srcLang: string;
default?: boolean;
}
export interface ReactPlayerProps {
url?: string|string[]|SourceProps[];
playing?: boolean;
loop?: boolean;
controls?: boolean;
volume?: number;
muted?: boolean;
playbackRate?: number;
width?: string|number;
height?: string|number;
style?: Object;
progressFrequency?: number;
playsinline?: boolean;
hidden?: boolean;
className?: string;
soundcloudConfig?: {
clientId: string;
showArtwork: boolean;
};
youtubeConfig?: {
playerVars: Object;
preload: boolean;
};
facebookConfig?: {
appId: string;
};
dailymotionConfig?: {
params: Object;
preload: boolean;
};
vimeoConfig?: {
iframeParams: Object;
preload: boolean;
};
vidmeConfig?: {
format: string;
};
fileConfig?: {
attributes: Object;
tracks: TrackProps[];
forceAudio: boolean;
forceHLS: boolean;
forceDASH: boolean;
};
wistiaConfig?: {
options: Object;
};
onReady?(): void;
onStart?(): void;
onPlay?(): void;
onPause?(): void;
onBuffer?(): void;
onEnded?(): void;
onError?(error: any): void;
onDuration?(duration: number): void;
onSeek?(seconds: number): void;
onProgress?(state: { played: number, loaded: number }): void;
}
export default class ReactPlayer extends React.Component<ReactPlayerProps, any> {
seekTo(fraction: number): void;
}