@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.
- package/android/build.gradle +1 -1
- package/ios/pictureInpicture/PictureInPictureManager.m +84 -7
- package/package.json +5 -5
- package/react-native-velive-pull.podspec +10 -3
- package/lib/commonjs/index.js +0 -14546
- package/lib/module/index.js +0 -14535
- package/lib/typescript/codegen/android/api.d.ts +0 -318
- package/lib/typescript/codegen/android/callback.d.ts +0 -206
- package/lib/typescript/codegen/android/errorcode.d.ts +0 -174
- package/lib/typescript/codegen/android/external.d.ts +0 -1
- package/lib/typescript/codegen/android/index.d.ts +0 -6
- package/lib/typescript/codegen/android/keytype.d.ts +0 -749
- package/lib/typescript/codegen/android/types.d.ts +0 -31
- package/lib/typescript/codegen/ios/api.d.ts +0 -295
- package/lib/typescript/codegen/ios/callback.d.ts +0 -176
- package/lib/typescript/codegen/ios/errorcode.d.ts +0 -160
- package/lib/typescript/codegen/ios/external.d.ts +0 -1
- package/lib/typescript/codegen/ios/index.d.ts +0 -6
- package/lib/typescript/codegen/ios/keytype.d.ts +0 -695
- package/lib/typescript/codegen/ios/types.d.ts +0 -46
- package/lib/typescript/codegen/pack/api.d.ts +0 -367
- package/lib/typescript/codegen/pack/callback.d.ts +0 -255
- package/lib/typescript/codegen/pack/errorcode.d.ts +0 -187
- package/lib/typescript/codegen/pack/external.d.ts +0 -1
- package/lib/typescript/codegen/pack/index.d.ts +0 -6
- package/lib/typescript/codegen/pack/keytype.d.ts +0 -909
- package/lib/typescript/codegen/pack/types.d.ts +0 -68
- package/lib/typescript/component.d.ts +0 -15
- package/lib/typescript/core/api.d.ts +0 -114
- package/lib/typescript/core/appState.d.ts +0 -3
- package/lib/typescript/core/callback.d.ts +0 -53
- package/lib/typescript/core/env.d.ts +0 -38
- package/lib/typescript/core/errorcode.d.ts +0 -1
- package/lib/typescript/core/index.d.ts +0 -6
- package/lib/typescript/core/keytype.d.ts +0 -33
- package/lib/typescript/core/player.d.ts +0 -16
- package/lib/typescript/index.d.ts +0 -2
- package/lib/typescript/platforms/android/extends.d.ts +0 -39
- package/lib/typescript/platforms/android/pictureInpicture.d.ts +0 -26
- package/lib/typescript/platforms/ios/extends.d.ts +0 -43
- package/lib/typescript/platforms/ios/pictureInpicture.d.ts +0 -32
- package/lib/typescript/runtime/index.d.ts +0 -1
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export type id<T = any> = T;
|
|
2
|
-
export type BOOL = boolean;
|
|
3
|
-
export type bool = boolean;
|
|
4
|
-
export type int = number;
|
|
5
|
-
export type long = number;
|
|
6
|
-
export type float = number;
|
|
7
|
-
export type int64_t = number;
|
|
8
|
-
export type double = number;
|
|
9
|
-
export type dispatch_queue_t = any;
|
|
10
|
-
export type NSString = string;
|
|
11
|
-
export type NSMutableString = string;
|
|
12
|
-
export type NSInteger = number;
|
|
13
|
-
export type NSUInteger = number;
|
|
14
|
-
export type NSNumber = number;
|
|
15
|
-
export type NSValue = number;
|
|
16
|
-
export type NSNull = null;
|
|
17
|
-
export type NSArray<T = any> = Array<T>;
|
|
18
|
-
export type NSMutableArray<T = any> = Array<T>;
|
|
19
|
-
export type NSObject<T = any> = T;
|
|
20
|
-
export type NSDictionary<K extends keyof any = any, V = any> = {
|
|
21
|
-
[P in K]: V;
|
|
22
|
-
};
|
|
23
|
-
export type NSMutableDictionary = Object;
|
|
24
|
-
export type NSDate = Date;
|
|
25
|
-
export type NSData = ArrayBuffer;
|
|
26
|
-
export type NSURL = string;
|
|
27
|
-
export type NSError = {
|
|
28
|
-
code: number;
|
|
29
|
-
domain: string;
|
|
30
|
-
};
|
|
31
|
-
export type NSTimeInterval = number;
|
|
32
|
-
export type UIImage = unknown;
|
|
33
|
-
export type CVPixelBufferRef = any;
|
|
34
|
-
export type CMSampleBufferRef = any;
|
|
35
|
-
export type CMTime = number;
|
|
36
|
-
export type GLuint = number;
|
|
37
|
-
export type CGFloat = number;
|
|
38
|
-
export type SInt64 = number;
|
|
39
|
-
export type intptr_t = any;
|
|
40
|
-
export type uint32_t = number;
|
|
41
|
-
export type uint8_t = number;
|
|
42
|
-
export type longlong = number;
|
|
43
|
-
export type CGPoint = any;
|
|
44
|
-
export type CGRect = any;
|
|
45
|
-
export type CGSize = any;
|
|
46
|
-
export type EAGLContext = any;
|
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
import * as $p_a from '../android/index';
|
|
2
|
-
import * as $p_i from '../ios/index';
|
|
3
|
-
import { VeLivePlayerResolution, VeLivePlayerFillMode, VeLivePlayerPixelFormat, VeLivePlayerVideoBufferType, VeLivePlayerAudioBufferType, VeLivePlayerRotation, VeLivePlayerMirror, VeLivePlayerLogLevel, VeLivePlayerConfiguration, VeLivePlayerStreamData } from './keytype';
|
|
4
|
-
import { VeLivePlayerObserver } from './callback';
|
|
5
|
-
import { Map, type String, List } from './types';
|
|
6
|
-
import { ApplicationContext } from './external';
|
|
7
|
-
|
|
8
|
-
export declare class VeLivePlayer {
|
|
9
|
-
|
|
10
|
-
/** {en}
|
|
11
|
-
* @detail api
|
|
12
|
-
* @brief Gets the version number of the Player SDK.
|
|
13
|
-
* @return <br>
|
|
14
|
-
* The version number of the Player SDK.
|
|
15
|
-
* @order 4
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
static getVersion(): string;
|
|
19
|
-
|
|
20
|
-
/** {en}
|
|
21
|
-
* @detail api
|
|
22
|
-
* @brief Sets the level of the output log.
|
|
23
|
-
* @param logLevel The level of the output log. For details, see VeLivePlayerLogLevel{@link #VeLivePlayerLogLevel}.
|
|
24
|
-
* @order 5
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
static setLogLevel(logLevel: VeLivePlayerLogLevel): void;
|
|
28
|
-
constructor(context: ApplicationContext);
|
|
29
|
-
constructor();
|
|
30
|
-
protected _instance: any;
|
|
31
|
-
|
|
32
|
-
/** {en}
|
|
33
|
-
* @platform ios
|
|
34
|
-
* @detail keytype
|
|
35
|
-
* @brief The player observer.
|
|
36
|
-
*/
|
|
37
|
-
get observer(): $p_i.id<$p_i.VeLivePlayerObserver>;
|
|
38
|
-
set observer(value: $p_i.id<$p_i.VeLivePlayerObserver>);
|
|
39
|
-
|
|
40
|
-
/** {en}
|
|
41
|
-
* @platform ios
|
|
42
|
-
* @detail keytype
|
|
43
|
-
* @brief The view used by the player to render video. Add `playerView` to the view hierarchy of your app to display the video content.
|
|
44
|
-
*/
|
|
45
|
-
get playerView(): $p_i.UIView;
|
|
46
|
-
set playerView(value: $p_i.UIView);
|
|
47
|
-
|
|
48
|
-
/** {en}
|
|
49
|
-
* @platform ios
|
|
50
|
-
* @detail keytype
|
|
51
|
-
* @brief The player volume. The default value is `1.0`. The value range is [0.0, 1.0].
|
|
52
|
-
*/
|
|
53
|
-
get volume(): $p_i.float;
|
|
54
|
-
set volume(value: $p_i.float);
|
|
55
|
-
protected __init(...args: any[]): void;
|
|
56
|
-
protected __new_instance(...args: any[]): any;
|
|
57
|
-
|
|
58
|
-
/** {en}
|
|
59
|
-
* @detail api
|
|
60
|
-
* @brief Sets the player volume.
|
|
61
|
-
* @param volume The volume. The default value is `1.0`. The value range is [0.0, 1.0].
|
|
62
|
-
* @order 8
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
setPlayerVolume(volume: number): void;
|
|
66
|
-
|
|
67
|
-
/** {en}
|
|
68
|
-
* @detail api
|
|
69
|
-
* @brief Changes the video resolution.
|
|
70
|
-
* @notes - Call [setPlayStreamData](#VeLivePlayer-setplaystreamdata) to set multiple resolutions before calling this method.
|
|
71
|
-
* - 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.
|
|
72
|
-
* @order 8
|
|
73
|
-
* @param resolution The video resolution. For details, refer to VeLivePlayerResolution
|
|
74
|
-
* @return <br>
|
|
75
|
-
* - true: Success;
|
|
76
|
-
* - false: Failure.
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
switchResolution(resolution: VeLivePlayerResolution): void;
|
|
80
|
-
|
|
81
|
-
/** {en}
|
|
82
|
-
* @detail api
|
|
83
|
-
* @brief Initializes the player and configures whether to turn on SEI messaging, hardware decoding, local DNS prefetch, and other configurations.
|
|
84
|
-
* @notes <br>Call this method to initialize the player before calling [play](#VeLivePlayer-play) .
|
|
85
|
-
* @order 1
|
|
86
|
-
* @param config Player configurations. Refer to VeLivePlayerConfiguration{@link #VeLivePlayerConfiguration} for details.
|
|
87
|
-
*
|
|
88
|
-
*/
|
|
89
|
-
setConfig(config: VeLivePlayerConfiguration): void;
|
|
90
|
-
|
|
91
|
-
/** {en}
|
|
92
|
-
* @detail api
|
|
93
|
-
* @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.
|
|
94
|
-
* @notes
|
|
95
|
-
* Call this method before calling [play](#VeLivePlayer-play).
|
|
96
|
-
* @param observer The player observer. See VeLivePlayerObserver{@link #VeLivePlayerObserver} for details.
|
|
97
|
-
* @order 2
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
setObserver(observer: VeLivePlayerObserver): void;
|
|
101
|
-
|
|
102
|
-
/** {en}
|
|
103
|
-
* @detail api
|
|
104
|
-
* @brief Sets the fill mode of the player screen.
|
|
105
|
-
* @notes <br>
|
|
106
|
-
* - Call this method before calling [play](#VeLivePlayer-play) to set the initial fill mode of the player.
|
|
107
|
-
* - You can call this method during playback to dynamically adjust the fill mode.
|
|
108
|
-
* @order 3
|
|
109
|
-
* @param fillMode The fill mode of SurfaceView. The default value is `VeLivePlayerFillModeAspectFill`. For details, see VeLivePlayerFillMode{@link #VeLivePlayerFillMode}.
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
setRenderFillMode(fillMode: VeLivePlayerFillMode): Promise<void>;
|
|
113
|
-
|
|
114
|
-
/** {en}
|
|
115
|
-
* @platform android
|
|
116
|
-
* @detail api
|
|
117
|
-
* @brief Sets the `SurfaceHolder` object for video rendering and playback. Use this method if you use `SurfaceView` for playback.
|
|
118
|
-
* @notes
|
|
119
|
-
* If you call both setSurfaceHolder and [setSurface](#VeLivePlayer-setsurface) to set the `Surface` object, the player will prioritize the configurations of `surfaceHolder`.
|
|
120
|
-
* @param surfaceHolder The `SurfaceHolder` object.
|
|
121
|
-
* @order 6
|
|
122
|
-
*
|
|
123
|
-
*/
|
|
124
|
-
android_setSurfaceHolder(surfaceHolder: $p_a.SurfaceHolder): void;
|
|
125
|
-
|
|
126
|
-
/** {en}
|
|
127
|
-
* @platform android
|
|
128
|
-
* @detail api
|
|
129
|
-
* @brief Sets the `Surface` object for video rendering and playback. Use this method if you use `SurfaceView` or `TextureView` for playback.
|
|
130
|
-
* @notes
|
|
131
|
-
* If you call both [setSurfaceHolder](#VeLivePlayer-setsurfaceholder) and `setSurface` to set the `Surface` object, the player will prioritize the configurations of `surfaceHolder`.
|
|
132
|
-
* @param surface The `Surface` object.
|
|
133
|
-
* @order 7
|
|
134
|
-
*
|
|
135
|
-
*/
|
|
136
|
-
android_setSurface(surface: $p_a.Surface): void;
|
|
137
|
-
|
|
138
|
-
/** {en}
|
|
139
|
-
* @detail api
|
|
140
|
-
* @brief Sets a pull stream address.
|
|
141
|
-
* @notes <br>Call this method before calling play.
|
|
142
|
-
* @order 8
|
|
143
|
-
* @param url The pull stream address.
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
146
|
-
setPlayUrl(url: string): void;
|
|
147
|
-
|
|
148
|
-
/** {en}
|
|
149
|
-
* @detail api
|
|
150
|
-
* @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.
|
|
151
|
-
* @notes <br>Call this method before calling play.
|
|
152
|
-
* @order 8
|
|
153
|
-
* @param streamData Configurations for multiple pull stream addresses. For details, see [VeLivePlayerStreamData](player-android-api-keytype#VeLivePlayerStreamData).
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
setPlayStreamData(streamData: VeLivePlayerStreamData): void;
|
|
157
|
-
|
|
158
|
-
/** {en}
|
|
159
|
-
* @detail api
|
|
160
|
-
* @brief Starts or resumes playback.
|
|
161
|
-
* @notes
|
|
162
|
-
* 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.
|
|
163
|
-
* @order 8
|
|
164
|
-
*
|
|
165
|
-
*/
|
|
166
|
-
play(): Promise<void>;
|
|
167
|
-
|
|
168
|
-
/** {en}
|
|
169
|
-
* @detail api
|
|
170
|
-
* @brief Pauses playback.
|
|
171
|
-
* @notes
|
|
172
|
-
* When playback is paused after you call this method, the [onPlayerStatusUpdate](docs-player-android-api-callback#VeLivePlayerObserver-onplayerstatusupdate) callback is triggered.
|
|
173
|
-
* @order 8
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
pause(): Promise<void>;
|
|
177
|
-
|
|
178
|
-
/** {en}
|
|
179
|
-
* @detail api
|
|
180
|
-
* @brief Stops playback. This method does not destroy the player.
|
|
181
|
-
* @notes
|
|
182
|
-
* When playback stops after you call this method, the [onPlayerStatusUpdate](docs-player-android-api-callback#VeLivePlayerObserver-onplayerstatusupdate) callback is triggered.
|
|
183
|
-
* @order 8
|
|
184
|
-
*
|
|
185
|
-
*/
|
|
186
|
-
stop(): Promise<void>;
|
|
187
|
-
|
|
188
|
-
/** {en}
|
|
189
|
-
* @detail api
|
|
190
|
-
* @brief Stops playback and destroys the player.
|
|
191
|
-
* @order 8
|
|
192
|
-
*
|
|
193
|
-
*/
|
|
194
|
-
destroy(): void;
|
|
195
|
-
|
|
196
|
-
/** {en}
|
|
197
|
-
* @detail api
|
|
198
|
-
* @brief Checks whether the player is playing.
|
|
199
|
-
* @return Whether the player is playing. <br>
|
|
200
|
-
* - true: The player is playing;
|
|
201
|
-
* - false: The player is not playing.
|
|
202
|
-
* @order 8
|
|
203
|
-
*
|
|
204
|
-
*/
|
|
205
|
-
isPlaying(): boolean;
|
|
206
|
-
|
|
207
|
-
/** {en}
|
|
208
|
-
* @detail api
|
|
209
|
-
* @brief Sets whether to mute playback.
|
|
210
|
-
* @param mute Whether to mute playback. The default value is `false`. <br>
|
|
211
|
-
* - true: Mute;
|
|
212
|
-
* - false: Do not mute.
|
|
213
|
-
* @order 9
|
|
214
|
-
*
|
|
215
|
-
*/
|
|
216
|
-
setMute(mute: boolean): void;
|
|
217
|
-
|
|
218
|
-
/** {en}
|
|
219
|
-
* @detail api
|
|
220
|
-
* @brief Checks whether playback is muted.
|
|
221
|
-
* @return Whether playback is muted. <br>
|
|
222
|
-
* - true: Muted;
|
|
223
|
-
* - false: Not muted.
|
|
224
|
-
* @order 10
|
|
225
|
-
*
|
|
226
|
-
*/
|
|
227
|
-
isMute(): boolean;
|
|
228
|
-
|
|
229
|
-
/** {en}
|
|
230
|
-
* @detail api
|
|
231
|
-
* @brief Sets the mapping of domain names to server IP addresses.
|
|
232
|
-
* @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.
|
|
233
|
-
* @order 11
|
|
234
|
-
* @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.
|
|
235
|
-
* - Call this method to set the mapping of domain names and IP addresses before calling [play](#VeLivePlayer-play) to start playback.
|
|
236
|
-
*
|
|
237
|
-
*/
|
|
238
|
-
setUrlHostIP(hostIpMap: Map<String, List<String>>): void;
|
|
239
|
-
|
|
240
|
-
/** {en}
|
|
241
|
-
* @detail api
|
|
242
|
-
* @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.
|
|
243
|
-
* @param key The parameter name of the advanced setting.
|
|
244
|
-
* @param value The parameter value of the advanced setting.
|
|
245
|
-
* @order 12
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
setProperty(key: string, value: Object): void;
|
|
249
|
-
|
|
250
|
-
/** {en}
|
|
251
|
-
* @detail api
|
|
252
|
-
* @brief Takes a screenshot of the video.
|
|
253
|
-
* @notes
|
|
254
|
-
* - This method only takes effect during playback.
|
|
255
|
-
* - 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.
|
|
256
|
-
* @order 13
|
|
257
|
-
* @return
|
|
258
|
-
* - 0: Screenshot capturing is allowed.
|
|
259
|
-
* - [VeLivePlayerErrorRefused](docs-player-android-api-errorcode#VeLivePlayerErrorCode-veliveplayererrorrefused) : Screenshot capturing is not allowed.
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
snapshot(): number;
|
|
263
|
-
|
|
264
|
-
/** {en}
|
|
265
|
-
* @detail api
|
|
266
|
-
* @brief Sets the video frame observer.
|
|
267
|
-
* @param enable Whether to enable the video frame callback. The default value is `false`. <br>
|
|
268
|
-
* - true: Enable;
|
|
269
|
-
* - false: Disable.
|
|
270
|
-
* @param pixelFormat The pixel format of the video frame in the callback. See VeLivePlayerPixelFormat{@link #VeLivePlayerPixelFormat} for details.
|
|
271
|
-
* @param bufferType The encapsulation format of the video data in the callback. For details, see VeLivePlayerVideoBufferType{@link #VeLivePlayerVideoBufferType}.
|
|
272
|
-
* @notes
|
|
273
|
-
* - You can call this method to subscribe to decoded video data for external rendering.
|
|
274
|
-
* - 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.
|
|
275
|
-
* - If you use external rendering, you need to make sure the video and audio are synchronized.
|
|
276
|
-
* @order 14
|
|
277
|
-
*
|
|
278
|
-
*/
|
|
279
|
-
enableVideoFrameObserver(enable: boolean, pixelFormat: VeLivePlayerPixelFormat, bufferType: VeLivePlayerVideoBufferType): void;
|
|
280
|
-
|
|
281
|
-
/** {en}
|
|
282
|
-
* @detail api
|
|
283
|
-
* @brief Sets the audio frame observer.
|
|
284
|
-
* @notes
|
|
285
|
-
* - You can call this method to subscribe to decoded audio data if you want to use external rendering.
|
|
286
|
-
* - 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.
|
|
287
|
-
* - If you use external rendering, you need to make sure the video and audio are synchronized.
|
|
288
|
-
* @order 15
|
|
289
|
-
*
|
|
290
|
-
* @param enable Whether to enable the audio frame callback. The default value is `false`. <br>
|
|
291
|
-
* - true: Enable;
|
|
292
|
-
* - false: Disable.
|
|
293
|
-
* @param enableRendering Whether to enable player rendering. The default value is `false`. <br>
|
|
294
|
-
* - true: Enable;
|
|
295
|
-
* - false: Disable.
|
|
296
|
-
* @param bufferType Audio buffer type. For details, please refer to [VeLivePlayerAudioBufferType](docs-player-android-api-keytype#VeLivePlayerAudioBufferType).
|
|
297
|
-
*
|
|
298
|
-
*/
|
|
299
|
-
enableAudioFrameObserver(enable: boolean, enableRendering: boolean, bufferType: VeLivePlayerAudioBufferType): void;
|
|
300
|
-
|
|
301
|
-
/** {en}
|
|
302
|
-
* @detail api
|
|
303
|
-
* @brief Sets the clockwise rotation angle of the video.
|
|
304
|
-
* @param rotation The clockwise rotation angle of the video. Rotation is disabled by default. See VeLivePlayerRotation{@link #VeLivePlayerRotation} for details.
|
|
305
|
-
* @notes <br>
|
|
306
|
-
* - You can change the rotation angle before and during playback.
|
|
307
|
-
* - Each time this method is called, the player rotates the video based on the original video.
|
|
308
|
-
* - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it.
|
|
309
|
-
* @order 16
|
|
310
|
-
*
|
|
311
|
-
*/
|
|
312
|
-
setRenderRotation(rotation: VeLivePlayerRotation): Promise<void>;
|
|
313
|
-
|
|
314
|
-
/** {en}
|
|
315
|
-
* @detail api
|
|
316
|
-
* @brief Configures mirroring settings.
|
|
317
|
-
* @param mirror Mirroring settings. Mirroring is disabled by default. See VeLivePlayerMirror{@link #VeLivePlayerMirror} for details.
|
|
318
|
-
* @notes <br>
|
|
319
|
-
* - You can change the mirroring settings before and during playback.
|
|
320
|
-
* - Each time this method is called, the player applies the mirroring settings to the original video.
|
|
321
|
-
* - When you apply both rotation and mirroring to the video, the player will mirror the video and then rotate it.
|
|
322
|
-
* @order 17
|
|
323
|
-
*
|
|
324
|
-
*/
|
|
325
|
-
setRenderMirror(mirror: VeLivePlayerMirror): Promise<void>;
|
|
326
|
-
|
|
327
|
-
/** {en}
|
|
328
|
-
* @detail api
|
|
329
|
-
* @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.
|
|
330
|
-
* @param enable Whether to enable super resolution. The default value is false.
|
|
331
|
-
* - true: enable;
|
|
332
|
-
* - false: disable.
|
|
333
|
-
* @notes
|
|
334
|
-
* - Call this method after receiving the [onFirstVideoFrameRender](docs-player-android-api-callback#VeLivePlayerObserver-onfirstvideoframerender) callback, or during playback.
|
|
335
|
-
* - Support dynamically enabling and disabling super-resolution by calling this interface during playback.
|
|
336
|
-
* - 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.
|
|
337
|
-
* @order 18
|
|
338
|
-
*
|
|
339
|
-
*/
|
|
340
|
-
setEnableSuperResolution(enable: boolean): void;
|
|
341
|
-
|
|
342
|
-
/** {en}
|
|
343
|
-
* @platform android
|
|
344
|
-
* @brief Set whether to enable video sharpening.
|
|
345
|
-
* @param enable Set whether to enable video sharpening. The default value is `false`.
|
|
346
|
-
* - true: Enable;
|
|
347
|
-
* - false: Disable.
|
|
348
|
-
*
|
|
349
|
-
*/
|
|
350
|
-
android_setEnableSharpen(enable: boolean): void;
|
|
351
|
-
|
|
352
|
-
/** {en}
|
|
353
|
-
* @platform ios
|
|
354
|
-
* @brief Initializes the specified type of player.
|
|
355
|
-
* @param type The player type. Refer to [VeLivePlayerType](docs-player-sdk-for-ios-type-definition#VeLivePlayerType) for details.
|
|
356
|
-
*/
|
|
357
|
-
ios_initWithType(type: $p_i.VeLivePlayerType): this;
|
|
358
|
-
|
|
359
|
-
/** {en}
|
|
360
|
-
* @platform ios
|
|
361
|
-
* @brief Check whether the player currently supports the specified resolution level.
|
|
362
|
-
* @param resolution Resolution levels. For details, please refer to [VeLivePlayerResolution](docs-player-sdk-for-ios-type-definition#VeLivePlayerResolution).
|
|
363
|
-
* @return - 0: Supported;
|
|
364
|
-
* - Others: Not supported. For details of other return values, please refer to [VeLivePlayerSupportResolutionSwitchError](docs-player-sdk-for-ios-type-definition#VeLivePlayerSupportResolutionSwitchError).
|
|
365
|
-
*/
|
|
366
|
-
ios_isSupportResolutionSwitch(resolution: $p_i.VeLivePlayerResolution): number;
|
|
367
|
-
}
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import * as $p_a from '../android/index';
|
|
2
|
-
import * as $p_i from '../ios/index';
|
|
3
|
-
import { VeLivePlayerResolution, VeLivePlayerResolutionSwitchReason, VeLivePlayerStreamType, VeLivePlayerStatus, VeLivePlayerStatistics, VeLivePlayerVideoFrame, VeLivePlayerAudioFrame } from './keytype';
|
|
4
|
-
import { VeLivePlayer } from './api';
|
|
5
|
-
import { VeLivePlayerError } from './errorcode';
|
|
6
|
-
import { Bitmap, int, BOOL, NSString } from './types';
|
|
7
|
-
|
|
8
|
-
export interface VeLivePlayerObserver {
|
|
9
|
-
|
|
10
|
-
/** {en}
|
|
11
|
-
* @detail callback
|
|
12
|
-
* @brief Occurs when a player error occurs.
|
|
13
|
-
* @param player The player object that triggers the callback function.
|
|
14
|
-
* @param error The error message. Refer to VeLivePlayerError{@link #VeLivePlayerError} for details.
|
|
15
|
-
* @order 1
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
onError?(player: VeLivePlayer, error: VeLivePlayerError): void;
|
|
19
|
-
|
|
20
|
-
/** {en}
|
|
21
|
-
* @detail callback
|
|
22
|
-
* @brief Occurs when the first video frame is rendered at the beginning of playback or after a retry during playback.
|
|
23
|
-
* @param player The player object that triggers the callback function.
|
|
24
|
-
* @param isFirstFrame Whether the video frame is the first video frame rendered at the beginning of playback. <br>
|
|
25
|
-
* - true: The video frame is the first video frame rendered at the beginning of playback;
|
|
26
|
-
* - false: The video frame is the first video frame rendered after a retry during playback.
|
|
27
|
-
* @order 2
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
onFirstVideoFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
|
|
31
|
-
|
|
32
|
-
/** {en}
|
|
33
|
-
* @detail callback
|
|
34
|
-
* @brief Occurs when the first audio frame is rendered at the beginning of playback or after a retry during playback.
|
|
35
|
-
* @param player The player object that triggers the callback function.
|
|
36
|
-
* @param isFirstFrame Whether the audio frame is the first audio frame rendered at the beginning of playback. <br>
|
|
37
|
-
* - true: The audio frame is the first audio frame rendered at the beginning of playback;
|
|
38
|
-
* - false: The audio frame is the first audio frame rendered after a retry during playback.
|
|
39
|
-
* @order 3
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
onFirstAudioFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
|
|
43
|
-
|
|
44
|
-
/** {en}
|
|
45
|
-
* @detail callback
|
|
46
|
-
* @brief Occurs when a playback stutter starts.
|
|
47
|
-
* @param player The player object that triggers the callback function.
|
|
48
|
-
* @order 4
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
onStallStart?(player: VeLivePlayer): void;
|
|
52
|
-
|
|
53
|
-
/** {en}
|
|
54
|
-
* @detail callback
|
|
55
|
-
* @brief Occurs when a playback stutter stops, that is, when playback resumes after there is enough audio buffer.
|
|
56
|
-
* @param player The player object that triggers the callback function.
|
|
57
|
-
* @order 5
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
onStallEnd?(player: VeLivePlayer): void;
|
|
61
|
-
|
|
62
|
-
/** {en}
|
|
63
|
-
* @detail callback
|
|
64
|
-
* @brief Occurs when video rendering stutters.
|
|
65
|
-
* @param player The player object that triggers the callback function.
|
|
66
|
-
* @param stallTime The stutter duration, in milliseconds.
|
|
67
|
-
* @order 6
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
onVideoRenderStall?(player: VeLivePlayer, stallTime: number): void;
|
|
71
|
-
|
|
72
|
-
/** {en}
|
|
73
|
-
* @detail callback
|
|
74
|
-
* @brief Occurs when audio rendering stutters.
|
|
75
|
-
* @param player The player object that triggers the callback function.
|
|
76
|
-
* @param stallTime The stutter duration, in milliseconds.
|
|
77
|
-
* @order 7
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
onAudioRenderStall?(player: VeLivePlayer, stallTime: number): void;
|
|
81
|
-
|
|
82
|
-
/** {en}
|
|
83
|
-
* @detail callback
|
|
84
|
-
* @brief Occurs when the video resolution changes.
|
|
85
|
-
* @param player The player object that triggers the callback function.
|
|
86
|
-
* @param resolution The updated resolution. See [VeLivePlayerResolution](docs-player-android-api-keytype#VeLivePlayerResolution) for details.
|
|
87
|
-
* @param error Whether an error occurred during resolution switching. See VeLivePlayerError{@link #VeLivePlayerError} for details.
|
|
88
|
-
* @param reason The reason for resolution switching. See VeLivePlayerResolutionSwitchReason{@link #VeLivePlayerResolutionSwitchReason} for details.
|
|
89
|
-
* @order 8
|
|
90
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
onResolutionSwitch?(player: VeLivePlayer, resolution: VeLivePlayerResolution, error: VeLivePlayerError, reason: VeLivePlayerResolutionSwitchReason): void;
|
|
93
|
-
|
|
94
|
-
/** {en}
|
|
95
|
-
* @detail callback
|
|
96
|
-
* @brief Occurs when the video size changes.
|
|
97
|
-
* @param player The player object that triggers the callback function.
|
|
98
|
-
* @param width The updated width of the video, in pixels.
|
|
99
|
-
* @param height The updated height of the video, in pixels.
|
|
100
|
-
* @order 9
|
|
101
|
-
*
|
|
102
|
-
*/
|
|
103
|
-
onVideoSizeChanged?(player: VeLivePlayer, width: number, height: number): void;
|
|
104
|
-
|
|
105
|
-
/** {en}
|
|
106
|
-
* @detail callback
|
|
107
|
-
* @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.
|
|
108
|
-
* @param player The player object that triggers the callback function.
|
|
109
|
-
* @param message The SEI message.
|
|
110
|
-
* @order 10
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
onReceiveSeiMessage?(player: VeLivePlayer, message: string): void;
|
|
114
|
-
|
|
115
|
-
/** {en}
|
|
116
|
-
* @detail callback
|
|
117
|
-
* @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.
|
|
118
|
-
* @param player The player object that triggers the callback function.
|
|
119
|
-
* @param message The SEI message.
|
|
120
|
-
* @order 10
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
onReceiveBinarySeiMessage?(player: VeLivePlayer, message: ArrayBuffer): void;
|
|
124
|
-
|
|
125
|
-
/** {en}
|
|
126
|
-
* @detail callback
|
|
127
|
-
* @brief Occurs when the player switches between the primary stream and the backup stream.
|
|
128
|
-
* @param player The player object that triggers the callback function.
|
|
129
|
-
* @param streamType The type of the updated stream. For details, see VeLivePlayerStreamType{@link #VeLivePlayerStreamType}.
|
|
130
|
-
* @param error The reason for the switch. For details, see VeLivePlayerError{@link #VeLivePlayerError}.
|
|
131
|
-
* @order 11
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
onMainBackupSwitch?(player: VeLivePlayer, streamType: VeLivePlayerStreamType, error: VeLivePlayerError): void;
|
|
135
|
-
|
|
136
|
-
/** {en}
|
|
137
|
-
* @detail callback
|
|
138
|
-
* @brief Occurs when the playback status changes.
|
|
139
|
-
* @param player The player object that triggers the callback function.
|
|
140
|
-
* @param status The updated status of the player. See VeLivePlayerStatus{@link #VeLivePlayerStatus} for details.
|
|
141
|
-
* @order 12
|
|
142
|
-
*
|
|
143
|
-
*/
|
|
144
|
-
onPlayerStatusUpdate?(player: VeLivePlayer, status: VeLivePlayerStatus): void;
|
|
145
|
-
|
|
146
|
-
/** {en}
|
|
147
|
-
* @detail callback
|
|
148
|
-
* @brief Occurs periodically to report information such as the current pull stream address, bitrate, and frame rate.
|
|
149
|
-
* @param player The player object that triggers the callback function.
|
|
150
|
-
* @param statistics The playback statistics. For details, see VeLivePlayerStatistics{@link #VeLivePlayerStatistics}.
|
|
151
|
-
* @order 13
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
onStatistics?(player: VeLivePlayer, statistics: VeLivePlayerStatistics): void;
|
|
155
|
-
|
|
156
|
-
/** {en}
|
|
157
|
-
* @detail callback
|
|
158
|
-
* @brief Occurs when a screenshot is taken after snapshot{@link #VeLivePlayer#snapshot} is called.
|
|
159
|
-
* @param player The player object that triggers the callback function.
|
|
160
|
-
* @param bitmap The Bitmap object of the screenshot.
|
|
161
|
-
* @order 14
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
onSnapshotComplete?(player: VeLivePlayer, bitmap: Bitmap): void;
|
|
165
|
-
|
|
166
|
-
/** {en}
|
|
167
|
-
* @detail callback
|
|
168
|
-
* @brief Occurs when the player decodes a video frame. Call [enableVideoFrameObserver](docs-player-android-api-reference#VeLivePlayer-enablevideoframeobserver) to enable video frame callback.
|
|
169
|
-
* @notes <br>
|
|
170
|
-
* If you use the texture format for external rendering, we recommend that you render the video in the callback thread.
|
|
171
|
-
* @order 15
|
|
172
|
-
* @param player The player object that triggers the callback function.
|
|
173
|
-
* @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.
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
onRenderVideoFrame?(player: VeLivePlayer, videoFrame: VeLivePlayerVideoFrame): void;
|
|
177
|
-
|
|
178
|
-
/** {en}
|
|
179
|
-
* @detail callback
|
|
180
|
-
* @brief Occurs when the player decodes an audio frame. Call enableAudioFrameObserver{@link #VeLivePlayer#enableAudioFrameObserver} to enable audio frame callback.
|
|
181
|
-
* @param player The player object that triggers the callback function.
|
|
182
|
-
* @param audioFrame The audio frame. See VeLivePlayerAudioFrame{@link #VeLivePlayerAudioFrame} for details.
|
|
183
|
-
* @notes <br>
|
|
184
|
-
* The audio data returned by the callback is of type Float32 and in big-endian byte order.
|
|
185
|
-
* @order 16
|
|
186
|
-
*
|
|
187
|
-
*/
|
|
188
|
-
onRenderAudioFrame?(player: VeLivePlayer, audioFrame: VeLivePlayerAudioFrame): void;
|
|
189
|
-
|
|
190
|
-
/** {en}
|
|
191
|
-
* @detail callback
|
|
192
|
-
* @brief Occurs when the SDK fails to enable super resolution after setEnableSuperResolution{@link #VeLivePlayer#setEnableSuperResolution} is called.
|
|
193
|
-
* @order 17
|
|
194
|
-
* @param player The player object that triggers the callback function.
|
|
195
|
-
* @param error The reason of the failure. See [VeLivePlayerErrorCode](docs-player-android-api-errorcode#VeLivePlayerErrorCode) for details.
|
|
196
|
-
*
|
|
197
|
-
*/
|
|
198
|
-
onStreamFailedOpenSuperResolution?(player: VeLivePlayer, error: VeLivePlayerError): void;
|
|
199
|
-
|
|
200
|
-
/** {en}
|
|
201
|
-
* @platform android
|
|
202
|
-
* @detail callback
|
|
203
|
-
* @brief Occurs when the SDK fails to enable sharpen after [setEnableSuperResolution](docs-player-android-api-reference#VeLivePlayer-setenablesuperresolution) is called.
|
|
204
|
-
* @param player The player object that triggers the callback function.
|
|
205
|
-
* @param error The reason of the failure. See [VeLivePlayerErrorCode](docs-player-android-api-errorcode#VeLivePlayerErrorCode) for details.
|
|
206
|
-
* @order 18
|
|
207
|
-
*
|
|
208
|
-
*/
|
|
209
|
-
onStreamFailedOpenSharpen?(): void;
|
|
210
|
-
}
|
|
211
|
-
export declare class android_VeLivePlayerObserver extends $p_a.VeLivePlayerObserver {
|
|
212
|
-
protected _instance: VeLivePlayerObserver;
|
|
213
|
-
constructor(_instance: VeLivePlayerObserver);
|
|
214
|
-
onError(player: $p_a.VeLivePlayer, error: $p_a.VeLivePlayerError): void;
|
|
215
|
-
onFirstVideoFrameRender(player: $p_a.VeLivePlayer, isFirstFrame: boolean): void;
|
|
216
|
-
onFirstAudioFrameRender(player: $p_a.VeLivePlayer, isFirstFrame: boolean): void;
|
|
217
|
-
onStallStart(player: $p_a.VeLivePlayer): void;
|
|
218
|
-
onStallEnd(player: $p_a.VeLivePlayer): void;
|
|
219
|
-
onVideoRenderStall(player: $p_a.VeLivePlayer, stallTime: int): void;
|
|
220
|
-
onAudioRenderStall(player: $p_a.VeLivePlayer, stallTime: int): void;
|
|
221
|
-
onResolutionSwitch(player: $p_a.VeLivePlayer, resolution: $p_a.VeLivePlayerResolution, error: $p_a.VeLivePlayerError, reason: $p_a.VeLivePlayerResolutionSwitchReason): void;
|
|
222
|
-
onVideoSizeChanged(player: $p_a.VeLivePlayer, width: int, height: int): void;
|
|
223
|
-
onReceiveSeiMessage(player: $p_a.VeLivePlayer, message: string): void;
|
|
224
|
-
onReceiveBinarySeiMessage(player: $p_a.VeLivePlayer, message: ArrayBuffer): void;
|
|
225
|
-
onMainBackupSwitch(player: $p_a.VeLivePlayer, streamType: $p_a.VeLivePlayerStreamType, error: $p_a.VeLivePlayerError): void;
|
|
226
|
-
onPlayerStatusUpdate(player: $p_a.VeLivePlayer, status: $p_a.VeLivePlayerStatus): void;
|
|
227
|
-
onStatistics(player: $p_a.VeLivePlayer, statistics: $p_a.VeLivePlayerStatistics): void;
|
|
228
|
-
onSnapshotComplete(player: $p_a.VeLivePlayer, bitmap: $p_a.Bitmap): void;
|
|
229
|
-
onRenderVideoFrame(player: $p_a.VeLivePlayer, videoFrame: $p_a.VeLivePlayerVideoFrame): void;
|
|
230
|
-
onRenderAudioFrame(player: $p_a.VeLivePlayer, audioFrame: $p_a.VeLivePlayerAudioFrame): void;
|
|
231
|
-
onStreamFailedOpenSuperResolution(player: $p_a.VeLivePlayer, error: $p_a.VeLivePlayerError): void;
|
|
232
|
-
onStreamFailedOpenSharpen(player: $p_a.VeLivePlayer, error: $p_a.VeLivePlayerError): void;
|
|
233
|
-
}
|
|
234
|
-
export declare class ios_VeLivePlayerObserver extends $p_i.VeLivePlayerObserver {
|
|
235
|
-
protected _instance: VeLivePlayerObserver;
|
|
236
|
-
constructor(_instance: VeLivePlayerObserver);
|
|
237
|
-
onError$error(player: $p_i.TVLManager, error: $p_i.VeLivePlayerError): void;
|
|
238
|
-
onFirstVideoFrameRender$isFirstFrame(player: $p_i.TVLManager, isFirstFrame: BOOL): void;
|
|
239
|
-
onFirstAudioFrameRender$isFirstFrame(player: $p_i.TVLManager, isFirstFrame: BOOL): void;
|
|
240
|
-
onStallStart(player: $p_i.TVLManager): void;
|
|
241
|
-
onStallEnd(player: $p_i.TVLManager): void;
|
|
242
|
-
onVideoRenderStall$stallTime(player: $p_i.TVLManager, stallTime: $p_i.int64_t): void;
|
|
243
|
-
onAudioRenderStall$stallTime(player: $p_i.TVLManager, stallTime: $p_i.int64_t): void;
|
|
244
|
-
onResolutionSwitch$resolution$error$reason(player: $p_i.TVLManager, resolution: $p_i.VeLivePlayerResolution, error: $p_i.VeLivePlayerError, reason: $p_i.VeLivePlayerResolutionSwitchReason): void;
|
|
245
|
-
onVideoSizeChanged$width$height(player: $p_i.TVLManager, width: int, height: int): void;
|
|
246
|
-
onReceiveSeiMessage$message(player: $p_i.TVLManager, message: NSString): void;
|
|
247
|
-
onReceiveBinarySeiMessage$message(player: $p_i.TVLManager, message: $p_i.NSData): void;
|
|
248
|
-
onMainBackupSwitch$streamType$error(player: $p_i.TVLManager, streamType: $p_i.VeLivePlayerStreamType, error: $p_i.VeLivePlayerError): void;
|
|
249
|
-
onPlayerStatusUpdate$status(player: $p_i.TVLManager, status: $p_i.VeLivePlayerStatus): void;
|
|
250
|
-
onStatistics$statistics(player: $p_i.TVLManager, statistics: $p_i.VeLivePlayerStatistics): void;
|
|
251
|
-
onSnapshotComplete$image(player: $p_i.TVLManager, image: $p_i.UIImage): void;
|
|
252
|
-
onRenderVideoFrame$videoFrame(player: $p_i.TVLManager, videoFrame: $p_i.VeLivePlayerVideoFrame): void;
|
|
253
|
-
onRenderAudioFrame$audioFrame(player: $p_i.TVLManager, audioFrame: $p_i.VeLivePlayerAudioFrame): void;
|
|
254
|
-
onStreamFailedOpenSuperResolution$error(player: $p_i.TVLManager, error: $p_i.VeLivePlayerError): void;
|
|
255
|
-
}
|