@byteplus/react-native-live-pull 1.1.3-rc.3 → 1.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/volcengine/velive/rn/pull/ClassHelper.java +15 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/NativeVariableManager.java +1 -1
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModule.java +2 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/autogen/MethodSignature.java +66 -77
- package/android/src/main/java/com/volcengine/velive/rn/pull/pictureInpicture/FloatingWindowService.java +79 -15
- package/ios/VeLivePlayerMultiObserver.h +3 -2
- package/ios/VeLivePlayerMultiObserver.m +2 -2
- package/ios/include/react-native-velive-pull.modulemap +4 -0
- package/ios/pictureInpicture/PictureInPictureManager.h +21 -1
- package/ios/pictureInpicture/PictureInPictureManager.m +254 -141
- package/lib/commonjs/index.js +4455 -1648
- package/lib/module/index.js +4455 -1648
- package/lib/typescript/codegen/android/api.d.ts +51 -43
- package/lib/typescript/codegen/android/callback.d.ts +166 -0
- package/lib/typescript/codegen/android/errorcode.d.ts +123 -2
- package/lib/typescript/codegen/android/keytype.d.ts +501 -13
- package/lib/typescript/codegen/ios/api.d.ts +232 -16
- package/lib/typescript/codegen/ios/callback.d.ts +137 -1
- package/lib/typescript/codegen/ios/errorcode.d.ts +104 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +460 -6
- package/lib/typescript/codegen/pack/api.d.ts +66 -57
- package/lib/typescript/codegen/pack/callback.d.ts +45 -21
- package/lib/typescript/codegen/pack/errorcode.d.ts +45 -15
- package/lib/typescript/codegen/pack/keytype.d.ts +388 -114
- package/lib/typescript/core/api.d.ts +13 -0
- package/lib/typescript/core/keytype.d.ts +18 -2
- package/package.json +1 -1
- package/react-native-velive-pull.podspec +12 -3
- package/ios/pictureInpicture/VeLivePictureInPictureController.h +0 -207
- package/ios/pictureInpicture/VeLivePictureInPictureController.m +0 -3393
|
@@ -1,261 +1,749 @@
|
|
|
1
1
|
import { int, String, List, long, float, ByteBuffer, EGLContext } from './types';
|
|
2
2
|
export declare enum VeLivePlayerResolution {
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
/** {en}
|
|
5
|
+
* @brief Original.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
VeLivePlayerResolutionOrigin = "origin",
|
|
9
|
+
|
|
10
|
+
/** {en}
|
|
11
|
+
* @brief Ultra high definition (UHD).
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
VeLivePlayerResolutionUHD = "uhd",
|
|
15
|
+
|
|
16
|
+
/** {en}
|
|
17
|
+
* @brief High definition (HD).
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
VeLivePlayerResolutionHD = "hd",
|
|
21
|
+
|
|
22
|
+
/** {en}
|
|
23
|
+
* @brief Standard definition (SD).
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
VeLivePlayerResolutionSD = "sd",
|
|
27
|
+
|
|
28
|
+
/** {en}
|
|
29
|
+
* @brief Low definition (LD).
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
VeLivePlayerResolutionLD = "ld",
|
|
33
|
+
|
|
34
|
+
/** {en}
|
|
35
|
+
* @brief AO pure audio stream.
|
|
36
|
+
* @hidden (Android)
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
VeLivePlayerResolutionAO = "ao"
|
|
13
40
|
}
|
|
14
41
|
export declare class VeLivePlayerConfiguration {
|
|
15
42
|
|
|
43
|
+
/** {en}
|
|
44
|
+
* @brief Whether to enable the parsing of string SEI messages. The default value is `false`.<br/>
|
|
45
|
+
* - true: Enable;
|
|
46
|
+
* - false: Disable.
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
16
49
|
enableSei: boolean;
|
|
17
50
|
|
|
51
|
+
/** {en}
|
|
52
|
+
* @brief Whether to enable the parsing of binary SEI messages. The default value is `false`. <br>
|
|
53
|
+
* - true: Enable;
|
|
54
|
+
* - false: Disable.
|
|
55
|
+
* @notes After binary SEI is enabled, callbacks for string SEI will no longer be sent.
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
enableBinarySei: boolean;
|
|
59
|
+
|
|
60
|
+
/** {en}
|
|
61
|
+
* @brief Whether to turn on hardware decoding. The default value is `true`. When hardware decoding is enabled, if the player fails to start hardware decoding or if hardware decoding fails, the player automatically switches to software decoding. <br>
|
|
62
|
+
* - true: Enable;
|
|
63
|
+
* - false: Disable.
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
18
66
|
enableHardwareDecode: boolean;
|
|
19
67
|
|
|
68
|
+
/** {en}
|
|
69
|
+
* @brief Network timeout duration, in milliseconds. The default value is `5000`. Once the player sends a network request, if the player does not receive a response from the server after the timeout duration, the network request is considered failed.
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
20
72
|
networkTimeoutMs: int;
|
|
21
73
|
|
|
74
|
+
/** {en}
|
|
75
|
+
* @brief The retry time interval, in milliseconds. The default value is `5000`. This variable takes effect only when there is no backup stream.<br>
|
|
76
|
+
* - In the absence of a backup stream, if playback is interrupted due to network issues or other anomalies, the player will immediately initiate a retry. The player will make the first three retries immediately without any waiting time. However, for subsequent retries starting from the fourth attempt, the player will wait for the specified time interval between each attempt.
|
|
77
|
+
* - In the presence of a backup stream, the time interval will not take effect because all retries will be executed immediately without any waiting time.
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
22
80
|
retryIntervalTimeMs: int;
|
|
23
81
|
|
|
82
|
+
/** {en}
|
|
83
|
+
* @brief In the case of a network connection error, the maximum number of automatic retries of the player. The default value is `5`. If the value is `0`, the player will not automatically retry.<br>
|
|
84
|
+
* - In the absence of a backup stream, each retry will count as one retry attempt.
|
|
85
|
+
* - In the presence of a backup stream, each switch between the primary stream and the backup stream will count as a retry attempt.
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
24
88
|
retryMaxCount: int;
|
|
25
89
|
|
|
90
|
+
/** {en}
|
|
91
|
+
* @brief Whether to enable local DNS prefetch. The default value is `false`. Enabling local DNS prefetch can reduce the time required to start playback. If an abnormality occurs with local DNS prefetch, the player may not function properly. <br>
|
|
92
|
+
* - true: Enable;
|
|
93
|
+
* - false: Disable.
|
|
94
|
+
*
|
|
95
|
+
*/
|
|
26
96
|
enableLiveDNS: boolean;
|
|
27
97
|
|
|
98
|
+
/** {en}
|
|
99
|
+
* @brief Whether to enable periodic callbacks for playback information. The default value is `false`. Refer to [VeLivePlayerStatistics](#VeLivePlayerStatistics) for more information on callback statistics. If `enableStatisticsCallback` is `true` and [statisticsCallbackInterval](#VeLivePlayerConfiguration-statisticscallbackinterval) is greater than `0`, the player will periodically report the player status information after the specified time interval.<br/>
|
|
100
|
+
* - true: Enable;
|
|
101
|
+
* - false: Disable.
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
28
104
|
enableStatisticsCallback: boolean;
|
|
29
105
|
|
|
106
|
+
/** {en}
|
|
107
|
+
* @brief The time interval for periodic callbacks that provide playback information, in seconds. The default value is `5`. If [enableStatisticsCallback](#VeLivePlayerConfiguration-enablestatisticscallback) is `true` and `statisticsCallbackInterval` is greater than `0`, the player will periodically report the player status information after the specified time interval.
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
30
110
|
statisticsCallbackInterval: int;
|
|
31
111
|
}
|
|
32
112
|
export declare enum VeLivePlayerFormat {
|
|
33
113
|
|
|
114
|
+
/** {en}
|
|
115
|
+
* @brief FLV.
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
34
118
|
VeLivePlayerFormatFLV = 0,
|
|
35
119
|
|
|
120
|
+
/** {en}
|
|
121
|
+
* @brief HLS.
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
36
124
|
VeLivePlayerFormatHLS = 1,
|
|
37
125
|
|
|
38
|
-
|
|
126
|
+
/** {en}
|
|
127
|
+
* @brief Real Time Media (RTM).
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
VeLivePlayerFormatRTM = 2,
|
|
131
|
+
|
|
132
|
+
/** {en}
|
|
133
|
+
* @brief CMAF format
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
VeLivePlayerFormatCMAF = 3
|
|
39
137
|
}
|
|
40
138
|
export declare enum VeLivePlayerProtocol {
|
|
41
139
|
|
|
140
|
+
/** {en}
|
|
141
|
+
* @brief TCP.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
42
144
|
VeLivePlayerProtocolTCP = 0,
|
|
43
145
|
|
|
146
|
+
/** {en}
|
|
147
|
+
* @brief QUIC.
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
44
150
|
VeLivePlayerProtocolQUIC = 1,
|
|
45
151
|
|
|
46
|
-
|
|
152
|
+
/** {en}
|
|
153
|
+
* @brief TLS.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
VeLivePlayerProtocolTLS = 2,
|
|
157
|
+
|
|
158
|
+
/** {en}
|
|
159
|
+
* @brief HTTP2.0 protocol
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
VeLivePlayerProtocolHTTP2 = 3
|
|
47
163
|
}
|
|
48
164
|
export declare enum VeLivePlayerMirror {
|
|
49
165
|
|
|
166
|
+
/** {en}
|
|
167
|
+
* @brief No mirroring.
|
|
168
|
+
*
|
|
169
|
+
*/
|
|
50
170
|
VeLivePlayerMirrorNone = 0,
|
|
51
171
|
|
|
172
|
+
/** {en}
|
|
173
|
+
* @brief Horizontal mirroring.
|
|
174
|
+
*
|
|
175
|
+
*/
|
|
52
176
|
VeLivePlayerMirrorHorizontal = 1,
|
|
53
177
|
|
|
178
|
+
/** {en}
|
|
179
|
+
* @brief Vertical mirroring.
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
54
182
|
VeLivePlayerMirrorVertical = 2
|
|
55
183
|
}
|
|
56
184
|
export declare enum VeLivePlayerVideoBufferType {
|
|
57
185
|
|
|
186
|
+
/** {en}
|
|
187
|
+
* @brief Unknown format.
|
|
188
|
+
*
|
|
189
|
+
*/
|
|
58
190
|
VeLivePlayerVideoBufferTypeUnknown = 0,
|
|
59
191
|
|
|
192
|
+
/** {en}
|
|
193
|
+
* @brief ByteBuffer.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
60
196
|
VeLivePlayerVideoBufferTypeByteBuffer = 1,
|
|
61
197
|
|
|
198
|
+
/** {en}
|
|
199
|
+
* @brief ByteArray.
|
|
200
|
+
*
|
|
201
|
+
*/
|
|
62
202
|
VeLivePlayerVideoBufferTypeByteArray = 2,
|
|
63
203
|
|
|
204
|
+
/** {en}
|
|
205
|
+
* @brief Texture.
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
64
208
|
VeLivePlayerVideoBufferTypeTexture = 3
|
|
65
209
|
}
|
|
66
210
|
export declare enum VeLivePlayerStatus {
|
|
67
211
|
|
|
212
|
+
/** {en}
|
|
213
|
+
* @brief The playback is stopped.
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
68
216
|
VeLivePlayerStatusStopped = 0,
|
|
69
217
|
|
|
218
|
+
/** {en}
|
|
219
|
+
* @brief The playback is paused.
|
|
220
|
+
*
|
|
221
|
+
*/
|
|
70
222
|
VeLivePlayerStatusPaused = 1,
|
|
71
223
|
|
|
224
|
+
/** {en}
|
|
225
|
+
* @brief The player finishes preparing and is waiting to render the video.
|
|
226
|
+
*
|
|
227
|
+
*/
|
|
72
228
|
VeLivePlayerStatusPrepared = 2,
|
|
73
229
|
|
|
230
|
+
/** {en}
|
|
231
|
+
* @brief Playback is currently in progress, meaning that the first frame has been rendered and no errors have occurred to the player.
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
74
234
|
VeLivePlayerStatusPlaying = 3,
|
|
75
235
|
|
|
236
|
+
/** {en}
|
|
237
|
+
* @brief An error has occurred to the player.
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
76
240
|
VeLivePlayerStatusError = 4
|
|
77
241
|
}
|
|
78
242
|
export declare class VeLivePlayerLogConfig {
|
|
79
243
|
|
|
244
|
+
/** {en}
|
|
245
|
+
* @brief The log file directory path. The default value is `/cache/Log`.
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
80
248
|
logPath: String;
|
|
81
249
|
|
|
250
|
+
/** {en}
|
|
251
|
+
* @brief The maximum size of log files, in MB. The default value is `100`.
|
|
252
|
+
*
|
|
253
|
+
*/
|
|
82
254
|
maxLogSizeM: int;
|
|
83
255
|
|
|
256
|
+
/** {en}
|
|
257
|
+
* @brief The size of a single log file, in MB. The default value is `2`.
|
|
258
|
+
*
|
|
259
|
+
*/
|
|
84
260
|
singleLogSizeM: int;
|
|
85
261
|
|
|
262
|
+
/** {en}
|
|
263
|
+
* @brief The log expiration time, in seconds. Once a log file expires, a new log file will be created and the existing file will be deleted. The default value is `604800`, or seven days.
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
86
266
|
logExpireTimeS: int;
|
|
87
267
|
|
|
268
|
+
/** {en}
|
|
269
|
+
* @brief Whether to print log in the console. The default value is `true`.
|
|
270
|
+
*
|
|
271
|
+
*/
|
|
88
272
|
enableConsole: boolean;
|
|
89
273
|
|
|
274
|
+
/** {en}
|
|
275
|
+
* @brief Whether to save log to a file. The default value is `true`.
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
90
278
|
enableLogFile: boolean;
|
|
91
279
|
|
|
280
|
+
/** {en}
|
|
281
|
+
* @brief The upload URL of the log file.
|
|
282
|
+
*
|
|
283
|
+
*/
|
|
92
284
|
queryUrl: String;
|
|
93
285
|
|
|
286
|
+
/** {en}
|
|
287
|
+
* @brief Whether to enable thread polling. <br>
|
|
288
|
+
* - `true`: Enable
|
|
289
|
+
* - `false`: Disable
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
94
292
|
enableThreadLoop: boolean;
|
|
95
293
|
|
|
294
|
+
/** {en}
|
|
295
|
+
* @brief The polling interval, in milliseconds. The value should be greater than 0.
|
|
296
|
+
*
|
|
297
|
+
*/
|
|
96
298
|
intervalMS: int;
|
|
97
299
|
|
|
300
|
+
/** {en}
|
|
301
|
+
* @brief The timeout for an HTTP request. Value range: > 0.
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
98
304
|
httpTimeoutMS: int;
|
|
99
305
|
|
|
306
|
+
/** {en}
|
|
307
|
+
* @brief The timeout for an HTTP request to upload a file. Value range: > 0.
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
100
310
|
httpUploadFileTimeoutMS: int;
|
|
101
311
|
|
|
312
|
+
/** {en}
|
|
313
|
+
* @brief The output log level. The default value is `VeLivePlayerLogLevelDebug`. For details, see [VeLivePlayerLogLevel](#VeLivePlayerLogLevel).
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
102
316
|
logLevel: VeLivePlayerLogLevel;
|
|
103
317
|
}
|
|
104
318
|
export declare class VeLivePlayerStreamData {
|
|
105
319
|
|
|
320
|
+
/** {en}
|
|
321
|
+
* @brief Whether to enable adaptive bitrate (ABR). The default value is `false`. <br>
|
|
322
|
+
* - true: Enable;
|
|
323
|
+
* - false: Disable.
|
|
324
|
+
*
|
|
325
|
+
*/
|
|
106
326
|
enableABR: boolean;
|
|
107
327
|
|
|
328
|
+
/** {en}
|
|
329
|
+
* @brief Whether to enable switching between primary and backup streams. The default value is `false`. <br>
|
|
330
|
+
* - true: Enable;
|
|
331
|
+
* - false: Disable.
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
108
334
|
enableMainBackupSwitch: boolean;
|
|
109
335
|
|
|
336
|
+
/** {en}
|
|
337
|
+
* @brief The default resolution. The default value is `VeLivePlayerResolutionOrigin`, which indicates the original resolution. See [VeLivePlayerResolution](#VeLivePlayerResolution) for details.
|
|
338
|
+
*
|
|
339
|
+
*/
|
|
110
340
|
defaultResolution: VeLivePlayerResolution;
|
|
111
341
|
|
|
342
|
+
/** {en}
|
|
343
|
+
* @brief The default video format. The default value is `VeLivePlayerFormatFLV`. See [VeLivePlayerFormat](#VeLivePlayerFormat) for details.
|
|
344
|
+
*
|
|
345
|
+
*/
|
|
112
346
|
defaultFormat: VeLivePlayerFormat;
|
|
113
347
|
|
|
348
|
+
/** {en}
|
|
349
|
+
* @brief The default transmission protocol. The default value is `VeLivePlayerProtocolTCP`. See [VeLivePlayerProtocol](#VeLivePlayerProtocol) for details.
|
|
350
|
+
*
|
|
351
|
+
*/
|
|
114
352
|
defaultProtocol: VeLivePlayerProtocol;
|
|
115
353
|
|
|
354
|
+
/** {en}
|
|
355
|
+
* @brief A list of main stream addresses. See [VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream) for details.
|
|
356
|
+
*
|
|
357
|
+
*/
|
|
116
358
|
mainStreamList: List<VeLivePlayerStream>;
|
|
117
359
|
|
|
360
|
+
/** {en}
|
|
361
|
+
* @brief A list of backup stream addresses. See [VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream) for details.
|
|
362
|
+
*
|
|
363
|
+
*/
|
|
118
364
|
backupStreamList: List<VeLivePlayerStream>;
|
|
119
365
|
}
|
|
120
366
|
export declare enum VeLivePlayerResolutionSwitchReason {
|
|
121
367
|
|
|
368
|
+
/** {en}
|
|
369
|
+
* @brief The resolution is switched automatically through the adaptive bitrate (ABR) feature.
|
|
370
|
+
*
|
|
371
|
+
*/
|
|
122
372
|
VeLiveplayerResolutionSwitchByAuto = 0,
|
|
123
373
|
|
|
374
|
+
/** {en}
|
|
375
|
+
* @brief The resolution is changed after switchResolution{@link #VeLivePlayer#switchResolution} is called.
|
|
376
|
+
*
|
|
377
|
+
*/
|
|
124
378
|
VeLiveplayerResolutionSwitchByManual = 1
|
|
125
379
|
}
|
|
126
380
|
export declare class VeLivePlayerStream {
|
|
127
381
|
constructor();
|
|
128
382
|
|
|
383
|
+
/** {en}
|
|
384
|
+
* @brief The pull stream address.
|
|
385
|
+
*
|
|
386
|
+
*/
|
|
129
387
|
url: String;
|
|
130
388
|
|
|
389
|
+
/** {en}
|
|
390
|
+
* @brief The playback resolution. For details, see [VeLivePlayerResolution](#VeLivePlayerResolution).
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
131
393
|
resolution: VeLivePlayerResolution;
|
|
132
394
|
|
|
395
|
+
/** {en}
|
|
396
|
+
* @brief The playback bitrate, in Kbps.
|
|
397
|
+
*
|
|
398
|
+
*/
|
|
133
399
|
bitrate: long;
|
|
134
400
|
|
|
401
|
+
/** {en}
|
|
402
|
+
* @brief The format of the live stream. See [VeLivePlayerFormat](#VeLivePlayerFormat) for details.
|
|
403
|
+
*
|
|
404
|
+
*/
|
|
135
405
|
format: VeLivePlayerFormat;
|
|
136
406
|
|
|
407
|
+
/** {en}
|
|
408
|
+
* @brief Whether the stream is a main or backup stream. See [VeLivePlayerStreamType](#VeLivePlayerStreamType) for details.
|
|
409
|
+
*
|
|
410
|
+
*/
|
|
137
411
|
streamType: VeLivePlayerStreamType;
|
|
138
412
|
}
|
|
139
413
|
export declare enum VeLivePlayerFillMode {
|
|
140
414
|
|
|
415
|
+
/** {en}
|
|
416
|
+
* @brief Display the full video. The video is uniformly scaled until one dimension of the video hits the boundary of the screen. Any remaining space on the screen will be filled with black.
|
|
417
|
+
*
|
|
418
|
+
*/
|
|
141
419
|
VeLivePlayerFillModeAspectFit = 0,
|
|
142
420
|
|
|
421
|
+
/** {en}
|
|
422
|
+
* @brief Stretch the video to fill the screen. The aspect ratio of the video might change.
|
|
423
|
+
*
|
|
424
|
+
*/
|
|
143
425
|
VeLivePlayerFillModeFullFill = 1,
|
|
144
426
|
|
|
427
|
+
/** {en}
|
|
428
|
+
* @brief Uniformly scale the video until the screen is completely filled. Part of the video may be cropped.
|
|
429
|
+
*
|
|
430
|
+
*/
|
|
145
431
|
VeLivePlayerFillModeAspectFill = 2
|
|
146
432
|
}
|
|
147
433
|
export declare enum VeLivePlayerPixelFormat {
|
|
148
434
|
|
|
435
|
+
/** {en}
|
|
436
|
+
* @brief Unknown format.
|
|
437
|
+
*
|
|
438
|
+
*/
|
|
149
439
|
VeLivePlayerPixelFormatUnknown = 0,
|
|
150
440
|
|
|
441
|
+
/** {en}
|
|
442
|
+
* @brief RGBA8888.
|
|
443
|
+
*
|
|
444
|
+
*/
|
|
151
445
|
VeLivePlayerPixelFormatRGBA32 = 1,
|
|
152
446
|
|
|
447
|
+
/** {en}
|
|
448
|
+
* @brief Texture.
|
|
449
|
+
*
|
|
450
|
+
*/
|
|
153
451
|
VeLivePlayerPixelFormatTexture = 2
|
|
154
452
|
}
|
|
155
453
|
export declare class VeLivePlayerStatistics {
|
|
156
454
|
constructor();
|
|
157
455
|
|
|
456
|
+
/** {en}
|
|
457
|
+
* @brief The current pull stream address.
|
|
458
|
+
*
|
|
459
|
+
*/
|
|
158
460
|
url: String;
|
|
159
461
|
|
|
462
|
+
/** {en}
|
|
463
|
+
* @brief Whether hardware decoding is used. <br>
|
|
464
|
+
* - true: Hardware decoding is used;
|
|
465
|
+
* - false: Hardware decoding is not used.
|
|
466
|
+
*
|
|
467
|
+
*/
|
|
160
468
|
isHardwareDecode: boolean;
|
|
161
469
|
|
|
470
|
+
/** {en}
|
|
471
|
+
* @brief The encoding format of the video.
|
|
472
|
+
*
|
|
473
|
+
*/
|
|
162
474
|
videoCodec: String;
|
|
163
475
|
|
|
476
|
+
/** {en}
|
|
477
|
+
* @brief The cumulative duration of stutters that occurred since the beginning of playback, in milliseconds.
|
|
478
|
+
*
|
|
479
|
+
*/
|
|
164
480
|
stallTimeMs: long;
|
|
165
481
|
|
|
482
|
+
/** {en}
|
|
483
|
+
* @brief Bandwidth estimation, unit is kbps.
|
|
484
|
+
*
|
|
485
|
+
*/
|
|
166
486
|
bandwidthEstimation: long;
|
|
167
487
|
|
|
488
|
+
/** {en}
|
|
489
|
+
* @brief The current playback latency, in milliseconds. The latency data is available only if you use the BytePlus MediaLive Broadcast SDK to push the live stream.
|
|
490
|
+
*
|
|
491
|
+
*/
|
|
168
492
|
delayMs: long;
|
|
169
493
|
|
|
494
|
+
/** {en}
|
|
495
|
+
* @brief The width of the video, in pixels.
|
|
496
|
+
*
|
|
497
|
+
*/
|
|
170
498
|
width: int;
|
|
171
499
|
|
|
500
|
+
/** {en}
|
|
501
|
+
* @brief The height of the video, in pixels.
|
|
502
|
+
*
|
|
503
|
+
*/
|
|
172
504
|
height: int;
|
|
173
505
|
|
|
506
|
+
/** {en}
|
|
507
|
+
* @brief The frame rate of the video, in fps.
|
|
508
|
+
*
|
|
509
|
+
*/
|
|
174
510
|
fps: float;
|
|
175
511
|
|
|
512
|
+
/** {en}
|
|
513
|
+
* @brief The downlink bitrate, in Kbps.
|
|
514
|
+
*
|
|
515
|
+
*/
|
|
176
516
|
bitrate: long;
|
|
177
517
|
|
|
518
|
+
/** {en}
|
|
519
|
+
* @brief The video buffer, in milliseconds.
|
|
520
|
+
*
|
|
521
|
+
*/
|
|
178
522
|
videoBufferMs: long;
|
|
179
523
|
|
|
524
|
+
/** {en}
|
|
525
|
+
* @brief The audio buffer, in milliseconds.
|
|
526
|
+
*
|
|
527
|
+
*/
|
|
180
528
|
audioBufferMs: long;
|
|
181
529
|
|
|
530
|
+
/** {en}
|
|
531
|
+
* @brief The video format.
|
|
532
|
+
*
|
|
533
|
+
*/
|
|
182
534
|
format: String;
|
|
183
535
|
|
|
536
|
+
/** {en}
|
|
537
|
+
* @brief The transmission protocol of the live stream.
|
|
538
|
+
*
|
|
539
|
+
*/
|
|
184
540
|
protocol: String;
|
|
185
541
|
}
|
|
186
542
|
export declare class VeLivePlayerVideoFrame {
|
|
187
543
|
|
|
544
|
+
/** {en}
|
|
545
|
+
* @brief The encapsulation format. See [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) for details.
|
|
546
|
+
*
|
|
547
|
+
*/
|
|
188
548
|
bufferType: VeLivePlayerVideoBufferType;
|
|
189
549
|
|
|
550
|
+
/** {en}
|
|
551
|
+
* @brief The pixel format. See [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) for details.
|
|
552
|
+
*
|
|
553
|
+
*/
|
|
190
554
|
pixelFormat: VeLivePlayerPixelFormat;
|
|
191
555
|
|
|
556
|
+
/** {en}
|
|
557
|
+
* @brief The video width, in pixels.
|
|
558
|
+
*
|
|
559
|
+
*/
|
|
192
560
|
width: int;
|
|
193
561
|
|
|
562
|
+
/** {en}
|
|
563
|
+
* @brief The video height, in pixels.
|
|
564
|
+
*
|
|
565
|
+
*/
|
|
194
566
|
height: int;
|
|
195
567
|
|
|
568
|
+
/** {en}
|
|
569
|
+
* @brief The timestamp indicating the time when the video frame is rendered, in milliseconds.
|
|
570
|
+
*
|
|
571
|
+
*/
|
|
196
572
|
pts: long;
|
|
197
573
|
|
|
574
|
+
/** {en}
|
|
575
|
+
* @brief The texture data for OpenGL rendering. The SDK returns this video data type if you set [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) to `VeLivePlayerPixelFormatTexture` and set [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) to `VeLivePlayerVideoBufferTypeTexture`. See [VeLivePlayerVideoTexture](#VeLivePlayerVideoTexture) for details.
|
|
576
|
+
*
|
|
577
|
+
*/
|
|
198
578
|
texture: VeLivePlayerVideoTexture;
|
|
199
579
|
|
|
580
|
+
/** {en}
|
|
581
|
+
* @brief The video data in ByteBuffer format. The SDK returns this video data type if you set [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) to `VeLivePlayerPixelFormatRGBA32` and set [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) to `VeLivePlayerVideoBufferTypeByteBuffer`.
|
|
582
|
+
*
|
|
583
|
+
*/
|
|
200
584
|
buffer: ByteBuffer;
|
|
201
585
|
|
|
586
|
+
/** {en}
|
|
587
|
+
* @brief The video data in ByteArray format. The SDK returns this video data type if you set [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) to `VeLivePlayerPixelFormatRGBA32` and set [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) to `VeLivePlayerVideoBufferTypeByteArray`.
|
|
588
|
+
*
|
|
589
|
+
*/
|
|
202
590
|
data: ArrayBuffer;
|
|
203
591
|
}
|
|
204
592
|
export declare class VeLivePlayerVideoTexture {
|
|
205
593
|
|
|
594
|
+
/** {en}
|
|
595
|
+
* @brief The video texture ID.
|
|
596
|
+
*
|
|
597
|
+
*/
|
|
206
598
|
texId: int;
|
|
207
599
|
|
|
600
|
+
/** {en}
|
|
601
|
+
* @brief OpenGL ES context for custom rendering. After you bind EGLContext to GLSurfaceView or TextureView, you can perform custom OpenGL ES rendering on the bound View.
|
|
602
|
+
*
|
|
603
|
+
*/
|
|
208
604
|
eglContext: EGLContext;
|
|
209
605
|
}
|
|
210
606
|
export declare enum VeLivePlayerStreamType {
|
|
211
607
|
|
|
608
|
+
/** {en}
|
|
609
|
+
* @brief The primary stream.
|
|
610
|
+
*
|
|
611
|
+
*/
|
|
212
612
|
VeLivePlayerStreamTypeMain = 0,
|
|
213
613
|
|
|
614
|
+
/** {en}
|
|
615
|
+
* @brief The backup stream.
|
|
616
|
+
*
|
|
617
|
+
*/
|
|
214
618
|
VeLivePlayerStreamTypeBackup = 1
|
|
215
619
|
}
|
|
216
620
|
export declare enum VeLivePlayerLogLevel {
|
|
217
621
|
|
|
622
|
+
/** {en}
|
|
623
|
+
* @brief Output logs at the VERBOSE, DEBUG, INFO, WARNING, and ERROR levels.
|
|
624
|
+
*
|
|
625
|
+
*/
|
|
218
626
|
VeLivePlayerLogLevelVerbose = 0,
|
|
219
627
|
|
|
628
|
+
/** {en}
|
|
629
|
+
* @brief Output logs at the DEBUG, INFO, WARNING, and ERROR levels.
|
|
630
|
+
*
|
|
631
|
+
*/
|
|
220
632
|
VeLivePlayerLogLevelDebug = 1,
|
|
221
633
|
|
|
634
|
+
/** {en}
|
|
635
|
+
* @brief Output logs at the INFO, WARNING, and ERROR levels.
|
|
636
|
+
*
|
|
637
|
+
*/
|
|
222
638
|
VeLivePlayerLogLevelInfo = 2,
|
|
223
639
|
|
|
640
|
+
/** {en}
|
|
641
|
+
* @brief Output logs at the WARNING and ERROR levels.
|
|
642
|
+
*
|
|
643
|
+
*/
|
|
224
644
|
VeLivePlayerLogLevelWarn = 3,
|
|
225
645
|
|
|
646
|
+
/** {en}
|
|
647
|
+
* @brief Output logs at the ERROR level.
|
|
648
|
+
*
|
|
649
|
+
*/
|
|
226
650
|
VeLivePlayerLogLevelError = 4,
|
|
227
651
|
|
|
652
|
+
/** {en}
|
|
653
|
+
* @brief Disable log printing.
|
|
654
|
+
*
|
|
655
|
+
*/
|
|
228
656
|
VeLivePlayerLogLevelNone = 5
|
|
229
657
|
}
|
|
230
658
|
export declare class VeLivePlayerAudioFrame {
|
|
231
659
|
|
|
660
|
+
/** {en}
|
|
661
|
+
* @brief The encapsulation format of the audio data. See [VeLivePlayerAudioBufferType](#VeLivePlayerAudioBufferType) for details.
|
|
662
|
+
*
|
|
663
|
+
*/
|
|
232
664
|
bufferType: VeLivePlayerAudioBufferType;
|
|
233
665
|
|
|
666
|
+
/** {en}
|
|
667
|
+
* @brief The audio sample rate, in Hz.
|
|
668
|
+
*
|
|
669
|
+
*/
|
|
234
670
|
sampleRate: int;
|
|
235
671
|
|
|
672
|
+
/** {en}
|
|
673
|
+
* @brief The number of audio channels. <br>
|
|
674
|
+
* - 1: Mono;
|
|
675
|
+
* - 2: Stereo.
|
|
676
|
+
*
|
|
677
|
+
*/
|
|
236
678
|
channels: int;
|
|
237
679
|
|
|
680
|
+
/** {en}
|
|
681
|
+
* @brief The audio bit depth.
|
|
682
|
+
*
|
|
683
|
+
*/
|
|
238
684
|
bitDepth: int;
|
|
239
685
|
|
|
686
|
+
/** {en}
|
|
687
|
+
* @brief The timestamp indicating the time when the audio is rendered, in milliseconds.
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
240
690
|
pts: long;
|
|
241
691
|
|
|
242
|
-
|
|
243
|
-
|
|
692
|
+
/** {en}
|
|
693
|
+
* @brief The PCM audio data. byte[] type.
|
|
694
|
+
*
|
|
695
|
+
*/
|
|
696
|
+
bufferArray: ArrayBuffer;
|
|
697
|
+
|
|
698
|
+
/** {en}
|
|
699
|
+
* @brief The PCM audio data. ByteBuffer[] type.
|
|
700
|
+
*
|
|
701
|
+
*/
|
|
702
|
+
buffer: Array<ByteBuffer>;
|
|
703
|
+
|
|
704
|
+
/** {en}
|
|
705
|
+
* @brief The number of audio samples.
|
|
706
|
+
*
|
|
707
|
+
*/
|
|
244
708
|
samples: int;
|
|
245
709
|
}
|
|
246
710
|
export declare enum VeLivePlayerAudioBufferType {
|
|
247
711
|
|
|
712
|
+
/** {en}
|
|
713
|
+
* @brief Unknown format.
|
|
714
|
+
*
|
|
715
|
+
*/
|
|
248
716
|
VeLivePlayerAudioBufferTypeUnknown = 0,
|
|
249
717
|
|
|
718
|
+
/** {en}
|
|
719
|
+
* @brief ByteArray.
|
|
720
|
+
*
|
|
721
|
+
*/
|
|
250
722
|
VeLivePlayerAudioBufferTypeByteArray = 1
|
|
251
723
|
}
|
|
252
724
|
export declare enum VeLivePlayerRotation {
|
|
253
725
|
|
|
726
|
+
/** {en}
|
|
727
|
+
* @brief No rotation.
|
|
728
|
+
*
|
|
729
|
+
*/
|
|
254
730
|
VeLivePlayerRotation0 = 0,
|
|
255
731
|
|
|
732
|
+
/** {en}
|
|
733
|
+
* @brief Rotate 90 degrees clockwise.
|
|
734
|
+
*
|
|
735
|
+
*/
|
|
256
736
|
VeLivePlayerRotation90 = 1,
|
|
257
737
|
|
|
738
|
+
/** {en}
|
|
739
|
+
* @brief Rotate 180 degrees clockwise.
|
|
740
|
+
*
|
|
741
|
+
*/
|
|
258
742
|
VeLivePlayerRotation180 = 2,
|
|
259
743
|
|
|
744
|
+
/** {en}
|
|
745
|
+
* @brief Rotate 270 degrees clockwise.
|
|
746
|
+
*
|
|
747
|
+
*/
|
|
260
748
|
VeLivePlayerRotation270 = 3
|
|
261
749
|
}
|