@byteplus/react-native-live-push 1.5.1-rc.3 → 1.5.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/lib/commonjs/index.js +2 -2
- package/lib/commonjs/typescript/codegen/android/api.d.ts +93 -869
- package/lib/commonjs/typescript/codegen/android/callback.d.ts +31 -243
- package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +15 -60
- package/lib/commonjs/typescript/codegen/android/keytype.d.ts +219 -1173
- package/lib/commonjs/typescript/codegen/ios/api.d.ts +102 -899
- package/lib/commonjs/typescript/codegen/ios/callback.d.ts +28 -162
- package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +25 -100
- package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +180 -692
- package/lib/commonjs/typescript/codegen/pack/api.d.ts +133 -1180
- package/lib/commonjs/typescript/codegen/pack/callback.d.ts +35 -243
- package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +16 -69
- package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +271 -1460
- package/lib/commonjs/typescript/core/api.d.ts +1 -8
- package/lib/commonjs/typescript/core/effect.d.ts +1 -5
- package/lib/module/index.js +2 -2
- package/lib/module/typescript/codegen/android/api.d.ts +93 -869
- package/lib/module/typescript/codegen/android/callback.d.ts +31 -243
- package/lib/module/typescript/codegen/android/errorcode.d.ts +15 -60
- package/lib/module/typescript/codegen/android/keytype.d.ts +219 -1173
- package/lib/module/typescript/codegen/ios/api.d.ts +102 -899
- package/lib/module/typescript/codegen/ios/callback.d.ts +28 -162
- package/lib/module/typescript/codegen/ios/errorcode.d.ts +25 -100
- package/lib/module/typescript/codegen/ios/keytype.d.ts +180 -692
- package/lib/module/typescript/codegen/pack/api.d.ts +133 -1180
- package/lib/module/typescript/codegen/pack/callback.d.ts +35 -243
- package/lib/module/typescript/codegen/pack/errorcode.d.ts +16 -69
- package/lib/module/typescript/codegen/pack/keytype.d.ts +271 -1460
- package/lib/module/typescript/core/api.d.ts +1 -8
- package/lib/module/typescript/core/effect.d.ts +1 -5
- package/lib/typescript/codegen/android/api.d.ts +93 -869
- package/lib/typescript/codegen/android/callback.d.ts +31 -243
- package/lib/typescript/codegen/android/errorcode.d.ts +15 -60
- package/lib/typescript/codegen/android/keytype.d.ts +219 -1173
- package/lib/typescript/codegen/ios/api.d.ts +102 -899
- package/lib/typescript/codegen/ios/callback.d.ts +28 -162
- package/lib/typescript/codegen/ios/errorcode.d.ts +25 -100
- package/lib/typescript/codegen/ios/keytype.d.ts +180 -692
- package/lib/typescript/codegen/pack/api.d.ts +133 -1180
- package/lib/typescript/codegen/pack/callback.d.ts +35 -243
- package/lib/typescript/codegen/pack/errorcode.d.ts +16 -69
- package/lib/typescript/codegen/pack/keytype.d.ts +271 -1460
- package/lib/typescript/core/api.d.ts +1 -8
- package/lib/typescript/core/effect.d.ts +1 -5
- package/package.json +1 -1
- package/lib/commonjs/typescript/core/logger.d.ts +0 -1
- package/lib/commonjs/typescript/platforms/android/AppLogWrapper.d.ts +0 -8
- package/lib/commonjs/typescript/platforms/ios/RangersAppLog.d.ts +0 -4
- package/lib/module/typescript/core/logger.d.ts +0 -1
- package/lib/module/typescript/platforms/android/AppLogWrapper.d.ts +0 -8
- package/lib/module/typescript/platforms/ios/RangersAppLog.d.ts +0 -4
- package/lib/typescript/core/logger.d.ts +0 -1
- package/lib/typescript/platforms/android/AppLogWrapper.d.ts +0 -8
- package/lib/typescript/platforms/ios/RangersAppLog.d.ts +0 -4
|
@@ -2,26 +2,12 @@ import * as $p_a from '../android/index';
|
|
|
2
2
|
import * as $p_i from '../ios/index';
|
|
3
3
|
import { VeLiveVideoFrame, VeLiveAudioFrame, VeLivePusherStatus, VeLiveFirstFrameType, VeLiveNetworkQuality, VeLiveAudioPowerLevel, VeLivePusherStatistics } from './keytype';
|
|
4
4
|
import { int, Bitmap, NSString, BOOL, JSONObject, NSDictionary } from './types';
|
|
5
|
-
|
|
6
|
-
* @detail callback
|
|
7
|
-
* @brief 自定义的视频处理回调。
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
5
|
+
|
|
10
6
|
export interface VeLiveVideoFrameFilter {
|
|
11
7
|
}
|
|
12
|
-
|
|
13
|
-
* @detail callback
|
|
14
|
-
* @brief 视频帧订阅回调。
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
8
|
+
|
|
17
9
|
export interface VeLiveVideoFrameListener {
|
|
18
|
-
|
|
19
|
-
* @detail callback
|
|
20
|
-
* @brief 采集视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourceCapture` 时,才会触发该回调。
|
|
21
|
-
* @order 26
|
|
22
|
-
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](#VeLivePusherDef-VeLiveVideoFrameFilter)。
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
10
|
+
|
|
25
11
|
/** {en}
|
|
26
12
|
* @detail callback
|
|
27
13
|
* @brief Occurs when a video frame is captured. This callback will be triggered only if you return `VeLiveVideoFrameSourceCapture` when implementing the [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) callback method.
|
|
@@ -30,13 +16,7 @@ export interface VeLiveVideoFrameListener {
|
|
|
30
16
|
*
|
|
31
17
|
*/
|
|
32
18
|
onCaptureVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
33
|
-
|
|
34
|
-
* @detail callback
|
|
35
|
-
* @brief 编码前视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourcePreEncode` 时,才会触发该回调。
|
|
36
|
-
* @order 27
|
|
37
|
-
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
19
|
+
|
|
40
20
|
/** {en}
|
|
41
21
|
* @detail callback
|
|
42
22
|
* @brief Occurs when a video frame is to be encoded. This callback will be triggered only if you return `VeLiveVideoFrameSourcePreEncode` when implementing the [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) callback method.
|
|
@@ -46,31 +26,16 @@ export interface VeLiveVideoFrameListener {
|
|
|
46
26
|
*/
|
|
47
27
|
onPreEncodeVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
48
28
|
}
|
|
49
|
-
|
|
50
|
-
* @detail callback
|
|
51
|
-
* @brief 播放器播放回调。通过该回调,您可以获取与播放相关的事件和通知。
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
29
|
+
|
|
54
30
|
export interface VeLiveMediaPlayerListener {
|
|
55
|
-
|
|
56
|
-
* @detail callback
|
|
57
|
-
* @brief 开始播放的回调。
|
|
58
|
-
* @order 7
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
31
|
+
|
|
61
32
|
/** {en}
|
|
62
33
|
* @detail callback
|
|
63
34
|
* @brief Occurs when the playback starts.
|
|
64
35
|
*
|
|
65
36
|
*/
|
|
66
37
|
onStart?(): void;
|
|
67
|
-
|
|
68
|
-
* @detail callback
|
|
69
|
-
* @brief 播放进度的回调,每 100ms 触发一次。
|
|
70
|
-
* @param timeMs 播放进度,单位为 ms。
|
|
71
|
-
* @order 8
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
38
|
+
|
|
74
39
|
/** {en}
|
|
75
40
|
* @detail callback
|
|
76
41
|
* @brief Occurs every 100 ms to report the playback progress.
|
|
@@ -78,26 +43,14 @@ export interface VeLiveMediaPlayerListener {
|
|
|
78
43
|
*
|
|
79
44
|
*/
|
|
80
45
|
onProgress?(timeMs: number): void;
|
|
81
|
-
|
|
82
|
-
* @detail callback
|
|
83
|
-
* @brief 停止播放的回调。
|
|
84
|
-
* @order 9
|
|
85
|
-
*
|
|
86
|
-
*/
|
|
46
|
+
|
|
87
47
|
/** {en}
|
|
88
48
|
* @detail callback
|
|
89
49
|
* @brief Occurs when the playback stops.
|
|
90
50
|
*
|
|
91
51
|
*/
|
|
92
52
|
onStop?(): void;
|
|
93
|
-
|
|
94
|
-
* @detail callback
|
|
95
|
-
* @brief 返错误状态的回调。
|
|
96
|
-
* @param code 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
|
|
97
|
-
* @param msg 错误消息。
|
|
98
|
-
* @order 10
|
|
99
|
-
*
|
|
100
|
-
*/
|
|
53
|
+
|
|
101
54
|
/** {en}
|
|
102
55
|
* @detail callback
|
|
103
56
|
* @brief Occurs when an error occurs in the media player.
|
|
@@ -107,19 +60,9 @@ export interface VeLiveMediaPlayerListener {
|
|
|
107
60
|
*/
|
|
108
61
|
onError?(error: number): void;
|
|
109
62
|
}
|
|
110
|
-
|
|
111
|
-
* @detail callback
|
|
112
|
-
* @brief 音频帧订阅回调。
|
|
113
|
-
*
|
|
114
|
-
*/
|
|
63
|
+
|
|
115
64
|
export interface VeLiveAudioFrameListener {
|
|
116
|
-
|
|
117
|
-
* @detail callback
|
|
118
|
-
* @brief 采集音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourceCapture` 时,才会触发该回调。
|
|
119
|
-
* @order 28
|
|
120
|
-
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
65
|
+
|
|
123
66
|
/** {en}
|
|
124
67
|
* @detail callback
|
|
125
68
|
* @brief Occurs when an audio frame is captured. This callback will be triggered only if you return `VeLiveAudioFrameSourceCapture` when implementing the [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) callback method.
|
|
@@ -128,13 +71,7 @@ export interface VeLiveAudioFrameListener {
|
|
|
128
71
|
*
|
|
129
72
|
*/
|
|
130
73
|
onCaptureAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
131
|
-
|
|
132
|
-
* @detail callback
|
|
133
|
-
* @brief 编码前音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourcePreEncode` 时,才会触发该回调。
|
|
134
|
-
* @order 29
|
|
135
|
-
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
74
|
+
|
|
138
75
|
/** {en}
|
|
139
76
|
* @detail callback
|
|
140
77
|
* @brief Occurs when an audio frame is to be encoded. This callback will be triggered only if you return `VeLiveAudioFrameSourcePreEncode` when implementing the [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) callback method.
|
|
@@ -144,19 +81,9 @@ export interface VeLiveAudioFrameListener {
|
|
|
144
81
|
*/
|
|
145
82
|
onPreEncodeAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
146
83
|
}
|
|
147
|
-
|
|
148
|
-
* @detail callback
|
|
149
|
-
* @brief 播放器音视频帧回调。通过该回调,您可以获取音频和视频帧的数据。
|
|
150
|
-
*
|
|
151
|
-
*/
|
|
84
|
+
|
|
152
85
|
export interface VeLiveMediaPlayerFrameListener {
|
|
153
|
-
|
|
154
|
-
* @detail callback
|
|
155
|
-
* @brief 播放器音频帧回调。
|
|
156
|
-
* @param frame 音频帧,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
157
|
-
* @order 11
|
|
158
|
-
*
|
|
159
|
-
*/
|
|
86
|
+
|
|
160
87
|
/** {en}
|
|
161
88
|
* @detail callback
|
|
162
89
|
* @brief Occurs when the media player decodes an audio frame.
|
|
@@ -164,13 +91,7 @@ export interface VeLiveMediaPlayerFrameListener {
|
|
|
164
91
|
*
|
|
165
92
|
*/
|
|
166
93
|
onAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
167
|
-
|
|
168
|
-
* @detail callback
|
|
169
|
-
* @brief 播放器视频帧回调。当完成一个新的视频帧的解码后,触发该回调。
|
|
170
|
-
* @param frame 视频帧数据,包含了帧的时间戳和格式等信息,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
171
|
-
* @order 12
|
|
172
|
-
*
|
|
173
|
-
*/
|
|
94
|
+
|
|
174
95
|
/** {en}
|
|
175
96
|
* @detail callback
|
|
176
97
|
* @brief Occurs when the media player decodes a video frame.
|
|
@@ -179,21 +100,9 @@ export interface VeLiveMediaPlayerFrameListener {
|
|
|
179
100
|
*/
|
|
180
101
|
onVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
181
102
|
}
|
|
182
|
-
|
|
183
|
-
* @detail callback
|
|
184
|
-
* @brief 直播截图回调。
|
|
185
|
-
*
|
|
186
|
-
*/
|
|
103
|
+
|
|
187
104
|
export interface VeLiveSnapshotListener {
|
|
188
|
-
|
|
189
|
-
* @detail callback
|
|
190
|
-
* @brief 截图成功回调。
|
|
191
|
-
* @notes <br>
|
|
192
|
-
* 调用 snapshot{@link #VeLivePusher#snapshot} 截图成功后,会收到这个回调。
|
|
193
|
-
* @order 19
|
|
194
|
-
* @param image 视频的截图。
|
|
195
|
-
*
|
|
196
|
-
*/
|
|
105
|
+
|
|
197
106
|
/** {en}
|
|
198
107
|
* @detail callback
|
|
199
108
|
* @brief Screenshot success callback.
|
|
@@ -203,27 +112,12 @@ export interface VeLiveSnapshotListener {
|
|
|
203
112
|
*/
|
|
204
113
|
onSnapshotComplete?(image: Bitmap): void;
|
|
205
114
|
}
|
|
206
|
-
|
|
207
|
-
* @detail callback
|
|
208
|
-
* @brief 自定义的音频处理回调。
|
|
209
|
-
*
|
|
210
|
-
*/
|
|
115
|
+
|
|
211
116
|
export interface VeLiveAudioFrameFilter {
|
|
212
117
|
}
|
|
213
|
-
|
|
214
|
-
* @detail callback
|
|
215
|
-
* @brief 回调协议,用于监听推流器的推流错误、状态、网络质量、设备、首帧等回调事件等。
|
|
216
|
-
*/
|
|
118
|
+
|
|
217
119
|
export interface VeLivePusherObserver {
|
|
218
|
-
|
|
219
|
-
* @detail callback
|
|
220
|
-
* @brief 推流错误回调。
|
|
221
|
-
* @order 1
|
|
222
|
-
* @param code 错误码。详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
|
|
223
|
-
* @param subCode 子错误码。
|
|
224
|
-
* @param msg 错误信息。
|
|
225
|
-
*
|
|
226
|
-
*/
|
|
120
|
+
|
|
227
121
|
/** {en}
|
|
228
122
|
* @detail callback
|
|
229
123
|
* @brief Occurs when a streaming error occurs.
|
|
@@ -234,13 +128,7 @@ export interface VeLivePusherObserver {
|
|
|
234
128
|
*
|
|
235
129
|
*/
|
|
236
130
|
onError?(code: number, subCode: number, msg: string): void;
|
|
237
|
-
|
|
238
|
-
* @detail callback
|
|
239
|
-
* @brief 推流状态变化回调。
|
|
240
|
-
* @order 16
|
|
241
|
-
* @param status 变化后的推流状态。详情请参见 [VeLivePusherStatus](147521#VeLivePusherStatus)。
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
131
|
+
|
|
244
132
|
/** {en}
|
|
245
133
|
* @detail callback
|
|
246
134
|
* @brief Occurs when the streaming status changes.
|
|
@@ -249,14 +137,7 @@ export interface VeLivePusherObserver {
|
|
|
249
137
|
*
|
|
250
138
|
*/
|
|
251
139
|
onStatusChange?(status: VeLivePusherStatus): void;
|
|
252
|
-
|
|
253
|
-
* @detail callback
|
|
254
|
-
* @brief 首帧视频回调,当推流器发送出第一帧视频时,触发该回调。
|
|
255
|
-
* @order 2
|
|
256
|
-
* @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
|
|
257
|
-
* @param timestampMs 时间戳,单位为 ms。
|
|
258
|
-
*
|
|
259
|
-
*/
|
|
140
|
+
|
|
260
141
|
/** {en}
|
|
261
142
|
* @detail callback
|
|
262
143
|
* @brief Occurs when the live pusher sends the first video frame.
|
|
@@ -266,14 +147,7 @@ export interface VeLivePusherObserver {
|
|
|
266
147
|
*
|
|
267
148
|
*/
|
|
268
149
|
onFirstVideoFrame?(type: VeLiveFirstFrameType, timestampMs: number): void;
|
|
269
|
-
|
|
270
|
-
* @detail callback
|
|
271
|
-
* @brief 首帧音频回调,当推流器发送出第一帧音频时,触发该回调。
|
|
272
|
-
* @order 3
|
|
273
|
-
* @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
|
|
274
|
-
* @param timestampMs 时间戳,单位为 ms。
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
150
|
+
|
|
277
151
|
/** {en}
|
|
278
152
|
* @detail callback
|
|
279
153
|
* @brief Occurs when the live pusher sends the first audio frame.
|
|
@@ -283,15 +157,7 @@ export interface VeLivePusherObserver {
|
|
|
283
157
|
*
|
|
284
158
|
*/
|
|
285
159
|
onFirstAudioFrame?(type: VeLiveFirstFrameType, timestampMs: number): void;
|
|
286
|
-
|
|
287
|
-
* @detail callback
|
|
288
|
-
* @brief 摄像头开启/关闭回调,当推流器的摄像头开启或关闭时,触发该回调。
|
|
289
|
-
* @param open 摄像头的新状态是否为开启。<br>
|
|
290
|
-
* - true:摄像头开启;
|
|
291
|
-
* - false:摄像头关闭。
|
|
292
|
-
* @order 4
|
|
293
|
-
*
|
|
294
|
-
*/
|
|
160
|
+
|
|
295
161
|
/** {en}
|
|
296
162
|
* @detail callback
|
|
297
163
|
* @brief Occurs when the camera is turned on or turned off.
|
|
@@ -302,15 +168,7 @@ export interface VeLivePusherObserver {
|
|
|
302
168
|
*
|
|
303
169
|
*/
|
|
304
170
|
onCameraOpened?(open: boolean): void;
|
|
305
|
-
|
|
306
|
-
* @detail callback
|
|
307
|
-
* @brief 麦克风开启/关闭回调,当推流器的麦克风开启或关闭时,触发该回调。
|
|
308
|
-
* @param open 麦克风的新状态是否为开启。<br>
|
|
309
|
-
* - true:麦克风开启;
|
|
310
|
-
* - false:麦克风关闭。
|
|
311
|
-
* @order 5
|
|
312
|
-
*
|
|
313
|
-
*/
|
|
171
|
+
|
|
314
172
|
/** {en}
|
|
315
173
|
* @detail callback
|
|
316
174
|
* @brief Occurs when the microphone is turned on or turned off.
|
|
@@ -321,16 +179,7 @@ export interface VeLivePusherObserver {
|
|
|
321
179
|
*
|
|
322
180
|
*/
|
|
323
181
|
onMicrophoneOpened?(open: boolean): void;
|
|
324
|
-
|
|
325
|
-
* @platform android
|
|
326
|
-
* @detail callback
|
|
327
|
-
* @brief 屏幕采集开启/关闭回调,当推流器的屏幕采集开启或关闭时,触发该回调。
|
|
328
|
-
* @param open 屏幕采集的新状态是否为开启。<br>
|
|
329
|
-
* - true:屏幕采集开启;
|
|
330
|
-
* - false:屏幕采集关闭。
|
|
331
|
-
* @order 14
|
|
332
|
-
*
|
|
333
|
-
*/
|
|
182
|
+
|
|
334
183
|
/** {en}
|
|
335
184
|
* @platform android
|
|
336
185
|
* @detail callback
|
|
@@ -342,13 +191,7 @@ export interface VeLivePusherObserver {
|
|
|
342
191
|
*
|
|
343
192
|
*/
|
|
344
193
|
onScreenRecording?(): void;
|
|
345
|
-
|
|
346
|
-
* @detail callback
|
|
347
|
-
* @brief 网络质量状态回调,当推流器检测到网络质量发生变化时,触发该回调。
|
|
348
|
-
* @order 17
|
|
349
|
-
* @param quality 变化后的网络质量。详情请参见 [VeLiveNetworkQuality](147521#VeLiveNetworkQuality)。
|
|
350
|
-
*
|
|
351
|
-
*/
|
|
194
|
+
|
|
352
195
|
/** {en}
|
|
353
196
|
* @detail callback
|
|
354
197
|
* @brief Occurs when the network quality changes.
|
|
@@ -357,21 +200,7 @@ export interface VeLivePusherObserver {
|
|
|
357
200
|
*
|
|
358
201
|
*/
|
|
359
202
|
onNetworkQuality?(quality: VeLiveNetworkQuality): void;
|
|
360
|
-
|
|
361
|
-
* @detail callback
|
|
362
|
-
* @brief 音量等级回调,当推流器的音频音量等级发生变化时,触发该回调。
|
|
363
|
-
* @order 15
|
|
364
|
-
* @param level 变化后的音量等级。详情请参见 [VeLiveAudioPowerLevel](147521#VeLiveAudioPowerLevel)。
|
|
365
|
-
* @param value 当前音量的分贝值(dB)。<br/>
|
|
366
|
-
* - \\-1 表示当前没有获取到对应的音量分贝值。
|
|
367
|
-
* - 分贝数小于 1,对应 VeLiveAudioPowerLevelSilent 级别
|
|
368
|
-
* - 分贝数大于 1 小于等于 15,对应 VeLiveAudioPowerLevelQuiet 级别
|
|
369
|
-
* - 分贝数大于 15 小于等于 30,对应 VeLiveAudioPowerLevelLight 级别
|
|
370
|
-
* - 分贝数大于 30 小于等于 60,对应 VeLiveAudioPowerLevelNormal 级别
|
|
371
|
-
* - 分贝数大于 60 小于等于 85,对应 VeLiveAudioPowerLevelLoud
|
|
372
|
-
* - 分贝数大于 85,对应 VeLiveAudioPowerLevelNoisy 级别
|
|
373
|
-
*
|
|
374
|
-
*/
|
|
203
|
+
|
|
375
204
|
/** {en}
|
|
376
205
|
* @detail callback
|
|
377
206
|
* @brief Occurs when the audio volume level changes.
|
|
@@ -389,19 +218,9 @@ export interface VeLivePusherObserver {
|
|
|
389
218
|
*/
|
|
390
219
|
onAudioPowerQuality?(level: VeLiveAudioPowerLevel, value: number): void;
|
|
391
220
|
}
|
|
392
|
-
|
|
393
|
-
* @detail callback
|
|
394
|
-
* @brief 推流器周期性回调。
|
|
395
|
-
*
|
|
396
|
-
*/
|
|
221
|
+
|
|
397
222
|
export interface VeLivePusherStatisticsObserver {
|
|
398
|
-
|
|
399
|
-
* @detail callback
|
|
400
|
-
* @brief 推流周期性统计信息回调,每 5s 回调一次,您可以调用 [setStatisticsObserver](147517#VeLivePusher-setstatisticsobserver) 修改回调时间间隔。
|
|
401
|
-
* @order 18
|
|
402
|
-
* @param statistics 周期性统计信息,详情请参见 [VeLivePusherStatistics](147521#VeLivePusherDef-VeLivePusherStatistics)。
|
|
403
|
-
*
|
|
404
|
-
*/
|
|
223
|
+
|
|
405
224
|
/** {en}
|
|
406
225
|
* @detail callback
|
|
407
226
|
* @brief Occurs periodically to report streaming statistics. By default, the callback is triggered every 5 seconds. You can call [setStatisticsObserver](docs-broadcast-sdk-for-android-api#VeLivePusher-setstatisticsobserver) to modify the callback time interval.
|
|
@@ -410,13 +229,7 @@ export interface VeLivePusherStatisticsObserver {
|
|
|
410
229
|
*
|
|
411
230
|
*/
|
|
412
231
|
onStatistics?(statistics: VeLivePusherStatistics): void;
|
|
413
|
-
|
|
414
|
-
* @detail callback
|
|
415
|
-
* @brief 周期性日志信息回调。
|
|
416
|
-
* @order 25
|
|
417
|
-
* @param logInfo 周期性日志信息。
|
|
418
|
-
*
|
|
419
|
-
*/
|
|
232
|
+
|
|
420
233
|
/** {en}
|
|
421
234
|
* @detail callback
|
|
422
235
|
* @brief Occurs periodically to return log information.
|
|
@@ -426,18 +239,9 @@ export interface VeLivePusherStatisticsObserver {
|
|
|
426
239
|
*/
|
|
427
240
|
onLogMonitor?(logInfo: JSONObject): void;
|
|
428
241
|
}
|
|
429
|
-
|
|
430
|
-
* @detail callback
|
|
431
|
-
* @brief 直播录制回调。
|
|
432
|
-
*
|
|
433
|
-
*/
|
|
242
|
+
|
|
434
243
|
export interface VeLiveFileRecordingListener {
|
|
435
|
-
|
|
436
|
-
* @detail callback
|
|
437
|
-
* @brief 直播录制开始回调。
|
|
438
|
-
* @order 22
|
|
439
|
-
*
|
|
440
|
-
*/
|
|
244
|
+
|
|
441
245
|
/** {en}
|
|
442
246
|
* @detail callback
|
|
443
247
|
* @brief Occurs when recording starts.
|
|
@@ -445,12 +249,7 @@ export interface VeLiveFileRecordingListener {
|
|
|
445
249
|
*
|
|
446
250
|
*/
|
|
447
251
|
onFileRecordingStarted?(): void;
|
|
448
|
-
|
|
449
|
-
* @detail callback
|
|
450
|
-
* @brief 直播录制停止回调。
|
|
451
|
-
* @order 23
|
|
452
|
-
*
|
|
453
|
-
*/
|
|
252
|
+
|
|
454
253
|
/** {en}
|
|
455
254
|
* @detail callback
|
|
456
255
|
* @brief Occurs when recording stops.
|
|
@@ -458,14 +257,7 @@ export interface VeLiveFileRecordingListener {
|
|
|
458
257
|
*
|
|
459
258
|
*/
|
|
460
259
|
onFileRecordingStopped?(): void;
|
|
461
|
-
|
|
462
|
-
* @detail callback
|
|
463
|
-
* @brief 直播录制错误回调。
|
|
464
|
-
* @order 24
|
|
465
|
-
* @param errorCode 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
|
|
466
|
-
* @param message 错误信息。
|
|
467
|
-
*
|
|
468
|
-
*/
|
|
260
|
+
|
|
469
261
|
/** {en}
|
|
470
262
|
* @detail callback
|
|
471
263
|
* @brief Occurs when an error occurs during recording.
|
|
@@ -1,148 +1,95 @@
|
|
|
1
1
|
import * as $p_a from '../android/index';
|
|
2
2
|
import * as $p_i from '../ios/index';
|
|
3
|
-
|
|
4
|
-
* @detail errorcode
|
|
5
|
-
* @brief 推流过程错误码定义。
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
3
|
+
|
|
8
4
|
export declare enum VeLivePusherErrorCode {
|
|
9
|
-
|
|
10
|
-
* @brief 无错误。
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
5
|
+
|
|
13
6
|
/** {en}
|
|
14
7
|
* @brief No error.
|
|
15
8
|
*
|
|
16
9
|
*/
|
|
17
10
|
VeLivePusherSuccess = 0,
|
|
18
|
-
|
|
19
|
-
* @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
11
|
+
|
|
22
12
|
/** {en}
|
|
23
13
|
* @brief SDK license error, possibly caused by an invalid or expired certificate.
|
|
24
14
|
*
|
|
25
15
|
*/
|
|
26
16
|
VeLivePusherInvalidLicense = -1,
|
|
27
|
-
|
|
28
|
-
* @brief 参数错误,请检查入参,并重新调用。
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
17
|
+
|
|
31
18
|
/** {en}
|
|
32
19
|
* @brief Parameter error, possibly caused by an invalid parameter value or parameter type.
|
|
33
20
|
*
|
|
34
21
|
*/
|
|
35
22
|
VeLivePusherInvalidParameter = -2,
|
|
36
|
-
|
|
37
|
-
* @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
23
|
+
|
|
40
24
|
/** {en}
|
|
41
25
|
* @brief Video capture error, possibly caused by the lack of access to the video device.
|
|
42
26
|
*
|
|
43
27
|
*/
|
|
44
28
|
VeLivePusherVideoCaptureError = -3,
|
|
45
|
-
|
|
46
|
-
* @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
29
|
+
|
|
49
30
|
/** {en}
|
|
50
31
|
* @brief Audio capture error, possibly caused by the lack of access to the audio device.
|
|
51
32
|
*
|
|
52
33
|
*/
|
|
53
34
|
VeLivePusherAudioCaptureError = -4,
|
|
54
|
-
|
|
55
|
-
* @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
35
|
+
|
|
58
36
|
/** {en}
|
|
59
37
|
* @brief Video encoding error, possibly caused by a configuration issue with the video encoder. If the error is not eliminated, please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
60
38
|
*
|
|
61
39
|
*/
|
|
62
40
|
VeLivePusherVideoEncoderError = -5,
|
|
63
|
-
|
|
64
|
-
* @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
65
|
-
*
|
|
66
|
-
*/
|
|
41
|
+
|
|
67
42
|
/** {en}
|
|
68
43
|
* @brief Audio encoding error, possibly caused by a configuration issue with the audio encoder. If the error is not eliminated, please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
69
44
|
*
|
|
70
45
|
*/
|
|
71
46
|
VeLivePusherAudioEncoderError = -6,
|
|
72
|
-
|
|
73
|
-
* @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
47
|
+
|
|
76
48
|
/** {en}
|
|
77
49
|
* @brief Network error, which might be caused by network connection issues such as network instability or high latency. If the error is not eliminated, please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
78
50
|
*
|
|
79
51
|
*/
|
|
80
52
|
VeLivePusherTransportError = -7,
|
|
81
|
-
|
|
82
|
-
* @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
53
|
+
|
|
85
54
|
/** {en}
|
|
86
55
|
* @brief Special effects error. Please check if the Effects SDK has been integrated and initialized, and if the path of the effects resources is correctly set. If the error is not eliminated, please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
87
56
|
*
|
|
88
57
|
*/
|
|
89
58
|
VeLivePusherVideoEffectError = -8,
|
|
90
|
-
|
|
91
|
-
* @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
59
|
+
|
|
94
60
|
/** {en}
|
|
95
61
|
* @brief Audio device error. Please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
96
62
|
*
|
|
97
63
|
*/
|
|
98
64
|
VeLivePusherAudioDeviceError = -9,
|
|
99
|
-
|
|
100
|
-
* @platform android
|
|
101
|
-
* @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
|
|
102
|
-
*
|
|
103
|
-
*/
|
|
65
|
+
|
|
104
66
|
/** {en}
|
|
105
67
|
* @platform android
|
|
106
68
|
* @brief The license does not support H265.
|
|
107
69
|
*
|
|
108
70
|
*/
|
|
109
71
|
VeLivePusherLicenseUnsupportedH265 = -10,
|
|
110
|
-
|
|
111
|
-
* @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
72
|
+
|
|
114
73
|
/** {en}
|
|
115
74
|
* @brief Internal error. Please [create a ticket](https://console.byteplus.com/workorder/create?step=2&SubProductID=P00000980) to contact BytePlus technical support for assistance when using this callback method.
|
|
116
75
|
*
|
|
117
76
|
*/
|
|
118
77
|
VeLivePusherError = -100,
|
|
119
|
-
|
|
120
|
-
* @platform android
|
|
121
|
-
* @brief 当前系统版本不支持屏幕采集功能
|
|
122
|
-
*
|
|
123
|
-
*/
|
|
78
|
+
|
|
124
79
|
/** {en}
|
|
125
80
|
* @platform android
|
|
126
81
|
* @brief
|
|
127
82
|
*
|
|
128
83
|
*/
|
|
129
84
|
VeLivePusherScreenCaptureNotSupportError = -99,
|
|
130
|
-
|
|
131
|
-
* @platform android
|
|
132
|
-
* @brief 屏幕采集权限的获取被用户拒绝
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
85
|
+
|
|
135
86
|
/** {en}
|
|
136
87
|
* @platform android
|
|
137
88
|
* @brief
|
|
138
89
|
*
|
|
139
90
|
*/
|
|
140
91
|
VeLivePusherScreenCaptureStartError = -98,
|
|
141
|
-
|
|
142
|
-
* @platform android
|
|
143
|
-
* @brief 屏幕采集被系统中断,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
92
|
+
|
|
146
93
|
/** {en}
|
|
147
94
|
* @platform android
|
|
148
95
|
* @brief
|