@types/react-native-video: Add type for onBuffer argument (#42891)

This commit is contained in:
Philip Frank 2020-03-10 23:10:59 +01:00 committed by GitHub
parent 7ff34d029c
commit 92cbfa7e39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
// Project: https://github.com/react-native-community/react-native-video, https://github.com/brentvatne/react-native-video
// Definitions by: HuHuanming <https://github.com/huhuanming>
// Nekith <https://github.com/Nekith>
// Philip Frank <https://github.com/bananer>
// 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;