react-native-video-basic-controls
Version:
Controls for the React Native <Video> component at react-native-video.
194 lines (193 loc) • 6.83 kB
TypeScript
export default class SliderOP extends React.PureComponent<any, any, any> {
static propTypes: {
/**
* Initial value of the slider. The value should be between minimumValue
* and maximumValue, which default to 0 and 1 respectively.
* Default value is 0.
*
* *This is not a controlled component*, e.g. if you don't update
* the value, the component won't be reset to its inital value.
*/
value: PropTypes.Requireable<number>;
/**
* If true the user won't be able to move the slider.
* Default value is false.
*/
disabled: PropTypes.Requireable<boolean>;
/**
* Initial minimum value of the slider. Default value is 0.
*/
minimumValue: PropTypes.Requireable<number>;
/**
* Initial maximum value of the slider. Default value is 1.
*/
maximumValue: PropTypes.Requireable<number>;
bufferValue: PropTypes.Requireable<number>;
/**
* Step value of the slider. The value should be between 0 and
* (maximumValue - minimumValue). Default value is 0.
*/
step: PropTypes.Requireable<number>;
/**
* The color used for the track to the left of the button. Overrides the
* default blue gradient image.
*/
minimumTrackTintColor: PropTypes.Requireable<string>;
bufferTrackTintColor: PropTypes.Requireable<string>;
/**
* The color used for the track to the right of the button. Overrides the
* default blue gradient image.
*/
maximumTrackTintColor: PropTypes.Requireable<string>;
/**
* The color used for the thumb.
*/
thumbTintColor: PropTypes.Requireable<string>;
/**
* The size of the touch area that allows moving the thumb.
* The touch area has the same center has the visible thumb.
* This allows to have a visually small thumb while still allowing the user
* to move it easily.
* The default is {width: 40, height: 40}.
*/
thumbTouchSize: PropTypes.Requireable<PropTypes.InferProps<{
width: PropTypes.Requireable<number>;
height: PropTypes.Requireable<number>;
}>>;
/**
* Callback continuously called while the user is dragging the slider.
*/
onValueChange: PropTypes.Requireable<(...args: any[]) => any>;
/**
* Callback called when the user starts changing the value (e.g. when
* the slider is pressed).
*/
onSlidingStart: PropTypes.Requireable<(...args: any[]) => any>;
/**
* Callback called when the user finishes changing the value (e.g. when
* the slider is released).
*/
onSlidingComplete: PropTypes.Requireable<(...args: any[]) => any>;
/**
* The style applied to the slider container.
*/
style: any;
/**
* The style applied to the track.
*/
trackStyle: any;
/**
* The style applied to the thumb.
*/
thumbStyle: any;
/**
* Sets an image for the thumb.
*/
thumbImage: any;
/**
* Set this to true to visually see the thumb touch rect in green.
*/
debugTouchArea: PropTypes.Requireable<boolean>;
/**
* Set to true to animate values with default 'timing' animation type
*/
animateTransitions: PropTypes.Requireable<boolean>;
/**
* Custom Animation type. 'spring' or 'timing'.
*/
animationType: PropTypes.Requireable<string>;
/**
* Used to configure the animation parameters. These are the same parameters in the Animated library.
*/
animationConfig: PropTypes.Requireable<object>;
/**
* Used to replace Image component.
*/
iconComponent: PropTypes.Requireable<object>;
};
static defaultProps: {
value: number;
minimumValue: number;
maximumValue: number;
bufferValue: number;
step: number;
minimumTrackTintColor: string;
bufferTrackTintColor: string;
maximumTrackTintColor: string;
thumbTintColor: string;
thumbTouchSize: {
width: number;
height: number;
};
debugTouchArea: boolean;
animationType: string;
};
constructor(props: any);
state: {
containerSize: {
width: number;
height: number;
};
trackSize: {
width: number;
height: number;
};
thumbSize: {
width: number;
height: number;
};
allMeasured: boolean;
value: Animated.Value;
};
_panResponder: import("react-native").PanResponderInstance;
componentDidUpdate(prevProps: any): void;
render(): JSX.Element;
_getPropsForComponentUpdate(props: any): any;
_handleStartShouldSetPanResponder: (e: any) => boolean;
_handleMoveShouldSetPanResponder(): boolean;
_handlePanResponderGrant: () => void;
_previousLeft: number | undefined;
_handlePanResponderMove: (e: any, gestureState: any) => void;
_handlePanResponderRequestEnd(e: any, gestureState: any): boolean;
_handlePanResponderEnd: (e: any, gestureState: any) => void;
_measureContainer: (x: any) => void;
_measureTrack: (x: any) => void;
_measureThumb: (x: any) => void;
_handleMeasure: (name: any, x: any) => void;
_getRatio: (value: any) => number;
_getThumbLeft: (value: any) => number;
_getValue: (gestureState: any) => number;
_getCurrentValue: () => any;
_setCurrentValue: (value: any) => void;
_setCurrentValueAnimated: (value: any) => void;
_fireChangeEvent: (event: any) => void;
_getTouchOverflowSize: () => {
width: number;
height: number;
};
_getTouchOverflowStyle: () => {
marginTop: number;
marginBottom: number;
marginLeft: number;
marginRight: number;
backgroundColor: string;
opacity: number;
};
_thumbHitTest: (e: any) => boolean;
_getThumbTouchRect: () => Rect;
_renderDebugThumbTouchRect: (thumbLeft: any) => JSX.Element;
_renderThumbImage: () => JSX.Element | undefined;
}
import React from "react";
import { Animated } from "react-native";
declare function Rect(x: any, y: any, width: any, height: any): void;
declare class Rect {
constructor(x: any, y: any, width: any, height: any);
x: any;
y: any;
width: any;
height: any;
containsPoint(x: any, y: any): boolean;
}
import PropTypes from "prop-types";
export {};