@volcengine/react-native-live-pull 1.1.3-rc.1 → 1.2.0-rc.1

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