From 92cbfa7e392e0a058083c8f2e07da3f1e64570ee Mon Sep 17 00:00:00 2001 From: Philip Frank Date: Tue, 10 Mar 2020 23:10:59 +0100 Subject: [PATCH] @types/react-native-video: Add type for onBuffer argument (#42891) --- types/react-native-video/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/react-native-video/index.d.ts b/types/react-native-video/index.d.ts index da33ef7108..9e5f6dd081 100644 --- a/types/react-native-video/index.d.ts +++ b/types/react-native-video/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/react-native-community/react-native-video, https://github.com/brentvatne/react-native-video // Definitions by: HuHuanming // Nekith +// Philip Frank // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -59,6 +60,10 @@ export interface OnExternalPlaybackChangeData { isExternalPlaybackActive: boolean; } +export interface OnBufferData { + isBuffering: boolean; +} + export const TextTrackType: { SRT: 'application/x-subrip'; TTML: 'application/ttml+xml'; @@ -144,7 +149,7 @@ export interface VideoProperties extends ViewProps { onLoadStart?(): void; onLoad?(data: OnLoadData): void; - onBuffer?(): void; + onBuffer?(data: OnBufferData): void; onError?(error: LoadError): void; onProgress?(data: OnProgressData): void; onBandwidthUpdate?(data: OnBandwidthUpdateData): void;