react-native-gif-player
Version:
react native view component for GIF files
38 lines • 1.4 kB
TypeScript
/// <reference types="react" />
/// <reference types="react-native/types/modules/codegen" />
/// <reference types="react-native/codegen" />
import type { ViewProps } from 'react-native';
import type { DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
import type { HostComponent } from 'react-native';
interface SourceProps {
uri?: string;
type?: string;
local?: boolean;
}
interface NativeProps extends ViewProps {
source?: SourceProps;
paused: boolean;
loopCount?: Int32;
onLoad?: DirectEventHandler<Readonly<{
duration: Double;
frameCount: Int32;
}>>;
onStart?: DirectEventHandler<null>;
onStop?: DirectEventHandler<null>;
onEnd?: DirectEventHandler<null>;
onFrame?: DirectEventHandler<Readonly<{
frameNumber: Int32;
}>>;
onError?: DirectEventHandler<Readonly<{
error: string;
}>>;
}
export type GifPlayerViewComponent = HostComponent<NativeProps>;
export interface GifPlayerViewNativeCommands {
jumpToFrame: (viewRef: React.ElementRef<GifPlayerViewComponent>, frameNumber: Int32) => void;
memoryClear: (viewRef: React.ElementRef<GifPlayerViewComponent>) => void;
}
export declare const Commands: GifPlayerViewNativeCommands;
declare const _default: GifPlayerViewComponent;
export default _default;
//# sourceMappingURL=GifPlayerViewNativeComponent.d.ts.map