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