-
Notifications
You must be signed in to change notification settings - Fork 10
/
react-native-vlc.d.ts
189 lines (132 loc) · 3.25 KB
/
react-native-vlc.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/**
* Created by nghinv on Thu Jun 04 2020
* Copyright (c) 2020 [email protected]
*/
declare module '@nghinv/react-native-vlc' {
import { PureComponent } from 'react';
import { ViewStyle } from 'react-native';
interface BackHandle {
}
interface Orientation {
}
interface Source {
uri: string;
}
interface VLCPlayerProps {
rate: number;
seek: number;
resume: boolean;
position: number;
snapshotPath: string;
paused: boolean;
autoAspectRatio: boolean;
// '16:9'
videoAspectRatio: string;
// 0 ---> 200
volume: number;
volumeUp: number;
volumeDown: number;
repeat: boolean;
muted: boolean;
initType: 1 | 2;
// [
// '--no-audio',
// '--rtsp-tcp',
// `--network-caching=${150}`,
// `--rtsp-caching=${150}`,
// '--no-stats',
// `--tcp-caching=${150}`,
// `--realrtsp-caching=${150}`,
// ]
initOptions: Array<String>;
hwDecoderEnabled: number;
hwDecoderForced: number;
style: ViewStyle;
onVideoLoadStart: () => void;
onVideoStateChange: () => void;
onVideoProgress: () => void;
onSnapshot: () => void;
onIsPlaying: () => void;
onOpen: () => void;
onLoadStart: () => void;
/* Wrapper component */
source: Source | number;
play: () => void;
snapshot: () => void;
onError: () => void;
onProgress: () => void;
onEnded: () => void;
onStopped: () => void;
onPlaying: () => void;
onPaused: () => void;
/* Required by react-native */
scaleX: number;
scaleY: number;
translateX: number;
translateY: number;
rotation: number;
}
interface VlCPlayerViewProps {
style: ViewStyle;
videoStyle: ViewStyle;
// default false
initPaused: boolean;
// default null
source: Source | number | null;
// default 0
seek: number;
// default false
playInBackground: boolean;
// default false
isAd: boolean;
// default true
autoplay: boolean;
// '1:1'
fullVideoAspectRatio: string;
videoAspectRatio: string;
// default 'Video playback error, please reload'
errorTitle: string;
// default = 250
height: number;
// default false
showAd: boolean;
adUrl: string;
url: string;
// deafault false
showBack: boolean;
// deafault false
showTitle: boolean;
title: string;
// deafault false
showGoLive: boolean,
// deafault true
showLeftButton: boolean;
// deafault true
showMiddleButton: boolean;
// deafault true
showRightButton: boolean;
// deafault true
animationLayout: boolean;
// deafault 'go live'
titleGolive: string;
onEnd: () => void;
onAdEnd: () => void;
startFullScreen: () => void;
closeFullScreen: () => void;
onLeftPress: () => void;
onGoLivePress: () => void;
onReplayPress: () => void;
onVLCPlaying: () => void;
onVLCPaused: () => void;
onVLCProgress: () => void;
onVLCEnded: () => void;
onVLCError: () => void;
onVLCBuffering: () => void;
BackHandle: BackHandle;
Orientation: Orientation;
}
class VLCPlayer extends PureComponent<VLCPlayerProps> {
}
class VlCPlayerView extends PureComponent<VlCPlayerViewProps> {
}
}