Skip to content

Commit 83d8282

Browse files
committed
feat: add missing types for PLAYER_STATES, PLAYER_ERRORS
1 parent e191802 commit 83d8282

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

index.d.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ import React from 'react';
22
import {StyleProp, ViewStyle} from 'react-native';
33
import {WebViewProps} from 'react-native-webview';
44

5+
export enum PLAYER_STATES {
6+
ENDED = 'ended',
7+
PAUSED = 'paused',
8+
PLAYING = 'playing',
9+
UNSTARTED = 'unstarted',
10+
BUFFERING = 'buffering',
11+
VIDEO_CUED = 'video cued',
12+
}
13+
14+
export enum PLAYER_ERRORS {
15+
HTML5_ERROR = 'HTML5_error',
16+
VIDEO_NOT_FOUND = 'video_not_found',
17+
EMBED_NOT_ALLOWED = 'embed_not_allowed',
18+
INVALID_PARAMETER = 'invalid_parameter',
19+
}
20+
521
export interface YoutubeIframeRef {
622
getDuration: () => Promise<number>;
723
getVideoUrl: () => Promise<string>;
@@ -156,7 +172,7 @@ export interface YoutubeMeta {
156172
thumbnail_url: string;
157173
}
158174

159-
declare const YoutubeIframe: React.SFC<YoutubeIframeProps>;
175+
declare const YoutubeIframe: React.VFC<YoutubeIframeProps>;
160176

161177
export default YoutubeIframe;
162178

0 commit comments

Comments
 (0)