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