Skip to content

Commit 8c9d14d

Browse files
committed
Updated TypeScript typings
1 parent f96f203 commit 8c9d14d

1 file changed

Lines changed: 62 additions & 34 deletions

File tree

index.d.ts

Lines changed: 62 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,80 @@ export interface TrackProps {
1212
default?: boolean;
1313
}
1414

15+
export interface SoundCloudConfig {
16+
options?: Object;
17+
}
18+
19+
export interface YouTubeConfig {
20+
playerVars?: Object;
21+
preload?: boolean;
22+
}
23+
24+
export interface FacebookConfig {
25+
appId: string;
26+
}
27+
28+
export interface DailyMotionConfig {
29+
params?: Object;
30+
preload?: boolean;
31+
}
32+
33+
export interface VimeoConfig {
34+
iframeParams?: Object;
35+
preload?: boolean;
36+
}
37+
38+
export interface VidmeConfig {
39+
format?: string;
40+
}
41+
42+
export interface WistiaConfig {
43+
options?: Object;
44+
}
45+
46+
export interface FileConfig {
47+
attributes?: Object;
48+
tracks?: TrackProps[];
49+
forceAudio?: boolean;
50+
forceHLS?: boolean;
51+
forceDASH?: boolean;
52+
}
53+
54+
export interface Config {
55+
soundcloud?: SoundCloudConfig;
56+
youtube?: YouTubeConfig;
57+
facebook?: FacebookConfig;
58+
dailymotion?: DailyMotionConfig;
59+
vimeo?: VimeoConfig;
60+
vidme?: VidmeConfig;
61+
file?: FileConfig;
62+
wistia?: WistiaConfig;
63+
}
64+
1565
export interface ReactPlayerProps {
16-
url?: string|string[]|SourceProps[];
66+
url?: string | string[] | SourceProps[];
1767
playing?: boolean;
1868
loop?: boolean;
1969
controls?: boolean;
2070
volume?: number;
2171
muted?: boolean;
2272
playbackRate?: number;
23-
width?: string|number;
24-
height?: string|number;
73+
width?: string | number;
74+
height?: string | number;
2575
style?: Object;
2676
progressFrequency?: number;
2777
playsinline?: boolean;
2878
hidden?: boolean;
2979
className?: string;
30-
soundcloudConfig?: {
31-
options: Object;
32-
};
33-
youtubeConfig?: {
34-
playerVars: Object;
35-
preload: boolean;
36-
};
37-
facebookConfig?: {
38-
appId: string;
39-
};
40-
dailymotionConfig?: {
41-
params: Object;
42-
preload: boolean;
43-
};
44-
vimeoConfig?: {
45-
iframeParams: Object;
46-
preload: boolean;
47-
};
48-
vidmeConfig?: {
49-
format: string;
50-
};
51-
fileConfig?: {
52-
attributes: Object;
53-
tracks: TrackProps[];
54-
forceAudio: boolean;
55-
forceHLS: boolean;
56-
forceDASH: boolean;
57-
};
58-
wistiaConfig?: {
59-
options: Object;
60-
};
80+
config?: Config;
81+
soundcloudConfig?: SoundCloudConfig;
82+
youtubeConfig?: YouTubeConfig;
83+
facebookConfig?: FacebookConfig;
84+
dailymotionConfig?: DailyMotionConfig;
85+
vimeoConfig?: VimeoConfig;
86+
vidmeConfig?: VidmeConfig;
87+
fileConfig?: FileConfig;
88+
wistiaConfig?: WistiaConfig;
6189
onReady?(): void;
6290
onStart?(): void;
6391
onPlay?(): void;

0 commit comments

Comments
 (0)