react-native-video-player
Version:
A <VideoPlayer /> component for React Native with controls
63 lines • 2.39 kB
TypeScript
import { type ImageSourcePropType, type StyleProp, type ViewStyle, type TextStyle, type ImageStyle } from 'react-native';
import { ResizeMode, type OnProgressData, type OnLoadData, type VideoRef, type ReactVideoProps, type ReactVideoSource } from 'react-native-video';
export interface VideoPlayerRef extends VideoRef {
stop: () => void;
}
export interface CustomStyles {
wrapper?: StyleProp<ViewStyle>;
video?: StyleProp<ViewStyle>;
videoWrapper?: StyleProp<ViewStyle>;
controls?: StyleProp<ViewStyle>;
playControl?: StyleProp<ViewStyle>;
controlButton?: StyleProp<ViewStyle>;
controlIcon?: StyleProp<ImageStyle>;
playIcon?: StyleProp<ViewStyle>;
seekBar?: ViewStyle;
seekBarFullWidth?: StyleProp<ViewStyle>;
seekBarProgress?: StyleProp<ViewStyle>;
seekBarKnob?: StyleProp<ViewStyle>;
seekBarKnobSeeking?: StyleProp<ViewStyle>;
seekBarBackground?: StyleProp<ViewStyle>;
thumbnail?: StyleProp<ViewStyle>;
thumbnailImage?: StyleProp<ImageStyle>;
playButton?: StyleProp<ViewStyle>;
playArrow?: StyleProp<ImageStyle>;
durationText?: StyleProp<TextStyle>;
}
export interface VideoPlayerProps extends ReactVideoProps {
animationDuration?: number;
autoplay?: boolean;
controlsTimeout?: number;
customStyles?: CustomStyles;
defaultMuted?: boolean;
disableControlsAutoHide?: boolean;
disableFullscreen?: boolean;
disableSeek?: boolean;
duration?: number;
endThumbnail?: ImageSourcePropType;
endWithThumbnail?: boolean;
fullScreenOnLongPress?: boolean;
hideControlsOnStart?: boolean;
loop?: boolean;
muted?: boolean;
onEnd?: () => void;
onHideControls?: () => void;
onLoad?: (event: OnLoadData) => void;
onMutePress?: (isMuted: boolean) => void;
onPlayPress?: () => void;
onProgress?: (event: OnProgressData) => void;
onShowControls?: () => void;
onStart?: () => void;
pauseOnPress?: boolean;
paused?: boolean;
resizeMode?: ResizeMode;
showDuration?: boolean;
source: ReactVideoSource;
style?: StyleProp<ViewStyle>;
thumbnail?: ImageSourcePropType;
videoHeight?: number;
videoWidth?: number;
}
declare const VideoPlayer: import("react").ForwardRefExoticComponent<VideoPlayerProps & import("react").RefAttributes<VideoPlayerRef>>;
export default VideoPlayer;
//# sourceMappingURL=index.d.ts.map