@volcengine/react-native-live-pull 1.3.2-rc.0 → 1.4.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.
Files changed (46) hide show
  1. package/android/src/main/java/com/volcengine/velive/rn/pull/EnvHelper.java +15 -0
  2. package/android/src/main/java/com/volcengine/velive/rn/pull/LoggerHelper.java +40 -0
  3. package/ios/VeLivePlayerHelper.h +14 -0
  4. package/ios/VeLivePlayerHelper.m +58 -0
  5. package/ios/VeLivePlayerLoggerHelper.h +14 -0
  6. package/ios/VeLivePlayerLoggerHelper.m +42 -0
  7. package/ios/VeLivePlayerMultiObserver.h +0 -1
  8. package/lib/commonjs/index.js +14620 -0
  9. package/lib/module/index.js +14608 -0
  10. package/lib/typescript/codegen/android/api.d.ts +319 -0
  11. package/lib/typescript/codegen/android/callback.d.ts +206 -0
  12. package/lib/typescript/codegen/android/errorcode.d.ts +177 -0
  13. package/lib/typescript/codegen/android/external.d.ts +1 -0
  14. package/lib/typescript/codegen/android/index.d.ts +6 -0
  15. package/lib/typescript/codegen/android/keytype.d.ts +753 -0
  16. package/lib/typescript/codegen/android/types.d.ts +31 -0
  17. package/lib/typescript/codegen/ios/api.d.ts +293 -0
  18. package/lib/typescript/codegen/ios/callback.d.ts +176 -0
  19. package/lib/typescript/codegen/ios/errorcode.d.ts +160 -0
  20. package/lib/typescript/codegen/ios/external.d.ts +1 -0
  21. package/lib/typescript/codegen/ios/index.d.ts +6 -0
  22. package/lib/typescript/codegen/ios/keytype.d.ts +697 -0
  23. package/lib/typescript/codegen/ios/types.d.ts +46 -0
  24. package/lib/typescript/codegen/pack/api.d.ts +371 -0
  25. package/lib/typescript/codegen/pack/callback.d.ts +258 -0
  26. package/lib/typescript/codegen/pack/errorcode.d.ts +195 -0
  27. package/lib/typescript/codegen/pack/external.d.ts +1 -0
  28. package/lib/typescript/codegen/pack/index.d.ts +6 -0
  29. package/lib/typescript/codegen/pack/keytype.d.ts +980 -0
  30. package/lib/typescript/codegen/pack/types.d.ts +68 -0
  31. package/lib/typescript/component.d.ts +15 -0
  32. package/lib/typescript/core/api.d.ts +114 -0
  33. package/lib/typescript/core/appState.d.ts +3 -0
  34. package/lib/typescript/core/callback.d.ts +53 -0
  35. package/lib/typescript/core/env.d.ts +36 -0
  36. package/lib/typescript/core/errorcode.d.ts +1 -0
  37. package/lib/typescript/core/index.d.ts +6 -0
  38. package/lib/typescript/core/keytype.d.ts +33 -0
  39. package/lib/typescript/core/player.d.ts +14 -0
  40. package/lib/typescript/index.d.ts +3 -0
  41. package/lib/typescript/platforms/android/extends.d.ts +42 -0
  42. package/lib/typescript/platforms/android/pictureInpicture.d.ts +26 -0
  43. package/lib/typescript/platforms/ios/extends.d.ts +46 -0
  44. package/lib/typescript/platforms/ios/pictureInpicture.d.ts +32 -0
  45. package/lib/typescript/runtime/index.d.ts +1 -0
  46. package/package.json +3 -3
@@ -0,0 +1,753 @@
1
+ import { int, String, List, long, float, ByteBuffer, EGLContext } from './types';
2
+ export declare enum VeLivePlayerResolution {
3
+ /** {zh}
4
+ * @brief 原始流。
5
+ *
6
+ */
7
+
8
+ VeLivePlayerResolutionOrigin = "origin",
9
+ /** {zh}
10
+ * @brief UHD 超高清。
11
+ *
12
+ */
13
+
14
+ VeLivePlayerResolutionUHD = "uhd",
15
+ /** {zh}
16
+ * @brief HD 高清。
17
+ *
18
+ */
19
+
20
+ VeLivePlayerResolutionHD = "hd",
21
+ /** {zh}
22
+ * @brief SD 标清。
23
+ *
24
+ */
25
+
26
+ VeLivePlayerResolutionSD = "sd",
27
+ /** {zh}
28
+ * @brief LD 低清。
29
+ *
30
+ */
31
+
32
+ VeLivePlayerResolutionLD = "ld",
33
+ /** {zh}
34
+ * @brief AO 纯音频流。
35
+ * @hidden (Android)
36
+ *
37
+ */
38
+
39
+ VeLivePlayerResolutionAO = "ao"
40
+ }
41
+ export declare class VeLivePlayerConfiguration {
42
+ /** {zh}
43
+ * @brief 是否开启字符串 SEI 消息的解析,默认值为 false。<br/>
44
+ * - true:开启;
45
+ * - false:关闭。
46
+ *
47
+ */
48
+
49
+ enableSei: boolean;
50
+ /** {zh}
51
+ * @brief 是否开启二进制 SEI 消息的解析,默认值为 false。<br/>
52
+ * - true:开启;
53
+ * - false:关闭。
54
+ * @notes 二进制 SEI 开启后,字符串 SEI 的回调将不再发送。
55
+ *
56
+ */
57
+
58
+ enableBinarySei: boolean;
59
+ /** {zh}
60
+ * @brief 是否开启硬件解码功能,默认值为 true。开启硬件解码后,如果出现硬件解码启动失败或硬件解码失败的情况,播放器内部会自动切换为软解。<br>
61
+ * - true:开启;
62
+ * - false:关闭。
63
+ *
64
+ */
65
+
66
+ enableHardwareDecode: boolean;
67
+ /** {zh}
68
+ * @brief 网络超时时间,单位为 ms,默认值为 5000。播放器发起网络请求,如果超过了该时间仍未收到服务器响应,则认为网络请求失败。
69
+ *
70
+ */
71
+
72
+ networkTimeoutMs: int;
73
+ /** {zh}
74
+ * @brief 重试时间间隔,单位为 ms,默认值为 5000,仅在无备流时生效。<br>
75
+ * - 在无备流的场景下,若遇到网络异常等问题导致播放中断,播放器会立即进行重试,前三次重试为立即执行,第四次及之后的重试将按照设置的重试时间间隔执行;
76
+ * - 在有备流的场景下,重试时间间隔将不生效,所有重试均会立即执行。
77
+ *
78
+ */
79
+
80
+ retryIntervalTimeMs: int;
81
+ /** {zh}
82
+ * @brief 在网络连接错误的情况下,播放器最大重试次数,默认值为 5。如果取值为 0,表示关闭播放器内部重试。<br>
83
+ * - 在无备流的场景下,每次重试,会消耗一次重试次数;
84
+ * - 在有备流的场景下,每次主备流切换,会消耗一次重试次数。
85
+ *
86
+ */
87
+
88
+ retryMaxCount: int;
89
+ /** {zh}
90
+ * @brief 是否开启本地 DNS 预解析,默认值为 false。开启本地 DNS 预解析可以缩短启播时间。如果本地 DNS 预解析出现异常,可能会影响播放器的正常使用。<br>
91
+ * - true:开启;
92
+ * - false:关闭。
93
+ *
94
+ */
95
+
96
+ enableLiveDNS: boolean;
97
+ /** {zh}
98
+ * @brief 是否开启播放信息周期性回调。默认值为 false。周期性回调参数详细说明请参见 [VeLivePlayerStatistics](188115#VeLivePlayerStatistics) 。当 `enableStatisticsCallback` 为 `true`,且 [statisticsCallbackInterval](188115#VeLivePlayerConfiguration-statisticscallbackinterval) 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。<br>
99
+ * - true:开启;
100
+ * - false:关闭。
101
+ *
102
+ */
103
+
104
+ enableStatisticsCallback: boolean;
105
+ /** {zh}
106
+ * @brief 播放信息周期性回调的时间间隔,单位为 s,默认值为 5。当 [enableStatisticsCallback](188115#VeLivePlayerConfiguration-enablestatisticscallback) 为 `true`,且 `statisticsCallbackInterval` 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。
107
+ *
108
+ */
109
+
110
+ statisticsCallbackInterval: int;
111
+ }
112
+ export declare enum VeLivePlayerFormat {
113
+ /** {zh}
114
+ * @brief FLV 格式。
115
+ *
116
+ */
117
+
118
+ VeLivePlayerFormatFLV = 0,
119
+ /** {zh}
120
+ * @brief HLS 格式。
121
+ *
122
+ */
123
+
124
+ VeLivePlayerFormatHLS = 1,
125
+ /** {zh}
126
+ * @brief RTM 格式。
127
+ *
128
+ */
129
+
130
+ VeLivePlayerFormatRTM = 2,
131
+ /** {zh}
132
+ * @brief CMAF 格式
133
+ *
134
+ */
135
+
136
+ VeLivePlayerFormatCMAF = 3
137
+ }
138
+ export declare enum VeLivePlayerProtocol {
139
+ /** {zh}
140
+ * @brief TCP 协议。
141
+ *
142
+ */
143
+
144
+ VeLivePlayerProtocolTCP = 0,
145
+ /** {zh}
146
+ * @brief QUIC 协议。
147
+ *
148
+ */
149
+
150
+ VeLivePlayerProtocolQUIC = 1,
151
+ /** {zh}
152
+ * @brief TLS 协议。
153
+ *
154
+ */
155
+
156
+ VeLivePlayerProtocolTLS = 2,
157
+ /** {zh}
158
+ * @brief HTTP2.0 协议。
159
+ *
160
+ */
161
+
162
+ VeLivePlayerProtocolHTTP2 = 3
163
+ }
164
+ export declare enum VeLivePlayerMirror {
165
+ /** {zh}
166
+ * @brief 关闭镜像。
167
+ *
168
+ */
169
+
170
+ VeLivePlayerMirrorNone = 0,
171
+ /** {zh}
172
+ * @brief 水平镜像。
173
+ *
174
+ */
175
+
176
+ VeLivePlayerMirrorHorizontal = 1,
177
+ /** {zh}
178
+ * @brief 垂直镜像。
179
+ *
180
+ */
181
+
182
+ VeLivePlayerMirrorVertical = 2
183
+ }
184
+ export declare enum VeLivePlayerVideoBufferType {
185
+ /** {zh}
186
+ * @brief 未知格式。
187
+ *
188
+ */
189
+
190
+ VeLivePlayerVideoBufferTypeUnknown = 0,
191
+ /** {zh}
192
+ * @brief ByteBuffer 格式。
193
+ *
194
+ */
195
+
196
+ VeLivePlayerVideoBufferTypeByteBuffer = 1,
197
+ /** {zh}
198
+ * @brief ByteArray 格式。
199
+ *
200
+ */
201
+
202
+ VeLivePlayerVideoBufferTypeByteArray = 2,
203
+ /** {zh}
204
+ * @brief 纹理格式。
205
+ *
206
+ */
207
+
208
+ VeLivePlayerVideoBufferTypeTexture = 3
209
+ }
210
+ export declare enum VeLivePlayerStatus {
211
+ /** {zh}
212
+ * @brief 停止播放状态。
213
+ *
214
+ */
215
+
216
+ VeLivePlayerStatusStopped = 0,
217
+ /** {zh}
218
+ * @brief 暂停播放状态。
219
+ *
220
+ */
221
+
222
+ VeLivePlayerStatusPaused = 1,
223
+ /** {zh}
224
+ * @brief 播放器准备完成,等待渲染。
225
+ *
226
+ */
227
+
228
+ VeLivePlayerStatusPrepared = 2,
229
+ /** {zh}
230
+ * @brief 正在播放,即首帧渲染完成且播放器未发生错误。
231
+ *
232
+ */
233
+
234
+ VeLivePlayerStatusPlaying = 3,
235
+ /** {zh}
236
+ * @brief 播放器发生错误。
237
+ *
238
+ */
239
+
240
+ VeLivePlayerStatusError = 4
241
+ }
242
+ export declare class VeLivePlayerLogConfig {
243
+ /** {zh}
244
+ * @brief 日志文件保存路径。缺省情况下,使用默认路径 `/cache/Log`。
245
+ *
246
+ */
247
+
248
+ logPath: String;
249
+ /** {zh}
250
+ * @brief 日志文件整体最大尺寸,单位为 M,默认值为 100。
251
+ *
252
+ */
253
+
254
+ maxLogSizeM: int;
255
+ /** {zh}
256
+ * @brief 单个日志文件最大尺寸,单位为 M,默认值为 2。
257
+ *
258
+ */
259
+
260
+ singleLogSizeM: int;
261
+ /** {zh}
262
+ * @brief 日志文件有效期,过期后下次创建日志文件时会删除之前的文件。单位为 s,默认值为 604,800,即 7 天。
263
+ *
264
+ */
265
+
266
+ logExpireTimeS: int;
267
+ /** {zh}
268
+ * @brief 日志是否打印到控制台输出,默认值为 true。<br>
269
+ * - true:打印;
270
+ * - false:不打印。
271
+ *
272
+ */
273
+
274
+ enableConsole: boolean;
275
+ /** {zh}
276
+ * @brief 日志是否打印到文件,默认值为 true。<br>
277
+ * - true:打印;
278
+ * - false:不打印。
279
+ *
280
+ */
281
+
282
+ enableLogFile: boolean;
283
+ /** {zh}
284
+ * @brief 日志上报路径。
285
+ *
286
+ */
287
+
288
+ queryUrl: String;
289
+ /** {zh}
290
+ * @brief 是否轮询。<br>
291
+ * - `true`:开启;
292
+ * - `false`:关闭。
293
+ *
294
+ */
295
+
296
+ enableThreadLoop: boolean;
297
+ /** {zh}
298
+ * @brief 轮询间隔时间, 单位为 ms。取值范围:大于 0。
299
+ *
300
+ */
301
+
302
+ intervalMS: int;
303
+ /** {zh}
304
+ * @brief HTTP 请求超时时间。取值范围:大于 0。
305
+ *
306
+ */
307
+
308
+ httpTimeoutMS: int;
309
+ /** {zh}
310
+ * @brief 文件上传超时时间。取值范围:大于 0。
311
+ *
312
+ */
313
+
314
+ httpUploadFileTimeoutMS: int;
315
+ /** {zh}
316
+ * @brief 允许写入的日志等级,默认为 VeLivePlayerLogLevelDebug,详情请参见 [VeLivePlayerLogLevel](#VeLivePlayerLogLevel)。
317
+ *
318
+ */
319
+
320
+ logLevel: VeLivePlayerLogLevel;
321
+ }
322
+ export declare class VeLivePlayerStreamData {
323
+ /** {zh}
324
+ * @brief 是否打开 ABR 平滑切档功能,默认为 false。<br>
325
+ * - true:开启;
326
+ * - false:关闭。
327
+ *
328
+ */
329
+
330
+ enableABR: boolean;
331
+ /** {zh}
332
+ * @brief 是否打开主备切换,默认为 false。<br>
333
+ * - true:开启;
334
+ * - false:关闭。
335
+ *
336
+ */
337
+
338
+ enableMainBackupSwitch: boolean;
339
+ /** {zh}
340
+ * @brief 播放器的默认清晰度档位,默认使用原始流清晰度。详情请参见 [VeLivePlayerResolution](#VeLivePlayerResolution)。
341
+ *
342
+ */
343
+
344
+ defaultResolution: VeLivePlayerResolution;
345
+ /** {zh}
346
+ * @brief 播放器的默认播放格式,默认值为 FLV。详情请参见 [VeLivePlayerFormat](#VeLivePlayerFormat)。
347
+ *
348
+ */
349
+
350
+ defaultFormat: VeLivePlayerFormat;
351
+ /** {zh}
352
+ * @brief 播放器的默认播放传输层协议,默认值为 TCP。详情请参见 [VeLivePlayerProtocol](#VeLivePlayerProtocol)。
353
+ *
354
+ */
355
+
356
+ defaultProtocol: VeLivePlayerProtocol;
357
+ /** {zh}
358
+ * @brief 主路流地址列表,详情请参见 [[VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream)。
359
+ *
360
+ */
361
+
362
+ mainStreamList: List<VeLivePlayerStream>;
363
+ /** {zh}
364
+ * @brief 备路流地址列表。详情请参见 [VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream)。
365
+ *
366
+ */
367
+
368
+ backupStreamList: List<VeLivePlayerStream>;
369
+ }
370
+ export declare enum VeLivePlayerResolutionSwitchReason {
371
+ /** {zh}
372
+ * @brief ABR 自动切档。
373
+ *
374
+ */
375
+
376
+ VeLiveplayerResolutionSwitchByAuto = 0,
377
+ /** {zh}
378
+ * @brief 调用 [switchResolution](188111#VeLivePlayer-switchresolution) 手动切换档位导致的分辨率变化。
379
+ *
380
+ */
381
+
382
+ VeLiveplayerResolutionSwitchByManual = 1
383
+ }
384
+ export declare class VeLivePlayerStream {
385
+ constructor();
386
+ /** {zh}
387
+ * @brief 播放地址。
388
+ *
389
+ */
390
+
391
+ url: String;
392
+ /** {zh}
393
+ * @brief 清晰度档位。详情请参见 [VeLivePlayerResolution](#VeLivePlayerResolution)。
394
+ *
395
+ */
396
+
397
+ resolution: VeLivePlayerResolution;
398
+ /** {zh}
399
+ * @brief 播放码率,单位为 kbps。
400
+ *
401
+ */
402
+
403
+ bitrate: long;
404
+ /** {zh}
405
+ * @brief 播放格式。详情请参见 [VeLivePlayerFormat](#VeLivePlayerFormat)。
406
+ *
407
+ */
408
+
409
+ format: VeLivePlayerFormat;
410
+ /** {zh}
411
+ * @brief 播放流类型为主路或备路。详情请参见 [VeLivePlayerStreamType](#VeLivePlayerStreamType)。
412
+ *
413
+ */
414
+
415
+ streamType: VeLivePlayerStreamType;
416
+ }
417
+ export declare enum VeLivePlayerFillMode {
418
+ /** {zh}
419
+ * @brief 显示完整的视频帧。视频帧等比缩放,直至视频帧恰好在画布上全部显示。如果视频帧长宽比例与画布不同,视窗上未被视频帧填满区域将填充为黑色。
420
+ *
421
+ */
422
+
423
+ VeLivePlayerFillModeAspectFit = 0,
424
+ /** {zh}
425
+ * @brief 视频帧自适应画布。视频帧非等比缩放,直至填满画布。在此过程中,视频帧的长宽比例可能会发生变化。
426
+ *
427
+ */
428
+
429
+ VeLivePlayerFillModeFullFill = 1,
430
+ /** {zh}
431
+ * @brief 视频填满画布。视频帧等比缩放,直至填满画布,超出屏幕的部分将被裁剪,画面可能不完整。
432
+ *
433
+ */
434
+
435
+ VeLivePlayerFillModeAspectFill = 2
436
+ }
437
+ export declare enum VeLivePlayerPixelFormat {
438
+ /** {zh}
439
+ * @brief 未知格式。
440
+ *
441
+ */
442
+
443
+ VeLivePlayerPixelFormatUnknown = 0,
444
+ /** {zh}
445
+ * @brief RGBA8888 格式。
446
+ *
447
+ */
448
+
449
+ VeLivePlayerPixelFormatRGBA32 = 1,
450
+ /** {zh}
451
+ * @brief 纹理格式。
452
+ *
453
+ */
454
+
455
+ VeLivePlayerPixelFormatTexture = 2
456
+ }
457
+ export declare class VeLivePlayerStatistics {
458
+ constructor();
459
+ /** {zh}
460
+ * @brief 当前直播的播放地址。
461
+ *
462
+ */
463
+
464
+ url: String;
465
+ /** {zh}
466
+ * @brief 是否使用硬件解码。<br>
467
+ * - true:硬解;
468
+ * - false:非硬解。
469
+ *
470
+ */
471
+
472
+ isHardwareDecode: boolean;
473
+ /** {zh}
474
+ * @brief 视频的编码类型。
475
+ *
476
+ */
477
+
478
+ videoCodec: String;
479
+ /** {zh}
480
+ * @brief 从当前视频开始播放起,累计的卡顿时长,单位为 ms。
481
+ *
482
+ */
483
+
484
+ stallTimeMs: long;
485
+ /** {zh}
486
+ * @brief 带宽预测 ,单位为 kbps
487
+ *
488
+ */
489
+
490
+ bandwidthEstimation: long;
491
+ /** {zh}
492
+ * @brief 当前播放延时,单位为 ms。仅在使用了火山引擎视频直播推流 SDK 时,支持统计播放延时。
493
+ *
494
+ */
495
+
496
+ delayMs: long;
497
+ /** {zh}
498
+ * @brief 当前播放视频的宽度,单位为 px。
499
+ *
500
+ */
501
+
502
+ width: int;
503
+ /** {zh}
504
+ * @brief 当前播放视频的高度,单位为 px。
505
+ *
506
+ */
507
+
508
+ height: int;
509
+ /** {zh}
510
+ * @brief 当前播放视频的帧率,单位为 fps。
511
+ *
512
+ */
513
+
514
+ fps: float;
515
+ /** {zh}
516
+ * @brief 实时下载的码率,单位为 kbps。
517
+ *
518
+ */
519
+
520
+ bitrate: long;
521
+ /** {zh}
522
+ * @brief 视频播放的缓冲区 buffer 大小,单位为 ms。
523
+ *
524
+ */
525
+
526
+ videoBufferMs: long;
527
+ /** {zh}
528
+ * @brief 音频播放的缓冲区 buffer 大小,单位为 ms。
529
+ *
530
+ */
531
+
532
+ audioBufferMs: long;
533
+ /** {zh}
534
+ * @brief 当前播放的视频格式。
535
+ *
536
+ */
537
+
538
+ format: String;
539
+ /** {zh}
540
+ * @brief 当前播放的传输协议。
541
+ *
542
+ */
543
+
544
+ protocol: String;
545
+ }
546
+ export declare class VeLivePlayerVideoFrame {
547
+ /** {zh}
548
+ * @brief 视频帧数据封装格式。详情请参见 [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType)。
549
+ *
550
+ */
551
+
552
+ bufferType: VeLivePlayerVideoBufferType;
553
+ /** {zh}
554
+ * @brief 视频帧像素格式。详情请参见 [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat)。
555
+ *
556
+ */
557
+
558
+ pixelFormat: VeLivePlayerPixelFormat;
559
+ /** {zh}
560
+ * @brief 视频宽度,单位为 px。
561
+ *
562
+ */
563
+
564
+ width: int;
565
+ /** {zh}
566
+ * @brief 视频高度,单位为 px。
567
+ *
568
+ */
569
+
570
+ height: int;
571
+ /** {zh}
572
+ * @brief 视频帧的渲染时间戳。单位为 ms。
573
+ *
574
+ */
575
+
576
+ pts: long;
577
+ /** {zh}
578
+ * @brief OpenGL 渲染的视频纹理数据。如果将 [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) 设置为`VeLivePlayerPixelFormatTexture`,并将 [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) 设置为`VeLivePlayerVideoBufferTypeTexture`,SDK 会返回此视频数据类型。有关详细信息,请参阅[VeLivePlayerVideoTexture](#VeLivePlayerVideoTexture)。
579
+ *
580
+ */
581
+
582
+ texture: VeLivePlayerVideoTexture;
583
+ /** {zh}
584
+ * @brief ByteBuffer 格式的视频数据。如果将 [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat)设置为`VeLivePlayerPixelFormatRGBA32`,并将 [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) 设置为`VeLivePlayerVideoBufferTypeByteBuffer`,则 SDK 会返回此视频数据类型。
585
+ *
586
+ */
587
+
588
+ buffer: ByteBuffer;
589
+ /** {zh}
590
+ * @brief ByteArray 格式的视频数据。如果将 [VeLivePlayerPixelFormat](#VeLivePlayerPixelFormat) 设置为“VeLivePlayerPixelFormatRGBA32”,并将 [VeLivePlayerVideoBufferType](#VeLivePlayerVideoBufferType) 设置为“VeLivePlayerVideoBufferTypeByteArray”,则 SDK 会返回这种视频数据类型。
591
+ *
592
+ */
593
+
594
+ data: ArrayBuffer;
595
+ }
596
+ export declare class VeLivePlayerVideoTexture {
597
+ /** {zh}
598
+ * @brief 视频纹理 ID。
599
+ *
600
+ */
601
+
602
+ texId: int;
603
+ /** {zh}
604
+ * @brief OpenGL ES 图形上下文环境,用于自定义渲染。将 EGLContext 绑定到 GLSurfaceView 或 TextureView 上,您可以在被绑定的 View 上进行自定义的 OpenGL ES 渲染。
605
+ *
606
+ */
607
+
608
+ eglContext: EGLContext;
609
+ }
610
+ export declare enum VeLivePlayerStreamType {
611
+ /** {zh}
612
+ * @brief 主路流。
613
+ *
614
+ */
615
+
616
+ VeLivePlayerStreamTypeMain = 0,
617
+ /** {zh}
618
+ * @brief 备路流。
619
+ *
620
+ */
621
+
622
+ VeLivePlayerStreamTypeBackup = 1
623
+ }
624
+ export declare enum VeLivePlayerLogLevel {
625
+ /** {zh}
626
+ * @brief 输出 VERBOSE、DEBUG、INFO、WARNING 和 ERROR 级别的日志。
627
+ *
628
+ */
629
+
630
+ VeLivePlayerLogLevelVerbose = 0,
631
+ /** {zh}
632
+ * @brief 输出 DEBUG、INFO、WARNING 和 ERROR 级别的日志。
633
+ *
634
+ */
635
+
636
+ VeLivePlayerLogLevelDebug = 1,
637
+ /** {zh}
638
+ * @brief 输出 INFO、WARNING 和 ERROR 级别的日志。
639
+ *
640
+ */
641
+
642
+ VeLivePlayerLogLevelInfo = 2,
643
+ /** {zh}
644
+ * @brief 输出 WARNING 和 ERROR 级别的日志。
645
+ *
646
+ */
647
+
648
+ VeLivePlayerLogLevelWarn = 3,
649
+ /** {zh}
650
+ * @brief 输出 ERROR 级别的日志。
651
+ *
652
+ */
653
+
654
+ VeLivePlayerLogLevelError = 4,
655
+ /** {zh}
656
+ * @brief 关闭日志打印。
657
+ *
658
+ */
659
+
660
+ VeLivePlayerLogLevelNone = 5
661
+ }
662
+ export declare class VeLivePlayerAudioFrame {
663
+ /** {zh}
664
+ * @brief 音频帧数据封装格式,详情请参见 [VeLivePlayerAudioBufferType](#VeLivePlayerAudioBufferType)。
665
+ *
666
+ */
667
+
668
+ bufferType: VeLivePlayerAudioBufferType;
669
+ /** {zh}
670
+ * @brief 音频采样率,单位为 Hz。
671
+ *
672
+ */
673
+
674
+ sampleRate: int;
675
+ /** {zh}
676
+ * @brief 声道数。<br>
677
+ * - 1:单声道;
678
+ * - 2:双声道。
679
+ *
680
+ */
681
+
682
+ channels: int;
683
+ /** {zh}
684
+ * @brief 音频位深度。
685
+ *
686
+ */
687
+
688
+ bitDepth: int;
689
+ /** {zh}
690
+ * @brief 音频渲染时间戳。单位为 ms。
691
+ *
692
+ */
693
+
694
+ pts: long;
695
+ /** {zh}
696
+ * @brief PCM 音频数据。byte[]类型
697
+ *
698
+ */
699
+
700
+ bufferArray: ArrayBuffer;
701
+ /** {zh}
702
+ * @brief PCM 音频数据。ByteBuffer[]类型
703
+ *
704
+ */
705
+
706
+ buffer: Array<ByteBuffer>;
707
+ /** {zh}
708
+ * @brief 音频采样点个数。
709
+ *
710
+ */
711
+
712
+ samples: int;
713
+ }
714
+ export declare enum VeLivePlayerAudioBufferType {
715
+ /** {zh}
716
+ * @brief 未知格式。
717
+ *
718
+ */
719
+
720
+ VeLivePlayerAudioBufferTypeUnknown = 0,
721
+ /** {zh}
722
+ * @brief ByteArray 格式。
723
+ *
724
+ */
725
+
726
+ VeLivePlayerAudioBufferTypeByteArray = 1
727
+ }
728
+ export declare enum VeLivePlayerRotation {
729
+ /** {zh}
730
+ * @brief 关闭旋转。
731
+ *
732
+ */
733
+
734
+ VeLivePlayerRotation0 = 0,
735
+ /** {zh}
736
+ * @brief 顺时针旋转 90 度。
737
+ *
738
+ */
739
+
740
+ VeLivePlayerRotation90 = 1,
741
+ /** {zh}
742
+ * @brief 顺时针旋转 180 度。
743
+ *
744
+ */
745
+
746
+ VeLivePlayerRotation180 = 2,
747
+ /** {zh}
748
+ * @brief 顺时针旋转 270 度。
749
+ *
750
+ */
751
+
752
+ VeLivePlayerRotation270 = 3
753
+ }