@volcengine/react-native-live-push 1.1.1-rc.0 → 1.1.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/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushHelper.java +22 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +5 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +11 -5
- package/ios/VeLivePushHelper.h +28 -0
- package/ios/VeLivePushHelper.m +62 -0
- package/lib/commonjs/index.js +1494 -5012
- package/lib/module/index.js +1494 -5012
- package/lib/typescript/codegen/android/errorcode.d.ts +11 -11
- package/lib/typescript/codegen/pack/callback.d.ts +1 -1
- package/lib/typescript/codegen/pack/errorcode.d.ts +11 -11
- package/lib/typescript/codegen/pack/keytype.d.ts +38 -38
- package/lib/typescript/platforms/android/helper.d.ts +8 -0
- package/package.json +1 -1
|
@@ -8,55 +8,55 @@ export declare enum VeLivePusherErrorCode {
|
|
|
8
8
|
* @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
VeLivePusherInvalidLicense = 1,
|
|
11
|
+
VeLivePusherInvalidLicense = -1,
|
|
12
12
|
/** {zh}
|
|
13
13
|
* @brief 参数错误,请检查入参,并重新调用。
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
VeLivePusherInvalidParameter = 2,
|
|
16
|
+
VeLivePusherInvalidParameter = -2,
|
|
17
17
|
/** {zh}
|
|
18
18
|
* @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
-
VeLivePusherVideoCaptureError = 3,
|
|
21
|
+
VeLivePusherVideoCaptureError = -3,
|
|
22
22
|
/** {zh}
|
|
23
23
|
* @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
VeLivePusherAudioCaptureError = 4,
|
|
26
|
+
VeLivePusherAudioCaptureError = -4,
|
|
27
27
|
/** {zh}
|
|
28
28
|
* @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
|
-
VeLivePusherVideoEncoderError = 5,
|
|
31
|
+
VeLivePusherVideoEncoderError = -5,
|
|
32
32
|
/** {zh}
|
|
33
33
|
* @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
VeLivePusherAudioEncoderError = 6,
|
|
36
|
+
VeLivePusherAudioEncoderError = -6,
|
|
37
37
|
/** {zh}
|
|
38
38
|
* @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
|
-
VeLivePusherTransportError = 7,
|
|
41
|
+
VeLivePusherTransportError = -7,
|
|
42
42
|
/** {zh}
|
|
43
43
|
* @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
46
|
-
VeLivePusherVideoEffectError = 8,
|
|
46
|
+
VeLivePusherVideoEffectError = -8,
|
|
47
47
|
/** {zh}
|
|
48
48
|
* @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
49
49
|
*
|
|
50
50
|
*/
|
|
51
|
-
VeLivePusherAudioDeviceError = 9,
|
|
51
|
+
VeLivePusherAudioDeviceError = -9,
|
|
52
52
|
/** {zh}
|
|
53
53
|
* @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
|
|
54
54
|
*
|
|
55
55
|
*/
|
|
56
|
-
VeLivePusherLicenseUnsupportedH265 = 10,
|
|
56
|
+
VeLivePusherLicenseUnsupportedH265 = -10,
|
|
57
57
|
/** {zh}
|
|
58
58
|
* @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
59
59
|
*
|
|
60
60
|
*/
|
|
61
|
-
VeLivePusherError =
|
|
61
|
+
VeLivePusherError = -100
|
|
62
62
|
}
|
|
@@ -15,58 +15,58 @@ export declare enum VeLivePusherErrorCode {
|
|
|
15
15
|
* @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
VeLivePusherInvalidLicense = 1,
|
|
18
|
+
VeLivePusherInvalidLicense = -1,
|
|
19
19
|
/** {zh}
|
|
20
20
|
* @brief 参数错误,请检查入参,并重新调用。
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
VeLivePusherInvalidParameter = 2,
|
|
23
|
+
VeLivePusherInvalidParameter = -2,
|
|
24
24
|
/** {zh}
|
|
25
25
|
* @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
|
-
VeLivePusherVideoCaptureError = 3,
|
|
28
|
+
VeLivePusherVideoCaptureError = -3,
|
|
29
29
|
/** {zh}
|
|
30
30
|
* @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
|
|
31
31
|
*
|
|
32
32
|
*/
|
|
33
|
-
VeLivePusherAudioCaptureError = 4,
|
|
33
|
+
VeLivePusherAudioCaptureError = -4,
|
|
34
34
|
/** {zh}
|
|
35
35
|
* @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
38
|
-
VeLivePusherVideoEncoderError = 5,
|
|
38
|
+
VeLivePusherVideoEncoderError = -5,
|
|
39
39
|
/** {zh}
|
|
40
40
|
* @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
41
41
|
*
|
|
42
42
|
*/
|
|
43
|
-
VeLivePusherAudioEncoderError = 6,
|
|
43
|
+
VeLivePusherAudioEncoderError = -6,
|
|
44
44
|
/** {zh}
|
|
45
45
|
* @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
46
46
|
*
|
|
47
47
|
*/
|
|
48
|
-
VeLivePusherTransportError = 7,
|
|
48
|
+
VeLivePusherTransportError = -7,
|
|
49
49
|
/** {zh}
|
|
50
50
|
* @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
51
51
|
*
|
|
52
52
|
*/
|
|
53
|
-
VeLivePusherVideoEffectError = 8,
|
|
53
|
+
VeLivePusherVideoEffectError = -8,
|
|
54
54
|
/** {zh}
|
|
55
55
|
* @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
|
-
VeLivePusherAudioDeviceError = 9,
|
|
58
|
+
VeLivePusherAudioDeviceError = -9,
|
|
59
59
|
/** {zh}
|
|
60
60
|
* @platform android
|
|
61
61
|
* @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
|
|
62
62
|
*
|
|
63
63
|
*/
|
|
64
|
-
VeLivePusherLicenseUnsupportedH265 = 10,
|
|
64
|
+
VeLivePusherLicenseUnsupportedH265 = -10,
|
|
65
65
|
/** {zh}
|
|
66
66
|
* @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
|
-
VeLivePusherError =
|
|
69
|
+
VeLivePusherError = -100
|
|
70
70
|
}
|
|
71
71
|
export declare class t_VeLivePusherErrorCode {
|
|
72
72
|
static ts_to_android(value: VeLivePusherErrorCode): $p_a.VeLivePusherErrorCode;
|
|
@@ -216,38 +216,6 @@ export declare enum VeLiveAudioBufferType {
|
|
|
216
216
|
*/
|
|
217
217
|
VeLiveAudioBufferTypeNSData = 3
|
|
218
218
|
}
|
|
219
|
-
/** {zh}
|
|
220
|
-
* @detail keytype
|
|
221
|
-
* @brief 定义了推流中首帧的类型,包括音视频的采集首帧、渲染首帧、编码完成首帧和发送首帧。
|
|
222
|
-
*
|
|
223
|
-
*/
|
|
224
|
-
export declare enum VeLiveFirstFrameType {
|
|
225
|
-
/** {zh}
|
|
226
|
-
* @brief 视频/音频采集首帧,采集首帧是从音频设备或视频设备(如麦克风、摄像头)获取的第一帧数据。
|
|
227
|
-
*
|
|
228
|
-
*/
|
|
229
|
-
VeLiveFirstCaptureFrame = 0,
|
|
230
|
-
/** {zh}
|
|
231
|
-
* @brief 视频渲染首帧,渲染首帧是在渲染过程中在屏幕上显示的第一帧视频数据。
|
|
232
|
-
*
|
|
233
|
-
*/
|
|
234
|
-
VeLiveFirstRenderFrame = 1,
|
|
235
|
-
/** {zh}
|
|
236
|
-
* @brief 视频/音频编码完成首帧,编码完成首帧是编码为某种特定格式的第一帧数据。
|
|
237
|
-
*
|
|
238
|
-
*/
|
|
239
|
-
VeLiveFirstEncodedFrame = 2,
|
|
240
|
-
/** {zh}
|
|
241
|
-
* @brief 视频/音频发送首帧,发送首帧是在发送过程中,通过网络传输的第一帧数据。
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
244
|
-
VeLiveFirstSendFrame = 3,
|
|
245
|
-
/** {zh}
|
|
246
|
-
* @platform ios
|
|
247
|
-
* @brief 录屏采集开始后,获得的第一个 app 音频帧。
|
|
248
|
-
*/
|
|
249
|
-
VeLiveFirstAppAudioCaptureFrame = 4
|
|
250
|
-
}
|
|
251
219
|
/** {zh}
|
|
252
220
|
* @detail keytype
|
|
253
221
|
* @brief 视频采集类型。
|
|
@@ -992,6 +960,38 @@ export declare enum VeLiveAudioChannel {
|
|
|
992
960
|
*/
|
|
993
961
|
VeLiveAudioChannelStereo = 1
|
|
994
962
|
}
|
|
963
|
+
/** {zh}
|
|
964
|
+
* @detail keytype
|
|
965
|
+
* @brief 定义了推流中首帧的类型,包括音视频的采集首帧、渲染首帧、编码完成首帧和发送首帧。
|
|
966
|
+
*
|
|
967
|
+
*/
|
|
968
|
+
export declare enum VeLiveFirstFrameType {
|
|
969
|
+
/** {zh}
|
|
970
|
+
* @brief 视频/音频采集首帧,采集首帧是从音频设备或视频设备(如麦克风、摄像头)获取的第一帧数据。
|
|
971
|
+
*
|
|
972
|
+
*/
|
|
973
|
+
VeLiveFirstCaptureFrame = 0,
|
|
974
|
+
/** {zh}
|
|
975
|
+
* @brief 视频渲染首帧,渲染首帧是在渲染过程中在屏幕上显示的第一帧视频数据。
|
|
976
|
+
*
|
|
977
|
+
*/
|
|
978
|
+
VeLiveFirstRenderFrame = 1,
|
|
979
|
+
/** {zh}
|
|
980
|
+
* @brief 视频/音频编码完成首帧,编码完成首帧是编码为某种特定格式的第一帧数据。
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
VeLiveFirstEncodedFrame = 2,
|
|
984
|
+
/** {zh}
|
|
985
|
+
* @brief 视频/音频发送首帧,发送首帧是在发送过程中,通过网络传输的第一帧数据。
|
|
986
|
+
*
|
|
987
|
+
*/
|
|
988
|
+
VeLiveFirstSendFrame = 3,
|
|
989
|
+
/** {zh}
|
|
990
|
+
* @platform ios
|
|
991
|
+
* @brief 录屏采集开始后,获得的第一个 app 音频帧。
|
|
992
|
+
*/
|
|
993
|
+
VeLiveFirstAppAudioCaptureFrame = 4
|
|
994
|
+
}
|
|
995
995
|
/** {zh}
|
|
996
996
|
* @detail keytype
|
|
997
997
|
* @brief 视频帧来源。
|
|
@@ -1676,12 +1676,6 @@ export declare class t_VeLiveAudioBufferType {
|
|
|
1676
1676
|
static ts_to_ios(value: VeLiveAudioBufferType): $p_i.VeLiveAudioBufferType;
|
|
1677
1677
|
static ios_to_ts(value: $p_i.VeLiveAudioBufferType): VeLiveAudioBufferType;
|
|
1678
1678
|
}
|
|
1679
|
-
export declare class t_VeLiveFirstFrameType {
|
|
1680
|
-
static ts_to_android(value: VeLiveFirstFrameType): $p_a.VeLiveFirstFrameType;
|
|
1681
|
-
static android_to_ts(value: $p_a.VeLiveFirstFrameType): VeLiveFirstFrameType;
|
|
1682
|
-
static ts_to_ios(value: VeLiveFirstFrameType): $p_i.VeLiveFirstFrameType;
|
|
1683
|
-
static ios_to_ts(value: $p_i.VeLiveFirstFrameType): VeLiveFirstFrameType;
|
|
1684
|
-
}
|
|
1685
1679
|
export declare class t_VeLiveVideoCaptureType {
|
|
1686
1680
|
static ts_to_android(value: VeLiveVideoCaptureType): $p_a.VeLiveVideoCaptureType;
|
|
1687
1681
|
static android_to_ts(value: $p_a.VeLiveVideoCaptureType): VeLiveVideoCaptureType;
|
|
@@ -1766,6 +1760,12 @@ export declare class t_VeLiveAudioChannel {
|
|
|
1766
1760
|
static ts_to_ios(value: VeLiveAudioChannel): $p_i.VeLiveAudioChannel;
|
|
1767
1761
|
static ios_to_ts(value: $p_i.VeLiveAudioChannel): VeLiveAudioChannel;
|
|
1768
1762
|
}
|
|
1763
|
+
export declare class t_VeLiveFirstFrameType {
|
|
1764
|
+
static ts_to_android(value: VeLiveFirstFrameType): $p_a.VeLiveFirstFrameType;
|
|
1765
|
+
static android_to_ts(value: $p_a.VeLiveFirstFrameType): VeLiveFirstFrameType;
|
|
1766
|
+
static ts_to_ios(value: VeLiveFirstFrameType): $p_i.VeLiveFirstFrameType;
|
|
1767
|
+
static ios_to_ts(value: $p_i.VeLiveFirstFrameType): VeLiveFirstFrameType;
|
|
1768
|
+
}
|
|
1769
1769
|
export declare class t_VeLiveVideoFrameSource {
|
|
1770
1770
|
static ts_to_android(value: VeLiveVideoFrameSource): $p_a.VeLiveVideoFrameSource;
|
|
1771
1771
|
static android_to_ts(value: $p_a.VeLiveVideoFrameSource): VeLiveVideoFrameSource;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VeLivePusher } from '../../codegen/android';
|
|
2
|
+
export declare class VeLivePushHelper {
|
|
3
|
+
static pusherMap: WeakMap<VeLivePusher, string>;
|
|
4
|
+
static setPusher(viewId: string, pusher: VeLivePusher): void;
|
|
5
|
+
static removePusher(pusher: VeLivePusher): void;
|
|
6
|
+
static setVeLivePusher(viewId: string, pusher: VeLivePusher): void;
|
|
7
|
+
static removeVeLivePusher(viewId: string): void;
|
|
8
|
+
}
|