@volcengine/react-native-live-pull 1.0.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 (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/android/build.gradle +93 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +9 -0
  6. package/android/src/main/AndroidManifestNew.xml +8 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/pull/NativeVariableManager.java +15 -0
  8. package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModule.java +108 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModuleSpec.java +17 -0
  10. package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLivePackage.java +27 -0
  11. package/android/src/main/java/com/volcengine/velive/rn/pull/VolcView.java +32 -0
  12. package/android/src/main/java/com/volcengine/velive/rn/pull/VolcViewManager.java +87 -0
  13. package/android/src/main/java/com/volcengine/velive/rn/pull/autogen/MethodSignature.java +129 -0
  14. package/ios/VeLivePullSDK.h +24 -0
  15. package/ios/VeLivePullSDK.m +91 -0
  16. package/ios/VeLivePullView.h +25 -0
  17. package/ios/VeLivePullView.m +74 -0
  18. package/ios/VeLivePullViewManager.m +59 -0
  19. package/lib/commonjs/index.js +10697 -0
  20. package/lib/module/index.js +10684 -0
  21. package/lib/typescript/codegen/android/api.d.ts +260 -0
  22. package/lib/typescript/codegen/android/callback.d.ts +152 -0
  23. package/lib/typescript/codegen/android/errorcode.d.ts +99 -0
  24. package/lib/typescript/codegen/android/index.d.ts +5 -0
  25. package/lib/typescript/codegen/android/keytype.d.ts +507 -0
  26. package/lib/typescript/codegen/android/types.d.ts +30 -0
  27. package/lib/typescript/codegen/ios/api.d.ts +293 -0
  28. package/lib/typescript/codegen/ios/callback.d.ts +163 -0
  29. package/lib/typescript/codegen/ios/errorcode.d.ts +106 -0
  30. package/lib/typescript/codegen/ios/index.d.ts +5 -0
  31. package/lib/typescript/codegen/ios/keytype.d.ts +515 -0
  32. package/lib/typescript/codegen/ios/types.d.ts +35 -0
  33. package/lib/typescript/codegen/pack/api.d.ts +389 -0
  34. package/lib/typescript/codegen/pack/callback.d.ts +217 -0
  35. package/lib/typescript/codegen/pack/errorcode.d.ts +150 -0
  36. package/lib/typescript/codegen/pack/index.d.ts +5 -0
  37. package/lib/typescript/codegen/pack/keytype.d.ts +933 -0
  38. package/lib/typescript/codegen/pack/types.d.ts +1 -0
  39. package/lib/typescript/component.d.ts +8 -0
  40. package/lib/typescript/core/api.d.ts +1 -0
  41. package/lib/typescript/core/callback.d.ts +1 -0
  42. package/lib/typescript/core/env.d.ts +36 -0
  43. package/lib/typescript/core/errorcode.d.ts +1 -0
  44. package/lib/typescript/core/index.d.ts +6 -0
  45. package/lib/typescript/core/keytype.d.ts +1 -0
  46. package/lib/typescript/core/player.d.ts +14 -0
  47. package/lib/typescript/index.d.ts +2 -0
  48. package/lib/typescript/platforms/android/extends.d.ts +39 -0
  49. package/lib/typescript/platforms/ios/extends.d.ts +41 -0
  50. package/lib/typescript/runtime/index.d.ts +1 -0
  51. package/package.json +32 -0
  52. package/react-native-velive-pull.podspec +45 -0
@@ -0,0 +1,933 @@
1
+ import * as $p_a from '../android/index';
2
+ import * as $p_i from '../ios/index';
3
+ /** {zh}
4
+ * @detail keytype
5
+ * @brief 直播播放器的清晰度档位。
6
+ */
7
+
8
+ export declare enum VeLivePlayerResolution {
9
+ /** {zh}
10
+ * @brief 原始流。
11
+ */
12
+
13
+ VeLivePlayerResolutionOrigin = 0,
14
+ /** {zh}
15
+ * @brief UHD 超高清。
16
+ */
17
+
18
+ VeLivePlayerResolutionUHD = 1,
19
+ /** {zh}
20
+ * @brief HD 高清。
21
+ */
22
+
23
+ VeLivePlayerResolutionHD = 2,
24
+ /** {zh}
25
+ * @brief SD 标清。
26
+ */
27
+
28
+ VeLivePlayerResolutionSD = 3,
29
+ /** {zh}
30
+ * @brief LD 低清。
31
+ */
32
+
33
+ VeLivePlayerResolutionLD = 4
34
+ }
35
+ export declare class t_VeLivePlayerResolution {
36
+ static ts_to_android(value: VeLivePlayerResolution): $p_a.VeLivePlayerResolution;
37
+ static android_to_ts(value: $p_a.VeLivePlayerResolution): VeLivePlayerResolution;
38
+ static ts_to_ios(value: VeLivePlayerResolution): $p_i.VeLivePlayerResolution;
39
+ static ios_to_ts(value: $p_i.VeLivePlayerResolution): VeLivePlayerResolution;
40
+ }
41
+ /** {zh}
42
+ * @detail keytype
43
+ * @brief 播放器初始化相关配置。
44
+ */
45
+
46
+ export declare class VeLivePlayerConfiguration {
47
+ protected _instance: any;
48
+ protected __init(...args: any[]): void;
49
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerConfiguration | $p_i.VeLivePlayerConfiguration;
50
+ /** {zh}
51
+ * @brief 是否开启 SEI 消息的解析,默认值为 false。
52
+ * - true:开启;
53
+ * - false:关闭。
54
+ */
55
+
56
+ get enableSei(): boolean;
57
+ set enableSei(value: boolean);
58
+ /** {zh}
59
+ * @brief 是否开启硬件解码功能,默认值为 true。开启硬件解码后,如果出现硬件解码启动失败或硬件解码失败的情况,播放器内部会自动切换为软解。
60
+ * - true:开启;
61
+ * - false:关闭。
62
+ */
63
+
64
+ get enableHardwareDecode(): boolean;
65
+ set enableHardwareDecode(value: boolean);
66
+ /** {zh}
67
+ * @brief 网络超时时间,单位为 ms,默认值为 5000。播放器发起网络请求,如果超过了该时间仍未收到服务器响应,则认为网络请求失败。
68
+ */
69
+
70
+ get networkTimeoutMs(): number;
71
+ set networkTimeoutMs(value: number);
72
+ /** {zh}
73
+ * @brief 重试时间间隔,单位为 ms,默认值为 5000,仅在无备流时生效。
74
+ * - 在无备流的场景下,若遇到网络异常等问题导致播放中断,播放器会立即进行重试,前三次重试为立即执行,第四次及之后的重试将按照设置的重试时间间隔执行;
75
+ * - 在有备流的场景下,重试时间间隔将不生效,所有重试均会立即执行。
76
+ */
77
+
78
+ get retryIntervalTimeMs(): number;
79
+ set retryIntervalTimeMs(value: number);
80
+ /** {zh}
81
+ * @brief 在网络连接错误的情况下,播放器最大重试次数,默认值为 5。如果取值为 0,表示关闭播放器内部重试。
82
+ * - 在无备流的场景下,每次重试,会消耗一次重试次数;
83
+ * - 在有备流的场景下,每次主备流切换,会消耗一次重试次数。
84
+ */
85
+
86
+ get retryMaxCount(): number;
87
+ set retryMaxCount(value: number);
88
+ /** {zh}
89
+ * @brief 是否开启本地 DNS 预解析,默认值为 false。开启本地 DNS 预解析可以缩短启播时间。如果本地 DNS 预解析出现异常,可能会影响播放器的正常使用。
90
+ * - true:开启;
91
+ * - false:关闭。
92
+ */
93
+
94
+ get enableLiveDNS(): boolean;
95
+ set enableLiveDNS(value: boolean);
96
+ /** {zh}
97
+ * @brief 是否开启播放信息周期性回调。默认值为 false。周期性回调参数详细说明请参见 [VeLivePlayerStatistics](188115#VeLivePlayerStatistics)。当 `enableStatisticsCallback` 为 `true`,且 [statisticsCallbackInterval](188115#VeLivePlayerConfiguration-statisticscallbackinterval) 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。
98
+ * - true:开启;
99
+ * - false:关闭。
100
+ */
101
+
102
+ get enableStatisticsCallback(): boolean;
103
+ set enableStatisticsCallback(value: boolean);
104
+ /** {zh}
105
+ * @brief 播放信息周期性回调的时间间隔,单位为 s,默认值为 5。当 [enableStatisticsCallback](188115#VeLivePlayerConfiguration-enablestatisticscallback) 为 `true`,且 `statisticsCallbackInterval` 大于 0 时,播放器会在指定的时间间隔内,周期性地回调播放器状态信息。
106
+ */
107
+
108
+ get statisticsCallbackInterval(): number;
109
+ set statisticsCallbackInterval(value: number);
110
+ }
111
+ /** {zh}
112
+ * @detail keytype
113
+ * @brief 直播播放格式。
114
+ */
115
+
116
+ export declare enum VeLivePlayerFormat {
117
+ /** {zh}
118
+ * @brief FLV 格式。
119
+ */
120
+
121
+ VeLivePlayerFormatFLV = 0,
122
+ /** {zh}
123
+ * @brief HLS 格式。
124
+ */
125
+
126
+ VeLivePlayerFormatHLS = 1,
127
+ /** {zh}
128
+ * @brief RTM 格式。
129
+ */
130
+
131
+ VeLivePlayerFormatRTM = 2
132
+ }
133
+ export declare class t_VeLivePlayerFormat {
134
+ static ts_to_android(value: VeLivePlayerFormat): $p_a.VeLivePlayerFormat;
135
+ static android_to_ts(value: $p_a.VeLivePlayerFormat): VeLivePlayerFormat;
136
+ static ts_to_ios(value: VeLivePlayerFormat): $p_i.VeLivePlayerFormat;
137
+ static ios_to_ts(value: $p_i.VeLivePlayerFormat): VeLivePlayerFormat;
138
+ }
139
+ /** {zh}
140
+ * @detail keytype
141
+ * @brief 直播播放传输协议。
142
+ */
143
+
144
+ export declare enum VeLivePlayerProtocol {
145
+ /** {zh}
146
+ * @brief TCP 协议。
147
+ */
148
+
149
+ VeLivePlayerProtocolTCP = 0,
150
+ /** {zh}
151
+ * @brief QUIC 协议。
152
+ */
153
+
154
+ VeLivePlayerProtocolQUIC = 1,
155
+ /** {zh}
156
+ * @brief TLS 协议。
157
+ */
158
+
159
+ VeLivePlayerProtocolTLS = 2
160
+ }
161
+ export declare class t_VeLivePlayerProtocol {
162
+ static ts_to_android(value: VeLivePlayerProtocol): $p_a.VeLivePlayerProtocol;
163
+ static android_to_ts(value: $p_a.VeLivePlayerProtocol): VeLivePlayerProtocol;
164
+ static ts_to_ios(value: VeLivePlayerProtocol): $p_i.VeLivePlayerProtocol;
165
+ static ios_to_ts(value: $p_i.VeLivePlayerProtocol): VeLivePlayerProtocol;
166
+ }
167
+ /** {zh}
168
+ * @detail keytype
169
+ * @brief 视频镜像。
170
+ */
171
+
172
+ export declare enum VeLivePlayerMirror {
173
+ /** {zh}
174
+ * @brief 关闭镜像。
175
+ */
176
+
177
+ VeLivePlayerMirrorNone = 0,
178
+ /** {zh}
179
+ * @brief 水平镜像。
180
+ */
181
+
182
+ VeLivePlayerMirrorHorizontal = 1,
183
+ /** {zh}
184
+ * @brief 垂直镜像。
185
+ */
186
+
187
+ VeLivePlayerMirrorVertical = 2
188
+ }
189
+ export declare class t_VeLivePlayerMirror {
190
+ static ts_to_android(value: VeLivePlayerMirror): $p_a.VeLivePlayerMirror;
191
+ static android_to_ts(value: $p_a.VeLivePlayerMirror): VeLivePlayerMirror;
192
+ static ts_to_ios(value: VeLivePlayerMirror): $p_i.VeLivePlayerMirror;
193
+ static ios_to_ts(value: $p_i.VeLivePlayerMirror): VeLivePlayerMirror;
194
+ }
195
+ /** {zh}
196
+ * @detail keytype
197
+ * @brief 视频数据封装格式。
198
+ */
199
+
200
+ export declare enum VeLivePlayerVideoBufferType {
201
+ /** {zh}
202
+ * @brief 未知格式。
203
+ */
204
+
205
+ VeLivePlayerVideoBufferTypeUnknown = 0,
206
+ /** {zh}
207
+ * @platform android
208
+ * @brief ByteBuffer 格式。
209
+ */
210
+
211
+ VeLivePlayerVideoBufferTypeByteBuffer = 1,
212
+ /** {zh}
213
+ * @platform android
214
+ * @brief ByteArray 格式。
215
+ */
216
+
217
+ VeLivePlayerVideoBufferTypeByteArray = 2,
218
+ /** {zh}
219
+ * @platform android
220
+ * @brief 纹理格式。
221
+ */
222
+
223
+ VeLivePlayerVideoBufferTypeTexture = 3,
224
+ /** {zh}
225
+ * @platform ios
226
+ * @brief CVPixelBufferRef 格式。
227
+ */
228
+
229
+ VeLivePlayerVideoBufferTypePixelBuffer = 5,
230
+ /** {zh}
231
+ * @platform ios
232
+ * @brief CVSampleBufferRef 格式。
233
+ */
234
+
235
+ VeLivePlayerVideoBufferTypeSampleBuffer = 6,
236
+ /** {zh}
237
+ * @platform ios
238
+ * @brief NSData 格式。
239
+ */
240
+
241
+ VeLivePlayerVideoBufferTypeNSData = 7
242
+ }
243
+ export declare class t_VeLivePlayerVideoBufferType {
244
+ static ts_to_android(value: VeLivePlayerVideoBufferType): $p_a.VeLivePlayerVideoBufferType;
245
+ static android_to_ts(value: $p_a.VeLivePlayerVideoBufferType): VeLivePlayerVideoBufferType;
246
+ static ts_to_ios(value: VeLivePlayerVideoBufferType): $p_i.VeLivePlayerVideoBufferType;
247
+ static ios_to_ts(value: $p_i.VeLivePlayerVideoBufferType): VeLivePlayerVideoBufferType;
248
+ }
249
+ /** {zh}
250
+ * @detail keytype
251
+ * @brief 直播播放器状态。
252
+ */
253
+
254
+ export declare enum VeLivePlayerStatus {
255
+ /** {zh}
256
+ * @brief 停止播放状态。
257
+ */
258
+
259
+ VeLivePlayerStatusStopped = 3,
260
+ /** {zh}
261
+ * @brief 暂停播放状态。
262
+ */
263
+
264
+ VeLivePlayerStatusPaused = 2,
265
+ /** {zh}
266
+ * @brief 播放器准备完成,等待渲染。
267
+ */
268
+
269
+ VeLivePlayerStatusPrepared = 0,
270
+ /** {zh}
271
+ * @brief 正在播放,即首帧渲染完成且播放器未发生错误。
272
+ */
273
+
274
+ VeLivePlayerStatusPlaying = 1,
275
+ /** {zh}
276
+ * @brief 播放器发生错误。
277
+ */
278
+
279
+ VeLivePlayerStatusError = 4
280
+ }
281
+ export declare class t_VeLivePlayerStatus {
282
+ static ts_to_android(value: VeLivePlayerStatus): $p_a.VeLivePlayerStatus;
283
+ static android_to_ts(value: $p_a.VeLivePlayerStatus): VeLivePlayerStatus;
284
+ static ts_to_ios(value: VeLivePlayerStatus): $p_i.VeLivePlayerStatus;
285
+ static ios_to_ts(value: $p_i.VeLivePlayerStatus): VeLivePlayerStatus;
286
+ }
287
+ export declare class VeLivePlayerLogConfig extends $p_a.VeLivePlayerLogConfig {
288
+ }
289
+ /** {zh}
290
+ * @detail keytype
291
+ * @brief 播放地址相关配置。
292
+ */
293
+
294
+ export declare class VeLivePlayerStreamData {
295
+ protected _instance: any;
296
+ protected __init(...args: any[]): void;
297
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerStreamData | $p_i.VeLivePlayerStreamData;
298
+ /** {zh}
299
+ * @brief 是否打开 ABR 平滑切档功能,默认为 false。
300
+ * - true:开启;
301
+ * - false:关闭。
302
+ */
303
+
304
+ get enableABR(): boolean;
305
+ set enableABR(value: boolean);
306
+ /** {zh}
307
+ * @brief 是否打开主备切换,默认为 false。
308
+ * - true:开启;
309
+ * - false:关闭。
310
+ */
311
+
312
+ get enableMainBackupSwitch(): boolean;
313
+ set enableMainBackupSwitch(value: boolean);
314
+ /** {zh}
315
+ * @brief 播放器的默认清晰度档位,默认使用原始流清晰度。详情请参见 {@link #VeLivePlayerResolution VeLivePlayerResolution}。
316
+ */
317
+
318
+ get defaultResolution(): VeLivePlayerResolution;
319
+ set defaultResolution(value: VeLivePlayerResolution);
320
+ /** {zh}
321
+ * @brief 播放器的默认播放格式,默认值为 FLV。详情请参见 {@link #VeLivePlayerFormat VeLivePlayerFormat}。
322
+ */
323
+
324
+ get defaultFormat(): VeLivePlayerFormat;
325
+ set defaultFormat(value: VeLivePlayerFormat);
326
+ /** {zh}
327
+ * @brief 播放器的默认播放传输层协议,默认值为 TCP。详情请参见 {@link #VeLivePlayerProtocol VeLivePlayerProtocol}。
328
+ */
329
+
330
+ get defaultProtocol(): VeLivePlayerProtocol;
331
+ set defaultProtocol(value: VeLivePlayerProtocol);
332
+ /** {zh}
333
+ * @brief 主路流地址列表,详情请参见 [VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream)。
334
+ */
335
+
336
+ get mainStreamList(): VeLivePlayerStream[];
337
+ set mainStreamList(value: VeLivePlayerStream[]);
338
+ /** {zh}
339
+ * @brief 备路流地址列表。详情请参见 [VeLivePlayerStream](#VeLivePlayerStreamData-VeLivePlayerStream)。
340
+ */
341
+
342
+ get backupStreamList(): VeLivePlayerStream[];
343
+ set backupStreamList(value: VeLivePlayerStream[]);
344
+ }
345
+ /** {zh}
346
+ * @detail keytype
347
+ * @brief 直播播放器清晰度档位变化原因。
348
+ */
349
+
350
+ export declare enum VeLivePlayerResolutionSwitchReason {
351
+ /** {zh}
352
+ * @brief ABR 自动切档。
353
+ */
354
+
355
+ VeLivePlayerResolutionSwitchByAuto = 0,
356
+ /** {zh}
357
+ * @brief 手动切换档位。
358
+ */
359
+
360
+ VeLivePlayerResolutionSwitchByManual = 1
361
+ }
362
+ export declare class t_VeLivePlayerResolutionSwitchReason {
363
+ static ts_to_android(value: VeLivePlayerResolutionSwitchReason): $p_a.VeLivePlayerResolutionSwitchReason;
364
+ static android_to_ts(value: $p_a.VeLivePlayerResolutionSwitchReason): VeLivePlayerResolutionSwitchReason;
365
+ static ts_to_ios(value: VeLivePlayerResolutionSwitchReason): $p_i.VeLivePlayerResolutionSwitchReason;
366
+ static ios_to_ts(value: $p_i.VeLivePlayerResolutionSwitchReason): VeLivePlayerResolutionSwitchReason;
367
+ }
368
+ /** {zh}
369
+ * @detail keytype
370
+ * @brief 流地址信息。
371
+ */
372
+
373
+ export declare class VeLivePlayerStream {
374
+ protected _instance: any;
375
+ protected __init(...args: any[]): void;
376
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerStream | $p_i.VeLivePlayerStream;
377
+ /** {zh}
378
+ * @brief 播放地址。
379
+ */
380
+
381
+ get url(): string;
382
+ set url(value: string);
383
+ /** {zh}
384
+ * @brief 清晰度档位。详情请参见 {@link #VeLivePlayerResolution VeLivePlayerResolution}。
385
+ */
386
+
387
+ get resolution(): VeLivePlayerResolution;
388
+ set resolution(value: VeLivePlayerResolution);
389
+ /** {zh}
390
+ * @brief 播放码率,单位为 kbps。
391
+ */
392
+
393
+ get bitrate(): number;
394
+ set bitrate(value: number);
395
+ /** {zh}
396
+ * @brief 播放格式。详情请参见 {@link #VeLivePlayerFormat VeLivePlayerFormat}。
397
+ */
398
+
399
+ get format(): VeLivePlayerFormat;
400
+ set format(value: VeLivePlayerFormat);
401
+ /** {zh}
402
+ * @platform android
403
+ * @brief 播放流类型为主路或备路。详情请参见 {@link #VeLivePlayerStreamType VeLivePlayerStreamType}。
404
+ */
405
+
406
+ get android_streamType(): $p_a.VeLivePlayerStreamType;
407
+ set android_streamType(value: $p_a.VeLivePlayerStreamType);
408
+ }
409
+ /** {zh}
410
+ * @detail keytype
411
+ * @brief 直播播放器画面的填充模式。
412
+ */
413
+
414
+ export declare enum VeLivePlayerFillMode {
415
+ /** {zh}
416
+ * @brief 显示完整的视频帧。视频帧等比缩放,直至视频帧恰好在画布上全部显示。如果视频帧长宽比例与画布不同,视窗上未被视频帧填满区域将填充为黑色。
417
+ */
418
+
419
+ VeLivePlayerFillModeAspectFit = 0,
420
+ /** {zh}
421
+ * @brief 视频帧自适应画布。视频帧非等比缩放,直至填满画布。在此过程中,视频帧的长宽比例可能会发生变化。
422
+ */
423
+
424
+ VeLivePlayerFillModeFullFill = 1,
425
+ /** {zh}
426
+ * @brief 视频填满画布。视频帧等比缩放,直至填满画布,超出屏幕的部分将被裁剪,画面可能不完整。
427
+ */
428
+
429
+ VeLivePlayerFillModeAspectFill = 2
430
+ }
431
+ export declare class t_VeLivePlayerFillMode {
432
+ static ts_to_android(value: VeLivePlayerFillMode): $p_a.VeLivePlayerFillMode;
433
+ static android_to_ts(value: $p_a.VeLivePlayerFillMode): VeLivePlayerFillMode;
434
+ static ts_to_ios(value: VeLivePlayerFillMode): $p_i.VeLivePlayerFillMode;
435
+ static ios_to_ts(value: $p_i.VeLivePlayerFillMode): VeLivePlayerFillMode;
436
+ }
437
+ /** {zh}
438
+ * @detail keytype
439
+ * @brief 视频帧像素格式。
440
+ */
441
+
442
+ export declare enum VeLivePlayerPixelFormat {
443
+ /** {zh}
444
+ * @brief 未知格式。
445
+ */
446
+
447
+ VeLivePlayerPixelFormatUnknown = 0,
448
+ /** {zh}
449
+ * @platform android
450
+ * @brief RGBA8888 格式。
451
+ */
452
+
453
+ VeLivePlayerPixelFormatRGBA32 = 1,
454
+ /** {zh}
455
+ * @platform android
456
+ * @brief 纹理格式。
457
+ */
458
+
459
+ VeLivePlayerPixelFormatTexture = 2,
460
+ /** {zh}
461
+ * @platform ios
462
+ * @brief NV12 格式。
463
+ */
464
+
465
+ VeLivePlayerPixelFormatNV12 = 4,
466
+ /** {zh}
467
+ * @platform ios
468
+ * @brief YUVI420 格式。
469
+ */
470
+
471
+ VeLivePlayerPixelFormatI420 = 5,
472
+ /** {zh}
473
+ * @platform ios
474
+ * @brief BGRA 格式。
475
+ */
476
+
477
+ VeLivePlayerPixelFormatBGRA32 = 6
478
+ }
479
+ export declare class t_VeLivePlayerPixelFormat {
480
+ static ts_to_android(value: VeLivePlayerPixelFormat): $p_a.VeLivePlayerPixelFormat;
481
+ static android_to_ts(value: $p_a.VeLivePlayerPixelFormat): VeLivePlayerPixelFormat;
482
+ static ts_to_ios(value: VeLivePlayerPixelFormat): $p_i.VeLivePlayerPixelFormat;
483
+ static ios_to_ts(value: $p_i.VeLivePlayerPixelFormat): VeLivePlayerPixelFormat;
484
+ }
485
+ /** {zh}
486
+ * @detail keytype
487
+ * @brief 播放周期性统计信息。
488
+ */
489
+
490
+ export declare class VeLivePlayerStatistics {
491
+ protected _instance: any;
492
+ protected __init(...args: any[]): void;
493
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerStatistics | $p_i.VeLivePlayerStatistics;
494
+ /** {zh}
495
+ * @brief 当前直播的播放地址。
496
+ */
497
+
498
+ get url(): string;
499
+ /** {zh}
500
+ * @brief 是否使用硬件解码。
501
+ * - true:硬解;
502
+ * - false:非硬解。
503
+ */
504
+
505
+ get isHardwareDecode(): boolean;
506
+ /** {zh}
507
+ * @brief 视频的编码类型。
508
+ */
509
+
510
+ get videoCodec(): string;
511
+ /** {zh}
512
+ * @brief 从当前视频开始播放起,累计的卡顿时长,单位为 ms。
513
+ */
514
+
515
+ get stallTimeMs(): number;
516
+ /** {zh}
517
+ * @brief 带宽预测 ,单位为 kbps。
518
+ */
519
+ get bandwidthEstimation(): number;
520
+ /** {zh}
521
+ * @brief 当前播放延时,单位为 ms。仅在使用了火山引擎视频直播推流 SDK 时,支持统计播放延时。
522
+ */
523
+
524
+ get delayMs(): number;
525
+ /** {zh}
526
+ * @brief 当前播放视频的宽度,单位为 px。
527
+ */
528
+
529
+ get width(): number;
530
+ /** {zh}
531
+ * @brief 当前播放视频的高度,单位为 px。
532
+ */
533
+
534
+ get height(): number;
535
+ /** {zh}
536
+ * @brief 当前播放视频的帧率,单位为 fps。
537
+ */
538
+
539
+ get fps(): number;
540
+ /** {zh}
541
+ * @brief 实时下载的码率,单位为 kbps。
542
+ */
543
+
544
+ get bitrate(): number;
545
+ /** {zh}
546
+ * @brief 视频播放的缓冲区 buffer 大小,单位为 ms。
547
+ */
548
+
549
+ get videoBufferMs(): number;
550
+ /** {zh}
551
+ * @brief 音频播放的缓冲区 buffer 大小,单位为 ms。
552
+ */
553
+
554
+ get audioBufferMs(): number;
555
+ /** {zh}
556
+ * @brief 当前播放的视频格式。
557
+ */
558
+
559
+ get format(): VeLivePlayerFormat;
560
+ /** {zh}
561
+ * @brief 当前播放的传输协议。
562
+ */
563
+
564
+ get protocol(): VeLivePlayerProtocol;
565
+ }
566
+ /** {zh}
567
+ * @detail keytype
568
+ * @brief 视频帧数据。
569
+ */
570
+
571
+ export declare class VeLivePlayerVideoFrame {
572
+ protected _instance: any;
573
+ protected __init(...args: any[]): void;
574
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerVideoFrame | $p_i.VeLivePlayerVideoFrame;
575
+ /** {zh}
576
+ * @brief 视频帧数据封装格式。详情请参见 {@link #VeLivePlayerVideoBufferType VeLivePlayerVideoBufferType}。
577
+ */
578
+
579
+ get bufferType(): VeLivePlayerVideoBufferType;
580
+ set bufferType(value: VeLivePlayerVideoBufferType);
581
+ /** {zh}
582
+ * @brief 视频帧像素格式。详情请参见 {@link #VeLivePlayerPixelFormat VeLivePlayerPixelFormat}。
583
+ */
584
+
585
+ get pixelFormat(): VeLivePlayerPixelFormat;
586
+ set pixelFormat(value: VeLivePlayerPixelFormat);
587
+ /** {zh}
588
+ * @brief 视频宽度,单位为 px。
589
+ */
590
+
591
+ get width(): number;
592
+ set width(value: number);
593
+ /** {zh}
594
+ * @brief 视频高度,单位为 px。
595
+ */
596
+
597
+ get height(): number;
598
+ set height(value: number);
599
+ /** {zh}
600
+ * @brief 视频帧的渲染时间戳。单位为 ms。
601
+ */
602
+
603
+ get pts(): number;
604
+ set pts(value: number);
605
+ /** {zh}
606
+ * @hidden
607
+ * @platform android
608
+ * @brief `pixelFormat` 为 `VeLivePlayerPixelFormatTexture` 时的视频数据,承载用于 OpenGL 渲染的纹理数据。详情请参见 {@link #VeLivePlayerVideoTexture VeLivePlayerVideoTexture}。
609
+ */
610
+
611
+ get android_texture(): $p_a.VeLivePlayerVideoTexture;
612
+ set android_texture(value: $p_a.VeLivePlayerVideoTexture);
613
+ /** {zh}
614
+ * @platform android
615
+ * @brief `pixelFormat` 为 `VeLivePlayerPixelFormatRGBA32` 时的视频数据,ByteBuffer 格式。
616
+ */
617
+
618
+ get android_buffer(): $p_a.ByteBuffer;
619
+ set android_buffer(value: $p_a.ByteBuffer);
620
+ /** {zh}
621
+ * @brief `pixelFormat` 为 `VeLivePlayerPixelFormatRGBA32` 时的视频数据,ByteArray 格式。
622
+ */
623
+
624
+ get data(): ArrayBuffer;
625
+ set data(value: ArrayBuffer);
626
+ }
627
+ export declare class VeLivePlayerVideoTexture extends $p_a.VeLivePlayerVideoTexture {
628
+ }
629
+ /** {zh}
630
+ * @detail keytype
631
+ * @brief 直播播放流类型。
632
+ */
633
+
634
+ export declare enum VeLivePlayerStreamType {
635
+ /** {zh}
636
+ * @brief 主路流。
637
+ */
638
+
639
+ VeLivePlayerStreamTypeMain = 0,
640
+ /** {zh}
641
+ * @brief 备路流。
642
+ */
643
+
644
+ VeLivePlayerStreamTypeBackup = 1
645
+ }
646
+ export declare class t_VeLivePlayerStreamType {
647
+ static ts_to_android(value: VeLivePlayerStreamType): $p_a.VeLivePlayerStreamType;
648
+ static android_to_ts(value: $p_a.VeLivePlayerStreamType): VeLivePlayerStreamType;
649
+ static ts_to_ios(value: VeLivePlayerStreamType): $p_i.VeLivePlayerStreamType;
650
+ static ios_to_ts(value: $p_i.VeLivePlayerStreamType): VeLivePlayerStreamType;
651
+ }
652
+ /** {zh}
653
+ * @detail keytype
654
+ * @brief 直播播放器日志打印级别。
655
+ */
656
+
657
+ export declare enum VeLivePlayerLogLevel {
658
+ /** {zh}
659
+ * @brief 输出 VERBOSE、DEBUG、INFO、WARNING 和 ERROR 级别的日志。
660
+ */
661
+
662
+ VeLivePlayerLogLevelVerbose = 0,
663
+ /** {zh}
664
+ * @brief 输出 DEBUG、INFO、WARNING 和 ERROR 级别的日志。
665
+ */
666
+
667
+ VeLivePlayerLogLevelDebug = 1,
668
+ /** {zh}
669
+ * @brief 输出 INFO、WARNING 和 ERROR 级别的日志。
670
+ */
671
+
672
+ VeLivePlayerLogLevelInfo = 2,
673
+ /** {zh}
674
+ * @brief 输出 WARNING 和 ERROR 级别的日志。
675
+ */
676
+
677
+ VeLivePlayerLogLevelWarn = 3,
678
+ /** {zh}
679
+ * @brief 输出 ERROR 级别的日志。
680
+ */
681
+
682
+ VeLivePlayerLogLevelError = 4,
683
+ /** {zh}
684
+ * @brief 关闭日志打印。
685
+ */
686
+
687
+ VeLivePlayerLogLevelNone = 5
688
+ }
689
+ export declare class t_VeLivePlayerLogLevel {
690
+ static ts_to_android(value: VeLivePlayerLogLevel): $p_a.VeLivePlayerLogLevel;
691
+ static android_to_ts(value: $p_a.VeLivePlayerLogLevel): VeLivePlayerLogLevel;
692
+ static ts_to_ios(value: VeLivePlayerLogLevel): $p_i.VeLivePlayerLogLevel;
693
+ static ios_to_ts(value: $p_i.VeLivePlayerLogLevel): VeLivePlayerLogLevel;
694
+ }
695
+ /** {zh}
696
+ * @detail keytype
697
+ * @brief 音频帧数据。
698
+ */
699
+
700
+ export declare class VeLivePlayerAudioFrame {
701
+ protected _instance: any;
702
+ protected __init(...args: any[]): void;
703
+ protected __new_instance(...args: any[]): $p_a.VeLivePlayerAudioFrame | $p_i.VeLivePlayerAudioFrame;
704
+ /** {zh}
705
+ * @brief 音频帧数据封装格式,详情请参见 [VeLivePlayerAudioBufferType](188115#VeLivePlayerAudioBufferType)。
706
+ */
707
+
708
+ get bufferType(): VeLivePlayerAudioBufferType;
709
+ set bufferType(value: VeLivePlayerAudioBufferType);
710
+ /** {zh}
711
+ * @brief 音频采样率,单位为 Hz。
712
+ */
713
+
714
+ get sampleRate(): number;
715
+ set sampleRate(value: number);
716
+ /** {zh}
717
+ * @brief 声道数。
718
+ * - 1:单声道;
719
+ * - 2:双声道。
720
+ */
721
+
722
+ get channels(): number;
723
+ set channels(value: number);
724
+ /** {zh}
725
+ * @brief 音频位深度。
726
+ */
727
+
728
+ get bitDepth(): number;
729
+ set bitDepth(value: number);
730
+ /** {zh}
731
+ * @brief 音频渲染时间戳。单位为 ms。
732
+ */
733
+
734
+ get pts(): number;
735
+ set pts(value: number);
736
+ /** {zh}
737
+ * @platform android
738
+ * @brief PCM 音频数据。
739
+ */
740
+
741
+ get android_buffer(): ArrayBuffer;
742
+ set android_buffer(value: ArrayBuffer);
743
+ /** {zh}
744
+ * @brief 音频采样点个数。
745
+ */
746
+
747
+ get samples(): number;
748
+ set samples(value: number);
749
+ }
750
+ /** {zh}
751
+ * @detail keytype
752
+ * @brief 音频数据封装格式。
753
+ */
754
+
755
+ export declare enum VeLivePlayerAudioBufferType {
756
+ /** {zh}
757
+ * @platform android
758
+ * @brief 未知格式。
759
+ */
760
+
761
+ VeLivePlayerAudioBufferTypeUnknown = 0,
762
+ /** {zh}
763
+ * @platform android
764
+ * @brief ByteArray 格式。
765
+ */
766
+
767
+ VeLivePlayerAudioBufferTypeByteArray = 1,
768
+ /** {zh}
769
+ * @platform ios
770
+ * @brief 未知格式。
771
+ */
772
+
773
+ VeLivePlayerAudioBufferUnknown = 3,
774
+ /** {zh}
775
+ * @platform ios
776
+ * @brief CVSampleBufferRef 格式,音频数据以样本缓冲区 sample buffer 的形式进行处理和渲染。
777
+ */
778
+
779
+ VeLivePlayerAudioBufferTypeSampleBuffer = 4,
780
+ /** {zh}
781
+ * @platform ios
782
+ * @brief NSData 格式,音频数据以 NSData 对象的形式进行处理和渲染。
783
+ */
784
+
785
+ VeLivePlayerAudioBufferTypeNSData = 5
786
+ }
787
+ export declare class t_VeLivePlayerAudioBufferType {
788
+ static ts_to_android(value: VeLivePlayerAudioBufferType): $p_a.VeLivePlayerAudioBufferType;
789
+ static android_to_ts(value: $p_a.VeLivePlayerAudioBufferType): VeLivePlayerAudioBufferType;
790
+ static ts_to_ios(value: VeLivePlayerAudioBufferType): $p_i.VeLivePlayerAudioBufferType;
791
+ static ios_to_ts(value: $p_i.VeLivePlayerAudioBufferType): VeLivePlayerAudioBufferType;
792
+ }
793
+ /** {zh}
794
+ * @detail keytype
795
+ * @brief 视频顺时针旋转角度。
796
+ */
797
+
798
+ export declare enum VeLivePlayerRotation {
799
+ /** {zh}
800
+ * @brief 关闭旋转。
801
+ */
802
+
803
+ VeLivePlayerRotation0 = 0,
804
+ /** {zh}
805
+ * @brief 顺时针旋转 90 度。
806
+ */
807
+
808
+ VeLivePlayerRotation90 = 1,
809
+ /** {zh}
810
+ * @brief 顺时针旋转 180 度。
811
+ */
812
+
813
+ VeLivePlayerRotation180 = 2,
814
+ /** {zh}
815
+ * @brief 顺时针旋转 270 度。
816
+ */
817
+
818
+ VeLivePlayerRotation270 = 3
819
+ }
820
+ export declare class t_VeLivePlayerRotation {
821
+ static ts_to_android(value: VeLivePlayerRotation): $p_a.VeLivePlayerRotation;
822
+ static android_to_ts(value: $p_a.VeLivePlayerRotation): VeLivePlayerRotation;
823
+ static ts_to_ios(value: VeLivePlayerRotation): $p_i.VeLivePlayerRotation;
824
+ static ios_to_ts(value: $p_i.VeLivePlayerRotation): VeLivePlayerRotation;
825
+ }
826
+ /** {zh}
827
+ * @platform ios
828
+ * @hidden
829
+ * @detail keytype
830
+ * @brief 直播播放 BMF 超分类型的枚举。
831
+ */
832
+
833
+ export declare enum VeLivePlayerBMFFlexSRType {
834
+ /** {zh}
835
+ * @platform ios
836
+ * @brief 未知超分类型
837
+ */
838
+
839
+ VeLivePlayerBMFScale_Unknow = -1,
840
+ /** {zh}
841
+ * @platform ios
842
+ * @brief 1.5 倍超分类型,即分辨率是原始分辨率的 1.5 倍
843
+ */
844
+
845
+ VeLivePlayerBMFScale_1_5 = 0,
846
+ /** {zh}
847
+ * @platform ios
848
+ * @brief 2 超分类型,即分辨率是原始分辨率的 2 倍
849
+ */
850
+
851
+ VeLivePlayerBMFScale_2_0 = 1,
852
+ /** {zh}
853
+ * @platform ios
854
+ * @brief 1.1 倍超分类型,即分辨率是原始分辨率的 1.1 倍
855
+ */
856
+
857
+ VeLivePlayerBMFScale_1_1 = 2,
858
+ /** {zh}
859
+ * @platform ios
860
+ * @brief 1.2 倍超分类型,即分辨率是原始分辨率的 1.2 倍
861
+ */
862
+
863
+ VeLivePlayerBMFScale_1_2 = 3,
864
+ /** {zh}
865
+ * @platform ios
866
+ * @brief 1.3 倍超分类型,即分辨率是原始分辨率的 1.3 倍
867
+ */
868
+
869
+ VeLivePlayerBMFScale_1_3 = 4,
870
+ /** {zh}
871
+ * @platform ios
872
+ * @brief 1.4 倍超分类型,即分辨率是原始分辨率的 1.4 倍
873
+ */
874
+
875
+ VeLivePlayerBMFScale_1_4 = 5
876
+ }
877
+ export declare class t_VeLivePlayerBMFFlexSRType {
878
+ static ts_to_android(value: VeLivePlayerBMFFlexSRType): never;
879
+ static android_to_ts(value: unknown): never;
880
+ static ts_to_ios(value: VeLivePlayerBMFFlexSRType): $p_i.VeLivePlayerBMFFlexSRType;
881
+ static ios_to_ts(value: $p_i.VeLivePlayerBMFFlexSRType): VeLivePlayerBMFFlexSRType;
882
+ }
883
+ /** {zh}
884
+ * @platform ios
885
+ * @hidden
886
+ * @detail keytype
887
+ * @brief 直播播放 BMF 超分功能的错误码枚举。
888
+ */
889
+
890
+ export declare enum VeLivePlayerBMFFlexSRErrorCode {
891
+ /** {zh}
892
+ * @platform ios
893
+ * @brief 未知错误
894
+ */
895
+
896
+ VeLivePlayerBMFFlexSRErrorUnknow = 0,
897
+ /** {zh}
898
+ * @platform ios
899
+ * @brief 不满足超分的条件
900
+ */
901
+
902
+ VeLivePlayerBMFFlexSRErrorCondition = 1,
903
+ /** {zh}
904
+ * @platform ios
905
+ * @brief 不支持该超分类型
906
+ */
907
+
908
+ VeLivePlayerBMFFlexSRErrorSRType = 2,
909
+ /** {zh}
910
+ * @platform ios
911
+ * @brief 设置了重复的超分类型
912
+ */
913
+
914
+ VeLivePlayerBMFFlexSRErrorSRTypeSame = 3,
915
+ /** {zh}
916
+ * @platform ios
917
+ * @brief 超分处理失败(仅在播放过程中设置生效)
918
+ */
919
+
920
+ VeLivePlayerBMFFlexSRErrorProcessFailed = 4,
921
+ /** {zh}
922
+ * @platform ios
923
+ * @brief 超分设置成功
924
+ */
925
+
926
+ VeLivePlayerBMFFlexSRSuccess = 5
927
+ }
928
+ export declare class t_VeLivePlayerBMFFlexSRErrorCode {
929
+ static ts_to_android(value: VeLivePlayerBMFFlexSRErrorCode): never;
930
+ static android_to_ts(value: unknown): never;
931
+ static ts_to_ios(value: VeLivePlayerBMFFlexSRErrorCode): $p_i.VeLivePlayerBMFFlexSRErrorCode;
932
+ static ios_to_ts(value: $p_i.VeLivePlayerBMFFlexSRErrorCode): VeLivePlayerBMFFlexSRErrorCode;
933
+ }