@byteplus/react-native-live-pull 1.3.0-rc.9 → 1.3.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/pictureInpicture/PictureInPictureManager.m +84 -7
  3. package/package.json +5 -5
  4. package/react-native-velive-pull.podspec +10 -3
  5. package/lib/commonjs/index.js +0 -14546
  6. package/lib/module/index.js +0 -14535
  7. package/lib/typescript/codegen/android/api.d.ts +0 -318
  8. package/lib/typescript/codegen/android/callback.d.ts +0 -206
  9. package/lib/typescript/codegen/android/errorcode.d.ts +0 -174
  10. package/lib/typescript/codegen/android/external.d.ts +0 -1
  11. package/lib/typescript/codegen/android/index.d.ts +0 -6
  12. package/lib/typescript/codegen/android/keytype.d.ts +0 -749
  13. package/lib/typescript/codegen/android/types.d.ts +0 -31
  14. package/lib/typescript/codegen/ios/api.d.ts +0 -295
  15. package/lib/typescript/codegen/ios/callback.d.ts +0 -176
  16. package/lib/typescript/codegen/ios/errorcode.d.ts +0 -160
  17. package/lib/typescript/codegen/ios/external.d.ts +0 -1
  18. package/lib/typescript/codegen/ios/index.d.ts +0 -6
  19. package/lib/typescript/codegen/ios/keytype.d.ts +0 -695
  20. package/lib/typescript/codegen/ios/types.d.ts +0 -46
  21. package/lib/typescript/codegen/pack/api.d.ts +0 -367
  22. package/lib/typescript/codegen/pack/callback.d.ts +0 -255
  23. package/lib/typescript/codegen/pack/errorcode.d.ts +0 -187
  24. package/lib/typescript/codegen/pack/external.d.ts +0 -1
  25. package/lib/typescript/codegen/pack/index.d.ts +0 -6
  26. package/lib/typescript/codegen/pack/keytype.d.ts +0 -909
  27. package/lib/typescript/codegen/pack/types.d.ts +0 -68
  28. package/lib/typescript/component.d.ts +0 -15
  29. package/lib/typescript/core/api.d.ts +0 -114
  30. package/lib/typescript/core/appState.d.ts +0 -3
  31. package/lib/typescript/core/callback.d.ts +0 -53
  32. package/lib/typescript/core/env.d.ts +0 -38
  33. package/lib/typescript/core/errorcode.d.ts +0 -1
  34. package/lib/typescript/core/index.d.ts +0 -6
  35. package/lib/typescript/core/keytype.d.ts +0 -33
  36. package/lib/typescript/core/player.d.ts +0 -16
  37. package/lib/typescript/index.d.ts +0 -2
  38. package/lib/typescript/platforms/android/extends.d.ts +0 -39
  39. package/lib/typescript/platforms/android/pictureInpicture.d.ts +0 -26
  40. package/lib/typescript/platforms/ios/extends.d.ts +0 -43
  41. package/lib/typescript/platforms/ios/pictureInpicture.d.ts +0 -32
  42. package/lib/typescript/runtime/index.d.ts +0 -1
@@ -1,318 +0,0 @@
1
- import { String, SurfaceHolder, Surface, float, Map, List, int } from './types';
2
- import { VeLivePlayerLogLevel, VeLivePlayerConfiguration, VeLivePlayerFillMode, VeLivePlayerStreamData, VeLivePlayerResolution, VeLivePlayerPixelFormat, VeLivePlayerVideoBufferType, VeLivePlayerAudioBufferType, VeLivePlayerRotation, VeLivePlayerMirror } from './keytype';
3
- import { VeLivePlayerObserver } from './callback';
4
- import { ApplicationContext } from './external';
5
- export declare class VeLivePlayer {
6
-
7
- /** {en}
8
- * @detail api
9
- * @brief Gets the version number of the Player SDK.
10
- * @return <br>
11
- * The version number of the Player SDK.
12
- * @order 4
13
- *
14
- */
15
- static getVersion(): String;
16
-
17
- /** {en}
18
- * @detail api
19
- * @brief Sets the level of the output log.
20
- * @param logLevel The level of the output log. For details, see VeLivePlayerLogLevel{@link #VeLivePlayerLogLevel}.
21
- * @order 5
22
- *
23
- */
24
- static setLogLevel(logLevel: VeLivePlayerLogLevel): void;
25
- constructor(context: ApplicationContext);
26
-
27
- /** {en}
28
- * @detail api
29
- * @brief Initializes the player and configures whether to turn on SEI messaging, hardware decoding, local DNS prefetch, and other configurations.
30
- * @notes <br>Call this method to initialize the player before calling [play](#VeLivePlayer-play) .
31
- * @order 1
32
- * @param config Player configurations. Refer to VeLivePlayerConfiguration{@link #VeLivePlayerConfiguration} for details.
33
- *
34
- */
35
- setConfig(config: VeLivePlayerConfiguration): void;
36
-
37
- /** {en}
38
- * @detail api
39
- * @brief Sets the player observer to listen to the live player's events, such as playback errors or status updates, rendering of the first audio and video frame, and resolution switching.
40
- * @notes
41
- * Call this method before calling [play](#VeLivePlayer-play).
42
- * @param observer The player observer. See VeLivePlayerObserver{@link #VeLivePlayerObserver} for details.
43
- * @order 2
44
- *
45
- */
46
- setObserver(observer: VeLivePlayerObserver): void;
47
-
48
- /** {en}
49
- * @detail api
50
- * @brief Sets the fill mode of the player screen.
51
- * @notes <br>
52
- * - Call this method before calling [play](#VeLivePlayer-play) to set the initial fill mode of the player.
53
- * - You can call this method during playback to dynamically adjust the fill mode.
54
- * @order 3
55
- * @param fillMode The fill mode of SurfaceView. The default value is `VeLivePlayerFillModeAspectFill`. For details, see VeLivePlayerFillMode{@link #VeLivePlayerFillMode}.
56
- *
57
- */
58
- setRenderFillMode(fillMode: VeLivePlayerFillMode): Promise<void>;
59
-
60
- /** {en}
61
- * @detail api
62
- * @brief Sets the `SurfaceHolder` object for video rendering and playback. Use this method if you use `SurfaceView` for playback.
63
- * @notes
64
- * If you call both setSurfaceHolder and [setSurface](#VeLivePlayer-setsurface) to set the `Surface` object, the player will prioritize the configurations of `surfaceHolder`.
65
- * @param surfaceHolder The `SurfaceHolder` object.
66
- * @order 6
67
- *
68
- */
69
- setSurfaceHolder(surfaceHolder: SurfaceHolder): void;
70
-
71
- /** {en}
72
- * @detail api
73
- * @brief Sets the `Surface` object for video rendering and playback. Use this method if you use `SurfaceView` or `TextureView` for playback.
74
- * @notes
75
- * If you call both [setSurfaceHolder](#VeLivePlayer-setsurfaceholder) and `setSurface` to set the `Surface` object, the player will prioritize the configurations of `surfaceHolder`.
76
- * @param surface The `Surface` object.
77
- * @order 7
78
- *
79
- */
80
- setSurface(surface: Surface): void;
81
-
82
- /** {en}
83
- * @detail api
84
- * @brief Sets a pull stream address.
85
- * @notes <br>Call this method before calling play.
86
- * @order 8
87
- * @param url The pull stream address.
88
- *
89
- */
90
- setPlayUrl(url: String): void;
91
-
92
- /** {en}
93
- * @detail api
94
- * @brief Sets multiple live streams. Call this method if you need to enable features requiring multiple live streams, such as adaptive bitrate (ABR), manual resolution switching, and primary and backup streams.
95
- * @notes <br>Call this method before calling play.
96
- * @order 8
97
- * @param streamData Configurations for multiple pull stream addresses. For details, see [VeLivePlayerStreamData](player-android-api-keytype#VeLivePlayerStreamData).
98
- *
99
- */
100
- setPlayStreamData(streamData: VeLivePlayerStreamData): void;
101
-
102
- /** {en}
103
- * @detail api
104
- * @brief Starts or resumes playback.
105
- * @notes
106
- * After you call this method, the [onPlayerStatusUpdate](docs-player-android-api-callback#VeLivePlayerObserver-onplayerstatusupdate) callback is triggered both when the player finishes preparing for stream pulling and when the first frame is rendered.
107
- * @order 8
108
- *
109
- */
110
- play(): void;
111
-
112
- /** {en}
113
- * @detail api
114
- * @brief Pauses playback.
115
- * @notes
116
- * When playback is paused after you call this method, the [onPlayerStatusUpdate](docs-player-android-api-callback#VeLivePlayerObserver-onplayerstatusupdate) callback is triggered.
117
- * @order 8
118
- *
119
- */
120
- pause(): void;
121
-
122
- /** {en}
123
- * @detail api
124
- * @brief Stops playback. This method does not destroy the player.
125
- * @notes
126
- * When playback stops after you call this method, the [onPlayerStatusUpdate](docs-player-android-api-callback#VeLivePlayerObserver-onplayerstatusupdate) callback is triggered.
127
- * @order 8
128
- *
129
- */
130
- stop(): void;
131
-
132
- /** {en}
133
- * @detail api
134
- * @brief Stops playback and destroys the player.
135
- * @order 8
136
- *
137
- */
138
- destroy(): void;
139
-
140
- /** {en}
141
- * @detail api
142
- * @brief Changes the video resolution.
143
- * @notes - Call [setPlayStreamData](#VeLivePlayer-setplaystreamdata) to set multiple resolutions before calling this method.
144
- * - Once the player switches to the new resolution after you call this method, the [onResolutionSwitch](docs-player-android-api-callback#VeLivePlayerObserver-onresolutionswitch) callback is triggered.
145
- * @order 8
146
- * @param resolution The video resolution. For details, refer to VeLivePlayerResolution
147
- * @return <br>
148
- * - true: Success;
149
- * - false: Failure.
150
- *
151
- */
152
- switchResolution(resolution: VeLivePlayerResolution): boolean;
153
-
154
- /** {en}
155
- * @detail api
156
- * @brief Checks whether the player is playing.
157
- * @return Whether the player is playing. <br>
158
- * - true: The player is playing;
159
- * - false: The player is not playing.
160
- * @order 8
161
- *
162
- */
163
- isPlaying(): boolean;
164
-
165
- /** {en}
166
- * @detail api
167
- * @brief Sets the player volume.
168
- * @param volume The volume. The default value is `1.0`. The value range is [0.0, 1.0].
169
- * @order 8
170
- *
171
- */
172
- setPlayerVolume(volume: float): void;
173
-
174
- /** {en}
175
- * @detail api
176
- * @brief Sets whether to mute playback.
177
- * @param mute Whether to mute playback. The default value is `false`. <br>
178
- * - true: Mute;
179
- * - false: Do not mute.
180
- * @order 9
181
- *
182
- */
183
- setMute(mute: boolean): void;
184
-
185
- /** {en}
186
- * @detail api
187
- * @brief Checks whether playback is muted.
188
- * @return Whether playback is muted. <br>
189
- * - true: Muted;
190
- * - false: Not muted.
191
- * @order 10
192
- *
193
- */
194
- isMute(): boolean;
195
-
196
- /** {en}
197
- * @detail api
198
- * @brief Sets the mapping of domain names to server IP addresses.
199
- * @param hostIpMap The mapping of domain names to server IP addresses. The `Map` object uses the domain name as the key, and the corresponding value is a list of IP addresses for the servers associated with that domain. The value is of the `List` type.
200
- * @order 11
201
- * @notes - When using setUrlHostIP to map domain names and IP addresses, disable the DNS pre-resolution feature in the initial configuration by setting [enableLiveDNS](docs-player-android-api-keytype#VeLivePlayerConfiguration-enablelivedns) to false.
202
- * - Call this method to set the mapping of domain names and IP addresses before calling [play](#VeLivePlayer-play) to start playback.
203
- *
204
- */
205
- setUrlHostIP(hostIpMap: Map<String, List<String>>): void;
206
-
207
- /** {en}
208
- * @detail api
209
- * @brief Configures advanced settings for the player, including offscreen rendering, maximum buffer duration, and adaptive bitrate (ABR) algorithms. [Create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support if you need further information.
210
- * @param key The parameter name of the advanced setting.
211
- * @param value The parameter value of the advanced setting.
212
- * @order 12
213
- *
214
- */
215
- setProperty(key: String, value: Object): void;
216
-
217
- /** {en}
218
- * @detail api
219
- * @brief Takes a screenshot of the video.
220
- * @notes
221
- * - This method only takes effect during playback.
222
- * - When a screenshot is captured after you call this method, the [onSnapshotComplete](docs-player-android-api-callback#VeLivePlayerObserver-onsnapshotcomplete) callback is triggered containing the Bitmap object of the screenshot.
223
- * @order 13
224
- * @return
225
- * - 0: Screenshot capturing is allowed.
226
- * - [VeLivePlayerErrorRefused](docs-player-android-api-errorcode#VeLivePlayerErrorCode-veliveplayererrorrefused) : Screenshot capturing is not allowed.
227
- *
228
- */
229
- snapshot(): int;
230
-
231
- /** {en}
232
- * @detail api
233
- * @brief Sets the video frame observer.
234
- * @param enable Whether to enable the video frame callback. The default value is `false`. <br>
235
- * - true: Enable;
236
- * - false: Disable.
237
- * @param pixelFormat The pixel format of the video frame in the callback. See VeLivePlayerPixelFormat{@link #VeLivePlayerPixelFormat} for details.
238
- * @param bufferType The encapsulation format of the video data in the callback. For details, see VeLivePlayerVideoBufferType{@link #VeLivePlayerVideoBufferType}.
239
- * @notes
240
- * - You can call this method to subscribe to decoded video data for external rendering.
241
- * - After you call this method, the [onRenderVideoFrame](docs-player-android-api-callback#VeLivePlayerObserver-onrendervideoframe) callback is triggered once the SDK receives a video frame. The callback contains detailed information about the video frame.
242
- * - If you use external rendering, you need to make sure the video and audio are synchronized.
243
- * @order 14
244
- *
245
- */
246
- enableVideoFrameObserver(enable: boolean, pixelFormat: VeLivePlayerPixelFormat, bufferType: VeLivePlayerVideoBufferType): void;
247
-
248
- /** {en}
249
- * @detail api
250
- * @brief Sets the audio frame observer.
251
- * @notes
252
- * - You can call this method to subscribe to decoded audio data if you want to use external rendering.
253
- * - After you call this method, the [onRenderAudioFrame](docs-player-android-api-callback#VeLivePlayerObserver-onrenderaudioframe) callback is triggered once the SDK receives an audio frame. The callback contains detailed information about the audio frame.
254
- * - If you use external rendering, you need to make sure the video and audio are synchronized.
255
- * @order 15
256
- *
257
- * @param enable Whether to enable the audio frame callback. The default value is `false`. <br>
258
- * - true: Enable;
259
- * - false: Disable.
260
- * @param enableRendering Whether to enable player rendering. The default value is `false`. <br>
261
- * - true: Enable;
262
- * - false: Disable.
263
- * @param bufferType Audio buffer type. For details, please refer to [VeLivePlayerAudioBufferType](docs-player-android-api-keytype#VeLivePlayerAudioBufferType).
264
- *
265
- */
266
- enableAudioFrameObserver(enable: boolean, enableRendering: boolean, bufferType: VeLivePlayerAudioBufferType): void;
267
-
268
- /** {en}
269
- * @detail api
270
- * @brief Sets the clockwise rotation angle of the video.
271
- * @param rotation The clockwise rotation angle of the video. Rotation is disabled by default. See VeLivePlayerRotation{@link #VeLivePlayerRotation} for details.
272
- * @notes <br>
273
- * - You can change the rotation angle before and during playback.
274
- * - Each time this method is called, the player rotates the video based on the original video.
275
- * - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it.
276
- * @order 16
277
- *
278
- */
279
- setRenderRotation(rotation: VeLivePlayerRotation): Promise<void>;
280
-
281
- /** {en}
282
- * @detail api
283
- * @brief Configures mirroring settings.
284
- * @param mirror Mirroring settings. Mirroring is disabled by default. See VeLivePlayerMirror{@link #VeLivePlayerMirror} for details.
285
- * @notes <br>
286
- * - You can change the mirroring settings before and during playback.
287
- * - Each time this method is called, the player applies the mirroring settings to the original video.
288
- * - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it.
289
- * @order 17
290
- *
291
- */
292
- setRenderMirror(mirror: VeLivePlayerMirror): Promise<void>;
293
-
294
- /** {en}
295
- * @detail api
296
- * @brief Enables or disables super resolution. You must first contact BytePlus [technical support](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to activate the feature before using it.
297
- * @param enable Whether to enable super resolution. The default value is false.
298
- * - true: enable;
299
- * - false: disable.
300
- * @notes
301
- * - Call this method after receiving the [onFirstVideoFrameRender](docs-player-android-api-callback#VeLivePlayerObserver-onfirstvideoframerender) callback, or during playback.
302
- * - Support dynamically enabling and disabling super-resolution by calling this interface during playback.
303
- * - If the SDK fails to enable super resolution due to device model, video resolution or frame rate, you will receive the [onStreamFailedOpenSuperResolution](docs-player-android-api-callback#VeLivePlayerObserver-onstreamfailedopensuperresolution) callback.
304
- * @order 18
305
- *
306
- */
307
- setEnableSuperResolution(enable: boolean): void;
308
-
309
- /** {en}
310
- * @brief Set whether to enable video sharpening.
311
- * @param enable Set whether to enable video sharpening. The default value is `false`.
312
- * - true: Enable;
313
- * - false: Disable.
314
- *
315
- */
316
- setEnableSharpen(enable: boolean): void;
317
- addExtraHttpRequestHeadersByUser(headers: Map): void;
318
- }
@@ -1,206 +0,0 @@
1
- import { VeLivePlayer } from './api';
2
- import { VeLivePlayerError } from './errorcode';
3
- import { long, int, String, Bitmap } from './types';
4
- import { VeLivePlayerResolution, VeLivePlayerResolutionSwitchReason, VeLivePlayerStreamType, VeLivePlayerStatus, VeLivePlayerStatistics, VeLivePlayerVideoFrame, VeLivePlayerAudioFrame } from './keytype';
5
- export declare class VeLivePlayerObserver {
6
-
7
- /** {en}
8
- * @detail callback
9
- * @brief Occurs when a player error occurs.
10
- * @param player The player object that triggers the callback function.
11
- * @param error The error message. Refer to VeLivePlayerError{@link #VeLivePlayerError} for details.
12
- * @order 1
13
- *
14
- */
15
- onError?(player: VeLivePlayer, error: VeLivePlayerError): void;
16
-
17
- /** {en}
18
- * @detail callback
19
- * @brief Occurs when the first video frame is rendered at the beginning of playback or after a retry during playback.
20
- * @param player The player object that triggers the callback function.
21
- * @param isFirstFrame Whether the video frame is the first video frame rendered at the beginning of playback. <br>
22
- * - true: The video frame is the first video frame rendered at the beginning of playback;
23
- * - false: The video frame is the first video frame rendered after a retry during playback.
24
- * @order 2
25
- *
26
- */
27
- onFirstVideoFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
28
-
29
- /** {en}
30
- * @detail callback
31
- * @brief Occurs when the first audio frame is rendered at the beginning of playback or after a retry during playback.
32
- * @param player The player object that triggers the callback function.
33
- * @param isFirstFrame Whether the audio frame is the first audio frame rendered at the beginning of playback. <br>
34
- * - true: The audio frame is the first audio frame rendered at the beginning of playback;
35
- * - false: The audio frame is the first audio frame rendered after a retry during playback.
36
- * @order 3
37
- *
38
- */
39
- onFirstAudioFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
40
-
41
- /** {en}
42
- * @detail callback
43
- * @brief Occurs when a playback stutter starts.
44
- * @param player The player object that triggers the callback function.
45
- * @order 4
46
- *
47
- */
48
- onStallStart?(player: VeLivePlayer): void;
49
-
50
- /** {en}
51
- * @detail callback
52
- * @brief Occurs when a playback stutter stops, that is, when playback resumes after there is enough audio buffer.
53
- * @param player The player object that triggers the callback function.
54
- * @order 5
55
- *
56
- */
57
- onStallEnd?(player: VeLivePlayer): void;
58
-
59
- /** {en}
60
- * @detail callback
61
- * @brief Occurs when video rendering stutters.
62
- * @param player The player object that triggers the callback function.
63
- * @param stallTime The stutter duration, in milliseconds.
64
- * @order 6
65
- *
66
- */
67
- onVideoRenderStall?(player: VeLivePlayer, stallTime: long): void;
68
-
69
- /** {en}
70
- * @detail callback
71
- * @brief Occurs when audio rendering stutters.
72
- * @param player The player object that triggers the callback function.
73
- * @param stallTime The stutter duration, in milliseconds.
74
- * @order 7
75
- *
76
- */
77
- onAudioRenderStall?(player: VeLivePlayer, stallTime: long): void;
78
-
79
- /** {en}
80
- * @detail callback
81
- * @brief Occurs when the video resolution changes.
82
- * @param player The player object that triggers the callback function.
83
- * @param resolution The updated resolution. See [VeLivePlayerResolution](docs-player-android-api-keytype#VeLivePlayerResolution) for details.
84
- * @param error Whether an error occurred during resolution switching. See VeLivePlayerError{@link #VeLivePlayerError} for details.
85
- * @param reason The reason for resolution switching. See VeLivePlayerResolutionSwitchReason{@link #VeLivePlayerResolutionSwitchReason} for details.
86
- * @order 8
87
- *
88
- */
89
- onResolutionSwitch?(player: VeLivePlayer, resolution: VeLivePlayerResolution, error: VeLivePlayerError, reason: VeLivePlayerResolutionSwitchReason): void;
90
-
91
- /** {en}
92
- * @detail callback
93
- * @brief Occurs when the video size changes.
94
- * @param player The player object that triggers the callback function.
95
- * @param width The updated width of the video, in pixels.
96
- * @param height The updated height of the video, in pixels.
97
- * @order 9
98
- *
99
- */
100
- onVideoSizeChanged?(player: VeLivePlayer, width: int, height: int): void;
101
-
102
- /** {en}
103
- * @detail callback
104
- * @brief String SEI message callback. This callback is triggered when the player SDK receives an SEI message. It is necessary to enable the `enableSei` property in `VeLivePlayerConfiguration`. When the `enableBinarySei` property is enabled, the string SEI message will no longer be sent.
105
- * @param player The player object that triggers the callback function.
106
- * @param message The SEI message.
107
- * @order 10
108
- *
109
- */
110
- onReceiveSeiMessage?(player: VeLivePlayer, message: String): void;
111
-
112
- /** {en}
113
- * @detail callback
114
- * @brief Binary SEI message callback. This callback is triggered when the player SDK receives an SEI message. It is necessary to enable the `enableBinarySei` property in `VeLivePlayerConfiguration`. When the `enableBinarySei` property is enabled, the string SEI message will no longer be sent.
115
- * @param player The player object that triggers the callback function.
116
- * @param message The SEI message.
117
- * @order 10
118
- *
119
- */
120
- onReceiveBinarySeiMessage?(player: VeLivePlayer, message: ArrayBuffer): void;
121
-
122
- /** {en}
123
- * @detail callback
124
- * @brief Occurs when the player switches between the primary stream and the backup stream.
125
- * @param player The player object that triggers the callback function.
126
- * @param streamType The type of the updated stream. For details, see VeLivePlayerStreamType{@link #VeLivePlayerStreamType}.
127
- * @param error The reason for the switch. For details, see VeLivePlayerError{@link #VeLivePlayerError}.
128
- * @order 11
129
- *
130
- */
131
- onMainBackupSwitch?(player: VeLivePlayer, streamType: VeLivePlayerStreamType, error: VeLivePlayerError): void;
132
-
133
- /** {en}
134
- * @detail callback
135
- * @brief Occurs when the playback status changes.
136
- * @param player The player object that triggers the callback function.
137
- * @param status The updated status of the player. See VeLivePlayerStatus{@link #VeLivePlayerStatus} for details.
138
- * @order 12
139
- *
140
- */
141
- onPlayerStatusUpdate?(player: VeLivePlayer, status: VeLivePlayerStatus): void;
142
-
143
- /** {en}
144
- * @detail callback
145
- * @brief Occurs periodically to report information such as the current pull stream address, bitrate, and frame rate.
146
- * @param player The player object that triggers the callback function.
147
- * @param statistics The playback statistics. For details, see VeLivePlayerStatistics{@link #VeLivePlayerStatistics}.
148
- * @order 13
149
- *
150
- */
151
- onStatistics?(player: VeLivePlayer, statistics: VeLivePlayerStatistics): void;
152
-
153
- /** {en}
154
- * @detail callback
155
- * @brief Occurs when a screenshot is taken after snapshot{@link #VeLivePlayer#snapshot} is called.
156
- * @param player The player object that triggers the callback function.
157
- * @param bitmap The Bitmap object of the screenshot.
158
- * @order 14
159
- *
160
- */
161
- onSnapshotComplete?(player: VeLivePlayer, bitmap: Bitmap): void;
162
-
163
- /** {en}
164
- * @detail callback
165
- * @brief Occurs when the player decodes a video frame. Call [enableVideoFrameObserver](docs-player-android-api-reference#VeLivePlayer-enablevideoframeobserver) to enable video frame callback.
166
- * @notes <br>
167
- * If you use the texture format for external rendering, we recommend that you render the video in the callback thread.
168
- * @order 15
169
- * @param player The player object that triggers the callback function.
170
- * @param videoFrame The video frame, including the pixel format, encapsulation format, width and height of the video, and other information. See VeLivePlayerVideoFrame{@link #VeLivePlayerVideoFrame} for details.
171
- *
172
- */
173
- onRenderVideoFrame?(player: VeLivePlayer, videoFrame: VeLivePlayerVideoFrame): void;
174
-
175
- /** {en}
176
- * @detail callback
177
- * @brief Occurs when the player decodes an audio frame. Call enableAudioFrameObserver{@link #VeLivePlayer#enableAudioFrameObserver} to enable audio frame callback.
178
- * @param player The player object that triggers the callback function.
179
- * @param audioFrame The audio frame. See VeLivePlayerAudioFrame{@link #VeLivePlayerAudioFrame} for details.
180
- * @notes <br>
181
- * The audio data returned by the callback is of type Float32 and in big-endian byte order.
182
- * @order 16
183
- *
184
- */
185
- onRenderAudioFrame?(player: VeLivePlayer, audioFrame: VeLivePlayerAudioFrame): void;
186
-
187
- /** {en}
188
- * @detail callback
189
- * @brief Occurs when the SDK fails to enable super resolution after setEnableSuperResolution{@link #VeLivePlayer#setEnableSuperResolution} is called.
190
- * @order 17
191
- * @param player The player object that triggers the callback function.
192
- * @param error The reason of the failure. See [VeLivePlayerErrorCode](docs-player-android-api-errorcode#VeLivePlayerErrorCode) for details.
193
- *
194
- */
195
- onStreamFailedOpenSuperResolution?(player: VeLivePlayer, error: VeLivePlayerError): void;
196
-
197
- /** {en}
198
- * @detail callback
199
- * @brief Occurs when the SDK fails to enable sharpen after [setEnableSuperResolution](docs-player-android-api-reference#VeLivePlayer-setenablesuperresolution) is called.
200
- * @param player The player object that triggers the callback function.
201
- * @param error The reason of the failure. See [VeLivePlayerErrorCode](docs-player-android-api-errorcode#VeLivePlayerErrorCode) for details.
202
- * @order 18
203
- *
204
- */
205
- onStreamFailedOpenSharpen?(player: VeLivePlayer, error: VeLivePlayerError): void;
206
- }