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