import React from 'react'; import { ViewStyle } from 'react-native'; interface VideoPlayerProps { uri: string; play: boolean; style: ViewStyle; controls?: boolean; controlsTimeout?: number; volume?: number; showBuffering?: boolean; repeatMode?: RepeatMode; resizeMode?: ResizeMode; onBack?: Function; onFullScreen?: Function; } declare const VideoPlayer: React.FC; declare enum RepeatMode { REPEAT_MODE_OFF = 0, /** * Repeats the currently playing {@link MediaItem} infinitely during ongoing playback. "Previous" * and "Next" actions behave as they do in {@link #REPEAT_MODE_OFF}, moving to the previous and * next {@link MediaItem} respectively, and doing nothing when there is no previous or next {@link * MediaItem} to move to. */ REPEAT_MODE_ONE = 1, /** * Repeats the entire timeline infinitely. "Previous" and "Next" actions behave as they do in * {@link #REPEAT_MODE_OFF}, but with looping at the ends so that "Previous" when playing the * first {@link MediaItem} will move to the last {@link MediaItem}, and "Next" when playing the * last {@link MediaItem} will move to the first {@link MediaItem}. */ REPEAT_MODE_ALL = 2 } declare enum ResizeMode { /** * Either the width or height is decreased to obtain the desired aspect ratio. */ RESIZE_MODE_FIT = 0, /** * The width is fixed and the height is increased or decreased to obtain the desired aspect ratio. */ RESIZE_MODE_FIXED_WIDTH = 1, /** * The height is fixed and the width is increased or decreased to obtain the desired aspect ratio. */ RESIZE_MODE_FIXED_HEIGHT = 2, /** * The height and the width is increased or decreased to fit the size of the view. */ RESIZE_MODE_FILL = 3, /** * Keeps the aspect ratio but takes up the view's size. */ RESIZE_MODE_CENTER_CROP = 4 } export { ResizeMode, RepeatMode }; export default VideoPlayer;