From 8563b0ce6a8b9d842c71feecb1eca05cb350719e Mon Sep 17 00:00:00 2001 From: abrahambotros Date: Sat, 2 Sep 2017 09:42:57 -0700 Subject: [PATCH 1/3] [react-native-video] Add onProgress data --- types/react-native-video/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/react-native-video/index.d.ts b/types/react-native-video/index.d.ts index 8b31bfed0d..b264df6d64 100644 --- a/types/react-native-video/index.d.ts +++ b/types/react-native-video/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for react-native-video 1.0 +// Type definitions for react-native-video 2.0 // Project: https://github.com/react-native-community/react-native-video // Definitions by: HuHuanming +// abrahambotros // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -48,7 +49,10 @@ export interface VideoProperties extends ViewProperties { onLoad?(): void; onBuffer?(): void; onError?(): void; - onProgress?(): void; + onProgress?(data: { + currentTime: number, + playableDuration: number, + }): void; onSeek?(): void; onEnd?(): void; onFullscreenPlayerWillPresent?(): void; From 0fa3e15d6092dd6794085170bb41c0ff64e4decc Mon Sep 17 00:00:00 2001 From: abrahambotros Date: Sat, 2 Sep 2017 09:49:12 -0700 Subject: [PATCH 2/3] [react-native-video] Add onProgress data test --- .../react-native-video-tests.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/types/react-native-video/react-native-video-tests.tsx b/types/react-native-video/react-native-video-tests.tsx index e0ec0bad73..b2ea41ce92 100644 --- a/types/react-native-video/react-native-video-tests.tsx +++ b/types/react-native-video/react-native-video-tests.tsx @@ -7,16 +7,27 @@ import { } from 'react-native'; import Video from 'react-native-video'; -class SwiperTest extends React.Component { +class VideoTest extends React.Component { constructor(props: {}) { super(props); } render(): React.ReactElement { return ( -