@volcengine/react-native-live-push 1.0.2 → 1.1.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +1 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +1 -1
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +5 -3
  5. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +86 -11
  6. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +29 -40
  7. package/ios/VeLivePushView.m +1 -1
  8. package/ios/VeLivePushViewManager.m +5 -1
  9. package/lib/commonjs/index.js +21800 -17843
  10. package/lib/module/index.js +21800 -17836
  11. package/lib/typescript/android/index.d.ts +3 -0
  12. package/lib/typescript/codegen/android/api.d.ts +353 -125
  13. package/lib/typescript/codegen/android/callback.d.ts +36 -5
  14. package/lib/typescript/codegen/android/errorcode.d.ts +12 -0
  15. package/lib/typescript/codegen/android/keytype.d.ts +305 -73
  16. package/lib/typescript/codegen/android/types.d.ts +7 -6
  17. package/lib/typescript/codegen/ios/api.d.ts +81 -118
  18. package/lib/typescript/codegen/ios/callback.d.ts +22 -58
  19. package/lib/typescript/codegen/ios/external.d.ts +1 -0
  20. package/lib/typescript/codegen/ios/index.d.ts +1 -0
  21. package/lib/typescript/codegen/ios/keytype.d.ts +40 -98
  22. package/lib/typescript/codegen/ios/types.d.ts +16 -5
  23. package/lib/typescript/codegen/pack/api.d.ts +1261 -1195
  24. package/lib/typescript/codegen/pack/callback.d.ts +166 -270
  25. package/lib/typescript/codegen/pack/errorcode.d.ts +24 -122
  26. package/lib/typescript/codegen/pack/index.d.ts +1 -1
  27. package/lib/typescript/codegen/pack/keytype.d.ts +1095 -1244
  28. package/lib/typescript/codegen/pack/types.d.ts +67 -0
  29. package/lib/typescript/component.d.ts +10 -3
  30. package/lib/typescript/core/api.d.ts +2 -2
  31. package/lib/typescript/core/callback.d.ts +2 -2
  32. package/lib/typescript/core/errorcode.d.ts +2 -2
  33. package/lib/typescript/core/keytype.d.ts +2 -7
  34. package/lib/typescript/platforms/ios/extends.d.ts +17 -0
  35. package/package.json +7 -4
  36. package/react-native-velive-push.podspec +1 -1
@@ -12,6 +12,7 @@ export declare class VeLiveVideoFrameFilter {
12
12
  * @order 15
13
13
  * @param srcFrame 源视频帧,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
14
14
  * @param dstFrame 处理后的视频帧,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
15
+ *
15
16
  */
16
17
  onVideoProcess?(srcFrame: VeLiveVideoFrame, dstFrame: VeLiveVideoFrame): int;
17
18
  }
@@ -21,20 +22,23 @@ export declare class VeLiveVideoFrameListener {
21
22
  * @brief 设置当前 Listener 需要的视频帧来源。
22
23
  * @return 您所要订阅的视频数据的位置信息,详情请参见 [VeLiveVideoFrameSource](147521#VeLiveVideoFrameSource)。
23
24
  * @order 17
25
+ *
24
26
  */
25
27
  getObservedVideoFrameSource?(): VeLiveVideoFrameSource;
26
28
  /** {zh}
27
29
  * @detail callback
28
- * @brief 采集视频帧回调。只有当您通过 {@link #VeLiveVideoFrameListener#getObservedVideoFrameSource getObservedVideoFrameSource} 返回 `VeLiveVideoFrameSourceCapture` 时,才会触发该回调。
30
+ * @brief 采集视频帧回调。只有当您通过 getObservedVideoFrameSource{@link #VeLiveVideoFrameListener#getObservedVideoFrameSource} 返回 `VeLiveVideoFrameSourceCapture` 时,才会触发该回调。
29
31
  * @order 18
30
32
  * @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
33
+ *
31
34
  */
32
35
  onCaptureVideoFrame?(frame: VeLiveVideoFrame): void;
33
36
  /** {zh}
34
37
  * @detail callback
35
- * @brief 编码前视频帧回调。只有当您通过 {@link #VeLiveVideoFrameListener#getObservedVideoFrameSource getObservedVideoFrameSource} 返回 `VeLiveVideoFrameSourcePreEncode` 时,才会触发该回调。
38
+ * @brief 编码前视频帧回调。只有当您通过 getObservedVideoFrameSource{@link #VeLiveVideoFrameListener#getObservedVideoFrameSource} 返回 `VeLiveVideoFrameSourcePreEncode` 时,才会触发该回调。
36
39
  * @order 19
37
40
  * @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
41
+ *
38
42
  */
39
43
  onPreEncodeVideoFrame?(frame: VeLiveVideoFrame): void;
40
44
  }
@@ -44,6 +48,7 @@ export declare class VeLiveVideoEffectCallback {
44
48
  * @brief 视频特效处理结果回调。
45
49
  * @param result 处理结果
46
50
  * @param msg 消息
51
+ *
47
52
  */
48
53
  onResult?(result: int, msg: String): void;
49
54
  }
@@ -51,17 +56,20 @@ export declare class VeLiveMediaPlayerListener {
51
56
  /** {zh}
52
57
  * @detail callback
53
58
  * @brief 开始播放的回调。
59
+ *
54
60
  */
55
61
  onStart?(info: Bundle): void;
56
62
  /** {zh}
57
63
  * @detail callback
58
64
  * @brief 播放进度的回调,每 100ms 触发一次。
59
65
  * @param timeMs 播放进度,单位为 ms。
66
+ *
60
67
  */
61
68
  onProgress?(timeMs: long): void;
62
69
  /** {zh}
63
70
  * @detail callback
64
71
  * @brief 停止播放的回调。
72
+ *
65
73
  */
66
74
  onStop?(): void;
67
75
  /** {zh}
@@ -69,6 +77,7 @@ export declare class VeLiveMediaPlayerListener {
69
77
  * @brief 返错误状态的回调。
70
78
  * @param code 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
71
79
  * @param msg 错误消息。
80
+ *
72
81
  */
73
82
  onError?(code: int, msg: String): void;
74
83
  }
@@ -78,20 +87,23 @@ export declare class VeLiveAudioFrameListener {
78
87
  * @brief 设置当前 Listener 需要的音频帧来源。
79
88
  * @return 订阅的音频帧位置信息,详情请参见 [VeLiveAudioFrameSource](147521#VeLiveAudioFrameSource)。
80
89
  * @order 20
90
+ *
81
91
  */
82
92
  getObservedAudioFrameSource?(): VeLiveAudioFrameSource;
83
93
  /** {zh}
84
94
  * @detail callback
85
- * @brief 采集音频帧回调。只有当您通过 {@link #VeLiveAudioFrameListener#getObservedAudioFrameSource getObservedAudioFrameSource} 返回 `VeLiveAudioFrameSourceCapture` 时,才会触发该回调。
95
+ * @brief 采集音频帧回调。只有当您通过 getObservedAudioFrameSource{@link #VeLiveAudioFrameListener#getObservedAudioFrameSource} 返回 `VeLiveAudioFrameSourceCapture` 时,才会触发该回调。
86
96
  * @order 21
87
97
  * @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147517#VeLiveAudioFrame)。
98
+ *
88
99
  */
89
100
  onCaptureAudioFrame?(frame: VeLiveAudioFrame): void;
90
101
  /** {zh}
91
102
  * @detail callback
92
- * @brief 编码前音频帧回调。只有当您通过 {@link #VeLiveAudioFrameListener#getObservedAudioFrameSource getObservedAudioFrameSource} 返回 `VeLiveAudioFrameSourcePreEncode` 时,才会触发该回调。
103
+ * @brief 编码前音频帧回调。只有当您通过 getObservedAudioFrameSource{@link #VeLiveAudioFrameListener#getObservedAudioFrameSource} 返回 `VeLiveAudioFrameSourcePreEncode` 时,才会触发该回调。
93
104
  * @order 22
94
105
  * @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147517#VeLiveAudioFrame)。
106
+ *
95
107
  */
96
108
  onPreEncodeAudioFrame?(frame: VeLiveAudioFrame): void;
97
109
  }
@@ -100,12 +112,14 @@ export declare class VeLiveMediaPlayerFrameListener {
100
112
  * @detail callback
101
113
  * @brief 播放器音频帧回调。
102
114
  * @param frame 音频帧,详情请参见 [VeLiveAudioFrame](147517#VeLiveAudioFrame)。
115
+ *
103
116
  */
104
117
  onAudioFrame?(frame: VeLiveAudioFrame): void;
105
118
  /** {zh}
106
119
  * @detail callback
107
120
  * @brief 播放器视频帧回调。当完成一个新的视频帧的解码后,触发该回调。
108
121
  * @param frame 视频帧数据,包含了帧的时间戳和格式等信息,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
122
+ *
109
123
  */
110
124
  onVideoFrame?(frame: VeLiveVideoFrame): void;
111
125
  }
@@ -114,9 +128,10 @@ export declare class VeLiveSnapshotListener {
114
128
  * @detail callback
115
129
  * @brief 截图成功回调。
116
130
  * @notes <br>
117
- * 调用 {@link #VeLivePusher#snapshot snapshot} 截图成功后,会收到这个回调。
131
+ * 调用 snapshot{@link #VeLivePusher#snapshot} 截图成功后,会收到这个回调。
118
132
  * @order 15
119
133
  * @param image 视频的截图。
134
+ *
120
135
  */
121
136
  onSnapshotComplete?(image: Bitmap): void;
122
137
  }
@@ -129,6 +144,7 @@ export declare class VeLiveAudioFrameFilter {
129
144
  * @param dstFrame 处理后的音频帧,详情请参见 [VeLiveAudioFrame](147517#VeLiveAudioFrame)。
130
145
  * - 0:处理成功;
131
146
  * - ≠0:处理失败,该帧会被 SDK 继续传递到编码器;
147
+ *
132
148
  */
133
149
  onAudioProcess?(srcFrame: VeLiveAudioFrame, dstFrame: VeLiveAudioFrame): int;
134
150
  }
@@ -140,6 +156,7 @@ export declare class VeLivePusherObserver {
140
156
  * @param code 错误码。详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
141
157
  * @param subCode 子错误码。
142
158
  * @param msg 错误信息。
159
+ *
143
160
  */
144
161
  onError?(code: int, subCode: int, msg: String): void;
145
162
  /** {zh}
@@ -147,6 +164,7 @@ export declare class VeLivePusherObserver {
147
164
  * @brief 推流状态变化回调。
148
165
  * @order 2
149
166
  * @param status 变化后的推流状态。详情请参见 [VeLivePusherStatus](147521#VeLivePusherStatus)。
167
+ *
150
168
  */
151
169
  onStatusChange?(status: VeLivePusherStatus): void;
152
170
  /** {zh}
@@ -155,6 +173,7 @@ export declare class VeLivePusherObserver {
155
173
  * @order 3
156
174
  * @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
157
175
  * @param timestampMs 时间戳,单位为 ms。
176
+ *
158
177
  */
159
178
  onFirstVideoFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
160
179
  /** {zh}
@@ -163,6 +182,7 @@ export declare class VeLivePusherObserver {
163
182
  * @order 4
164
183
  * @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
165
184
  * @param timestampMs 时间戳,单位为 ms。
185
+ *
166
186
  */
167
187
  onFirstAudioFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
168
188
  /** {zh}
@@ -172,6 +192,7 @@ export declare class VeLivePusherObserver {
172
192
  * - true:摄像头开启;
173
193
  * - false:摄像头关闭。
174
194
  * @order 5
195
+ *
175
196
  */
176
197
  onCameraOpened?(open: boolean): void;
177
198
  /** {zh}
@@ -181,6 +202,7 @@ export declare class VeLivePusherObserver {
181
202
  * - true:麦克风开启;
182
203
  * - false:麦克风关闭。
183
204
  * @order 6
205
+ *
184
206
  */
185
207
  onMicrophoneOpened?(open: boolean): void;
186
208
  /** {zh}
@@ -190,6 +212,7 @@ export declare class VeLivePusherObserver {
190
212
  * - true:屏幕采集开启;
191
213
  * - false:屏幕采集关闭。
192
214
  * @order 7
215
+ *
193
216
  */
194
217
  onScreenRecording?(open: boolean): void;
195
218
  /** {zh}
@@ -197,6 +220,7 @@ export declare class VeLivePusherObserver {
197
220
  * @brief 网络质量状态回调,当推流器检测到网络质量发生变化时,触发该回调。
198
221
  * @order 8
199
222
  * @param quality 变化后的网络质量。详情请参见 [VeLiveNetworkQuality](147521#VeLiveNetworkQuality)。
223
+ *
200
224
  */
201
225
  onNetworkQuality?(quality: VeLiveNetworkQuality): void;
202
226
  /** {zh}
@@ -212,6 +236,7 @@ export declare class VeLivePusherObserver {
212
236
  * - 分贝数大于 30 小于等于 60,对应 VeLiveAudioPowerLevelNormal 级别
213
237
  * - 分贝数大于 60 小于等于 85,对应 VeLiveAudioPowerLevelLoud
214
238
  * - 分贝数大于 85,对应 VeLiveAudioPowerLevelNoisy 级别
239
+ *
215
240
  */
216
241
  onAudioPowerQuality?(level: VeLiveAudioPowerLevel, value: float): void;
217
242
  }
@@ -221,6 +246,7 @@ export declare class VeLivePusherStatisticsObserver {
221
246
  * @brief 推流周期性统计信息回调。
222
247
  * @order 10
223
248
  * @param statistics 周期性统计信息,默认每 5s 回调一次。详情请参见 [VeLivePusherStatistics](147521#VeLivePusherStatistics)。
249
+ *
224
250
  */
225
251
  onStatistics?(statistics: VeLivePusherStatistics): void;
226
252
  /** {zh}
@@ -228,6 +254,7 @@ export declare class VeLivePusherStatisticsObserver {
228
254
  * @brief 周期性日志信息回调。
229
255
  * @order 11
230
256
  * @param logInfo 周期性日志信息。
257
+ *
231
258
  */
232
259
  onLogMonitor?(logInfo: JSONObject): void;
233
260
  }
@@ -238,12 +265,14 @@ export declare class VeLiveFileRecordingListener {
238
265
  * @detail callback
239
266
  * @brief 直播录制开始回调。
240
267
  * @order 12
268
+ *
241
269
  */
242
270
  onFileRecordingStarted?(): void;
243
271
  /** {zh}
244
272
  * @detail callback
245
273
  * @brief 直播录制停止回调。
246
274
  * @order 13
275
+ *
247
276
  */
248
277
  onFileRecordingStopped?(): void;
249
278
  /** {zh}
@@ -252,6 +281,7 @@ export declare class VeLiveFileRecordingListener {
252
281
  * @order 14
253
282
  * @param errorCode 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
254
283
  * @param message 错误信息。
284
+ *
255
285
  */
256
286
  onFileRecordingError?(errorCode: int, message: String): void;
257
287
  }
@@ -260,6 +290,7 @@ export declare class VeLiveVideoEffectHandleCallback {
260
290
  * @detail callback
261
291
  * @brief 视频特效对象回调,调用 [setAdvancedFeature](147517#VeLiveVideoEffectManager-setadvancedfeature) 接口时触发此回调,如需使用请联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
262
292
  * @param handle 视频特效对象。
293
+ *
263
294
  */
264
295
  onEffectHandle?(handle: Object): void;
265
296
  }
@@ -1,50 +1,62 @@
1
1
  export declare enum VeLivePusherErrorCode {
2
2
  /** {zh}
3
3
  * @brief 无错误。
4
+ *
4
5
  */
5
6
  VeLivePusherSuccess = 0,
6
7
  /** {zh}
7
8
  * @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
9
+ *
8
10
  */
9
11
  VeLivePusherInvalidLicense = 1,
10
12
  /** {zh}
11
13
  * @brief 参数错误,请检查入参,并重新调用。
14
+ *
12
15
  */
13
16
  VeLivePusherInvalidParameter = 2,
14
17
  /** {zh}
15
18
  * @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
19
+ *
16
20
  */
17
21
  VeLivePusherVideoCaptureError = 3,
18
22
  /** {zh}
19
23
  * @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
24
+ *
20
25
  */
21
26
  VeLivePusherAudioCaptureError = 4,
22
27
  /** {zh}
23
28
  * @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
29
+ *
24
30
  */
25
31
  VeLivePusherVideoEncoderError = 5,
26
32
  /** {zh}
27
33
  * @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
34
+ *
28
35
  */
29
36
  VeLivePusherAudioEncoderError = 6,
30
37
  /** {zh}
31
38
  * @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
39
+ *
32
40
  */
33
41
  VeLivePusherTransportError = 7,
34
42
  /** {zh}
35
43
  * @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
44
+ *
36
45
  */
37
46
  VeLivePusherVideoEffectError = 8,
38
47
  /** {zh}
39
48
  * @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
49
+ *
40
50
  */
41
51
  VeLivePusherAudioDeviceError = 9,
42
52
  /** {zh}
43
53
  * @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
54
+ *
44
55
  */
45
56
  VeLivePusherLicenseUnsupportedH265 = 10,
46
57
  /** {zh}
47
58
  * @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
59
+ *
48
60
  */
49
61
  VeLivePusherError = 11
50
62
  }