-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvideoPlayer.d.ts
47 lines (45 loc) · 1.52 KB
/
videoPlayer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import React from 'react'
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
type InputItemStyle = {
container: ViewStyle;
touchView: ViewStyle;
centerMenusContainer: ViewStyle;
topMenusContainer: ViewStyle;
bottomMenusContainer: ViewStyle;
seekTimeModal: ViewStyle;
modal: ViewStyle;
progress: ViewStyle;
readProgress: ViewStyle;
}
declare interface VideoProps {
onLoad?: void;
onError?: void;
onBuffer?: void;
onProgress?: void;
muted?: boolean;
volume?: number;
paused?: boolean;
currentTime?: number,
style: StyleProp<ViewStyle>;
[key: string]: any;
}
interface VideoPlayerProps extends VideoProps{
renderCenterMenus?: (state: object, props: VideoPlayerProps) => React.ReactNode;
renderTopMenus?: (state: object, props: VideoPlayerProps) => React.ReactNode;
renderBottomMenus?: (state: object, props: VideoPlayerProps) => React.ReactNode;
renderSeekTime?: (state: object, props: VideoPlayerProps) => React.ReactNode;
renderLoading?: (state: object, props: VideoPlayerProps) => React.ReactNode;
setFullScreen?: () => void,
setNavigator?: () => void,
setSetting?: () => void,
styles?: Partial<InputItemStyle>,
children?: JSX.Element[] | JSX.Element;
}
declare class VideoPlayer extends React.PureComponent<VideoPlayerProps> {
showSeekTimerComponent: () => void;
showMenusComponent: () => void;
toggleMenusComponent: () => void;
render(): JSX.Element;
setPaused: () => void;
}
export default VideoPlayer;