@volcengine/react-native-live-push 1.1.3-rc.1 → 1.2.0-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 +2 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/ClassHelper.java +9 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +5 -8
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +14 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +410 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +434 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +79 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +165 -0
- package/ios/VeLiveMixerHelper.h +46 -0
- package/ios/VeLiveMixerHelper.m +620 -0
- package/ios/VeLiveMixerView.h +69 -0
- package/ios/VeLiveMixerView.m +600 -0
- package/ios/VeLiveMixerViewManager.m +92 -0
- package/lib/commonjs/index.js +22698 -20359
- package/lib/commonjs/typescript/android/index.d.ts +44 -0
- package/lib/commonjs/typescript/codegen/android/api.d.ts +1068 -0
- package/lib/commonjs/typescript/codegen/android/callback.d.ts +333 -0
- package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +92 -0
- package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
- package/lib/commonjs/typescript/codegen/android/keytype.d.ts +1693 -0
- package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
- package/lib/commonjs/typescript/codegen/ios/api.d.ts +1125 -0
- package/lib/commonjs/typescript/codegen/ios/callback.d.ts +242 -0
- package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +154 -0
- package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
- package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
- package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +1154 -0
- package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
- package/lib/commonjs/typescript/codegen/pack/api.d.ts +1470 -0
- package/lib/commonjs/typescript/codegen/pack/callback.d.ts +446 -0
- package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +109 -0
- package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +2248 -0
- package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
- package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/commonjs/typescript/component.d.ts +15 -0
- package/lib/commonjs/typescript/core/api.d.ts +18 -0
- package/lib/commonjs/typescript/core/callback.d.ts +2 -0
- package/lib/commonjs/typescript/core/env.d.ts +29 -0
- package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
- package/lib/commonjs/typescript/core/index.d.ts +6 -0
- package/lib/commonjs/typescript/core/keytype.d.ts +18 -0
- package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
- package/lib/commonjs/typescript/core/pusher.d.ts +13 -0
- package/lib/commonjs/typescript/index.d.ts +3 -0
- package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
- package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
- package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/commonjs/typescript/runtime.d.ts +1 -0
- package/lib/commonjs/typescript/view/MixView.d.ts +52 -0
- package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
- package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
- package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
- package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
- package/lib/commonjs/typescript/view/index.d.ts +5 -0
- package/lib/module/index.js +22695 -20360
- package/lib/module/typescript/android/index.d.ts +44 -0
- package/lib/module/typescript/codegen/android/api.d.ts +1068 -0
- package/lib/module/typescript/codegen/android/callback.d.ts +333 -0
- package/lib/module/typescript/codegen/android/errorcode.d.ts +92 -0
- package/lib/module/typescript/codegen/android/index.d.ts +5 -0
- package/lib/module/typescript/codegen/android/keytype.d.ts +1693 -0
- package/lib/module/typescript/codegen/android/types.d.ts +33 -0
- package/lib/module/typescript/codegen/ios/api.d.ts +1125 -0
- package/lib/module/typescript/codegen/ios/callback.d.ts +242 -0
- package/lib/module/typescript/codegen/ios/errorcode.d.ts +154 -0
- package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
- package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
- package/lib/module/typescript/codegen/ios/keytype.d.ts +1154 -0
- package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
- package/lib/module/typescript/codegen/pack/api.d.ts +1470 -0
- package/lib/module/typescript/codegen/pack/callback.d.ts +446 -0
- package/lib/module/typescript/codegen/pack/errorcode.d.ts +109 -0
- package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/module/typescript/codegen/pack/keytype.d.ts +2248 -0
- package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
- package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/module/typescript/component.d.ts +15 -0
- package/lib/module/typescript/core/api.d.ts +18 -0
- package/lib/module/typescript/core/callback.d.ts +2 -0
- package/lib/module/typescript/core/env.d.ts +29 -0
- package/lib/module/typescript/core/errorcode.d.ts +2 -0
- package/lib/module/typescript/core/index.d.ts +6 -0
- package/lib/module/typescript/core/keytype.d.ts +18 -0
- package/lib/module/typescript/core/mixer.d.ts +26 -0
- package/lib/module/typescript/core/pusher.d.ts +13 -0
- package/lib/module/typescript/index.d.ts +3 -0
- package/lib/module/typescript/ios/extends.d.ts +41 -0
- package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
- package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
- package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
- package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/module/typescript/runtime.d.ts +1 -0
- package/lib/module/typescript/view/MixView.d.ts +52 -0
- package/lib/module/typescript/view/VeImageView.d.ts +19 -0
- package/lib/module/typescript/view/VeTextView.d.ts +7 -0
- package/lib/module/typescript/view/VeView.d.ts +7 -0
- package/lib/module/typescript/view/VeWebView.d.ts +7 -0
- package/lib/module/typescript/view/index.d.ts +5 -0
- package/lib/typescript/android/index.d.ts +0 -3
- package/lib/typescript/codegen/android/api.d.ts +194 -762
- package/lib/typescript/codegen/android/callback.d.ts +85 -48
- package/lib/typescript/codegen/android/errorcode.d.ts +30 -0
- package/lib/typescript/codegen/android/keytype.d.ts +514 -122
- package/lib/typescript/codegen/ios/api.d.ts +380 -351
- package/lib/typescript/codegen/ios/callback.d.ts +33 -6
- package/lib/typescript/codegen/ios/errorcode.d.ts +52 -2
- package/lib/typescript/codegen/ios/keytype.d.ts +313 -35
- package/lib/typescript/codegen/pack/api.d.ts +302 -821
- package/lib/typescript/codegen/pack/callback.d.ts +54 -49
- package/lib/typescript/codegen/pack/errorcode.d.ts +38 -5
- package/lib/typescript/codegen/pack/keytype.d.ts +672 -228
- package/lib/typescript/core/api.d.ts +18 -2
- package/lib/typescript/core/keytype.d.ts +16 -0
- package/lib/typescript/core/mixer.d.ts +26 -0
- package/lib/typescript/core/pusher.d.ts +0 -3
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/typescript/view/MixView.d.ts +52 -0
- package/lib/typescript/view/VeImageView.d.ts +19 -0
- package/lib/typescript/view/VeTextView.d.ts +7 -0
- package/lib/typescript/view/VeView.d.ts +7 -0
- package/lib/typescript/view/VeWebView.d.ts +7 -0
- package/lib/typescript/view/index.d.ts +5 -0
- package/package.json +1 -1
- package/react-native-velive-push.podspec +3 -3
- package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +0 -73
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { VeLiveVideoFrame, VeLiveAudioFrame } from './
|
|
1
|
+
import { VeLiveVideoFrame, VeLiveVideoFrameSource, VeLiveAudioFrameSource, VeLiveAudioFrame, VeLivePusherStatus, VeLiveFirstFrameType, VeLiveNetworkQuality, VeLiveAudioPowerLevel, VeLivePusherStatistics } from './keytype';
|
|
2
2
|
import { int, String, Bundle, long, Bitmap, float, JSONObject } from './types';
|
|
3
|
-
import { VeLiveVideoFrameSource, VeLiveAudioFrameSource, VeLivePusherStatus, VeLiveFirstFrameType, VeLiveNetworkQuality, VeLiveAudioPowerLevel, VeLivePusherStatistics } from './keytype';
|
|
4
3
|
export declare class VeLiveVideoFrameFilter {
|
|
5
4
|
/** {zh}
|
|
6
5
|
* @detail callback
|
|
7
6
|
* @brief 自定义的视频处理方法。
|
|
8
|
-
* @
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @param dstFrame 处理后的视频帧,详情请参见 [VeLiveVideoFrame](147517#VeLiveVideoFrame)。
|
|
7
|
+
* @order 20
|
|
8
|
+
* @param srcFrame 源视频帧,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
9
|
+
* @param dstFrame 处理后的视频帧,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
10
|
+
* @return - 0:处理成功;
|
|
11
|
+
* - <0:处理失败,该帧会被 SDK 丢弃;
|
|
12
|
+
* - >0:处理失败,该帧会被 SDK 继续传递到编码器。
|
|
15
13
|
*
|
|
16
14
|
*/
|
|
15
|
+
|
|
17
16
|
onVideoProcess?(srcFrame: VeLiveVideoFrame, dstFrame: VeLiveVideoFrame): int;
|
|
18
17
|
}
|
|
19
18
|
export declare class VeLiveVideoFrameListener {
|
|
20
19
|
/** {zh}
|
|
21
20
|
* @detail callback
|
|
22
21
|
* @brief 设置当前 Listener 需要的视频帧来源。
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
22
|
+
* @order 30
|
|
23
|
+
* @return 您所要订阅的视频数据的位置信息,详情请参见 [VeLiveVideoFrameSource](147521#VeLivePusherDef-VeLiveVideoFrameSource)。
|
|
25
24
|
*
|
|
26
25
|
*/
|
|
26
|
+
|
|
27
27
|
getObservedVideoFrameSource?(): VeLiveVideoFrameSource;
|
|
28
28
|
/** {zh}
|
|
29
29
|
* @detail callback
|
|
30
|
-
* @brief 采集视频帧回调。只有当您通过 getObservedVideoFrameSource
|
|
31
|
-
* @order
|
|
32
|
-
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](
|
|
30
|
+
* @brief 采集视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourceCapture` 时,才会触发该回调。
|
|
31
|
+
* @order 26
|
|
32
|
+
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](#VeLivePusherDef-VeLiveVideoFrameFilter)。
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
|
+
|
|
35
36
|
onCaptureVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
36
37
|
/** {zh}
|
|
37
38
|
* @detail callback
|
|
38
|
-
* @brief 编码前视频帧回调。只有当您通过 getObservedVideoFrameSource
|
|
39
|
-
* @order
|
|
40
|
-
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](
|
|
39
|
+
* @brief 编码前视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourcePreEncode` 时,才会触发该回调。
|
|
40
|
+
* @order 27
|
|
41
|
+
* @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
41
42
|
*
|
|
42
43
|
*/
|
|
44
|
+
|
|
43
45
|
onPreEncodeVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
44
46
|
}
|
|
45
47
|
export declare class VeLiveVideoEffectCallback {
|
|
@@ -48,79 +50,96 @@ export declare class VeLiveVideoEffectCallback {
|
|
|
48
50
|
* @brief 视频特效处理结果回调。
|
|
49
51
|
* @param result 处理结果
|
|
50
52
|
* @param msg 消息
|
|
53
|
+
* @order 6
|
|
51
54
|
*
|
|
52
55
|
*/
|
|
56
|
+
|
|
53
57
|
onResult?(result: int, msg: String): void;
|
|
54
58
|
}
|
|
55
59
|
export declare class VeLiveMediaPlayerListener {
|
|
56
60
|
/** {zh}
|
|
57
61
|
* @detail callback
|
|
58
62
|
* @brief 开始播放的回调。
|
|
63
|
+
* @order 7
|
|
59
64
|
*
|
|
60
65
|
*/
|
|
66
|
+
|
|
61
67
|
onStart?(info: Bundle): void;
|
|
62
68
|
/** {zh}
|
|
63
69
|
* @detail callback
|
|
64
70
|
* @brief 播放进度的回调,每 100ms 触发一次。
|
|
65
71
|
* @param timeMs 播放进度,单位为 ms。
|
|
72
|
+
* @order 8
|
|
66
73
|
*
|
|
67
74
|
*/
|
|
75
|
+
|
|
68
76
|
onProgress?(timeMs: long): void;
|
|
69
77
|
/** {zh}
|
|
70
78
|
* @detail callback
|
|
71
79
|
* @brief 停止播放的回调。
|
|
80
|
+
* @order 9
|
|
72
81
|
*
|
|
73
82
|
*/
|
|
83
|
+
|
|
74
84
|
onStop?(): void;
|
|
75
85
|
/** {zh}
|
|
76
86
|
* @detail callback
|
|
77
87
|
* @brief 返错误状态的回调。
|
|
78
88
|
* @param code 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
|
|
79
89
|
* @param msg 错误消息。
|
|
90
|
+
* @order 10
|
|
80
91
|
*
|
|
81
92
|
*/
|
|
93
|
+
|
|
82
94
|
onError?(code: int, msg: String): void;
|
|
83
95
|
}
|
|
84
96
|
export declare class VeLiveAudioFrameListener {
|
|
85
97
|
/** {zh}
|
|
86
98
|
* @detail callback
|
|
87
99
|
* @brief 设置当前 Listener 需要的音频帧来源。
|
|
88
|
-
* @
|
|
89
|
-
* @
|
|
100
|
+
* @order 31
|
|
101
|
+
* @return 订阅的音频帧位置信息,详情请参见 [VeLiveAudioFrameSource](147521#VeLivePusherDef-VeLiveAudioFrameSource)。
|
|
90
102
|
*
|
|
91
103
|
*/
|
|
104
|
+
|
|
92
105
|
getObservedAudioFrameSource?(): VeLiveAudioFrameSource;
|
|
93
106
|
/** {zh}
|
|
94
107
|
* @detail callback
|
|
95
|
-
* @brief 采集音频帧回调。只有当您通过 getObservedAudioFrameSource
|
|
96
|
-
* @order
|
|
97
|
-
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](
|
|
108
|
+
* @brief 采集音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourceCapture` 时,才会触发该回调。
|
|
109
|
+
* @order 28
|
|
110
|
+
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
98
111
|
*
|
|
99
112
|
*/
|
|
113
|
+
|
|
100
114
|
onCaptureAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
101
115
|
/** {zh}
|
|
102
116
|
* @detail callback
|
|
103
|
-
* @brief 编码前音频帧回调。只有当您通过 getObservedAudioFrameSource
|
|
104
|
-
* @order
|
|
105
|
-
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](
|
|
117
|
+
* @brief 编码前音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourcePreEncode` 时,才会触发该回调。
|
|
118
|
+
* @order 29
|
|
119
|
+
* @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
106
120
|
*
|
|
107
121
|
*/
|
|
122
|
+
|
|
108
123
|
onPreEncodeAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
109
124
|
}
|
|
110
125
|
export declare class VeLiveMediaPlayerFrameListener {
|
|
111
126
|
/** {zh}
|
|
112
127
|
* @detail callback
|
|
113
128
|
* @brief 播放器音频帧回调。
|
|
114
|
-
* @param frame 音频帧,详情请参见 [VeLiveAudioFrame](
|
|
129
|
+
* @param frame 音频帧,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
130
|
+
* @order 11
|
|
115
131
|
*
|
|
116
132
|
*/
|
|
133
|
+
|
|
117
134
|
onAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
118
135
|
/** {zh}
|
|
119
136
|
* @detail callback
|
|
120
137
|
* @brief 播放器视频帧回调。当完成一个新的视频帧的解码后,触发该回调。
|
|
121
|
-
* @param frame 视频帧数据,包含了帧的时间戳和格式等信息,详情请参见 [VeLiveVideoFrame](
|
|
138
|
+
* @param frame 视频帧数据,包含了帧的时间戳和格式等信息,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
|
|
139
|
+
* @order 12
|
|
122
140
|
*
|
|
123
141
|
*/
|
|
142
|
+
|
|
124
143
|
onVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
125
144
|
}
|
|
126
145
|
export declare class VeLiveSnapshotListener {
|
|
@@ -129,23 +148,25 @@ export declare class VeLiveSnapshotListener {
|
|
|
129
148
|
* @brief 截图成功回调。
|
|
130
149
|
* @notes <br>
|
|
131
150
|
* 调用 snapshot{@link #VeLivePusher#snapshot} 截图成功后,会收到这个回调。
|
|
132
|
-
* @order
|
|
151
|
+
* @order 19
|
|
133
152
|
* @param image 视频的截图。
|
|
134
153
|
*
|
|
135
154
|
*/
|
|
155
|
+
|
|
136
156
|
onSnapshotComplete?(image: Bitmap): void;
|
|
137
157
|
}
|
|
138
158
|
export declare class VeLiveAudioFrameFilter {
|
|
139
159
|
/** {zh}
|
|
140
160
|
* @detail callback
|
|
141
161
|
* @brief 自定义的音频处理方法。
|
|
142
|
-
* @order
|
|
143
|
-
* @param srcFrame 源音频帧,详情请参见 [VeLiveAudioFrame](
|
|
144
|
-
* @param dstFrame 处理后的音频帧,详情请参见 [VeLiveAudioFrame](
|
|
162
|
+
* @order 21
|
|
163
|
+
* @param srcFrame 源音频帧,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
164
|
+
* @param dstFrame 处理后的音频帧,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
|
|
145
165
|
* - 0:处理成功;
|
|
146
166
|
* - ≠0:处理失败,该帧会被 SDK 继续传递到编码器;
|
|
147
167
|
*
|
|
148
168
|
*/
|
|
169
|
+
|
|
149
170
|
onAudioProcess?(srcFrame: VeLiveAudioFrame, dstFrame: VeLiveAudioFrame): int;
|
|
150
171
|
}
|
|
151
172
|
export declare class VeLivePusherObserver {
|
|
@@ -158,32 +179,36 @@ export declare class VeLivePusherObserver {
|
|
|
158
179
|
* @param msg 错误信息。
|
|
159
180
|
*
|
|
160
181
|
*/
|
|
182
|
+
|
|
161
183
|
onError?(code: int, subCode: int, msg: String): void;
|
|
162
184
|
/** {zh}
|
|
163
185
|
* @detail callback
|
|
164
186
|
* @brief 推流状态变化回调。
|
|
165
|
-
* @order
|
|
187
|
+
* @order 16
|
|
166
188
|
* @param status 变化后的推流状态。详情请参见 [VeLivePusherStatus](147521#VeLivePusherStatus)。
|
|
167
189
|
*
|
|
168
190
|
*/
|
|
191
|
+
|
|
169
192
|
onStatusChange?(status: VeLivePusherStatus): void;
|
|
170
193
|
/** {zh}
|
|
171
194
|
* @detail callback
|
|
172
195
|
* @brief 首帧视频回调,当推流器发送出第一帧视频时,触发该回调。
|
|
173
|
-
* @order
|
|
196
|
+
* @order 2
|
|
174
197
|
* @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
|
|
175
198
|
* @param timestampMs 时间戳,单位为 ms。
|
|
176
199
|
*
|
|
177
200
|
*/
|
|
201
|
+
|
|
178
202
|
onFirstVideoFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
|
|
179
203
|
/** {zh}
|
|
180
204
|
* @detail callback
|
|
181
205
|
* @brief 首帧音频回调,当推流器发送出第一帧音频时,触发该回调。
|
|
182
|
-
* @order
|
|
206
|
+
* @order 3
|
|
183
207
|
* @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
|
|
184
208
|
* @param timestampMs 时间戳,单位为 ms。
|
|
185
209
|
*
|
|
186
210
|
*/
|
|
211
|
+
|
|
187
212
|
onFirstAudioFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
|
|
188
213
|
/** {zh}
|
|
189
214
|
* @detail callback
|
|
@@ -191,9 +216,10 @@ export declare class VeLivePusherObserver {
|
|
|
191
216
|
* @param open 摄像头的新状态是否为开启。<br>
|
|
192
217
|
* - true:摄像头开启;
|
|
193
218
|
* - false:摄像头关闭。
|
|
194
|
-
* @order
|
|
219
|
+
* @order 4
|
|
195
220
|
*
|
|
196
221
|
*/
|
|
222
|
+
|
|
197
223
|
onCameraOpened?(open: boolean): void;
|
|
198
224
|
/** {zh}
|
|
199
225
|
* @detail callback
|
|
@@ -201,9 +227,10 @@ export declare class VeLivePusherObserver {
|
|
|
201
227
|
* @param open 麦克风的新状态是否为开启。<br>
|
|
202
228
|
* - true:麦克风开启;
|
|
203
229
|
* - false:麦克风关闭。
|
|
204
|
-
* @order
|
|
230
|
+
* @order 5
|
|
205
231
|
*
|
|
206
232
|
*/
|
|
233
|
+
|
|
207
234
|
onMicrophoneOpened?(open: boolean): void;
|
|
208
235
|
/** {zh}
|
|
209
236
|
* @detail callback
|
|
@@ -211,25 +238,27 @@ export declare class VeLivePusherObserver {
|
|
|
211
238
|
* @param open 屏幕采集的新状态是否为开启。<br>
|
|
212
239
|
* - true:屏幕采集开启;
|
|
213
240
|
* - false:屏幕采集关闭。
|
|
214
|
-
* @order
|
|
241
|
+
* @order 14
|
|
215
242
|
*
|
|
216
243
|
*/
|
|
244
|
+
|
|
217
245
|
onScreenRecording?(open: boolean): void;
|
|
218
246
|
/** {zh}
|
|
219
247
|
* @detail callback
|
|
220
248
|
* @brief 网络质量状态回调,当推流器检测到网络质量发生变化时,触发该回调。
|
|
221
|
-
* @order
|
|
249
|
+
* @order 17
|
|
222
250
|
* @param quality 变化后的网络质量。详情请参见 [VeLiveNetworkQuality](147521#VeLiveNetworkQuality)。
|
|
223
251
|
*
|
|
224
252
|
*/
|
|
253
|
+
|
|
225
254
|
onNetworkQuality?(quality: VeLiveNetworkQuality): void;
|
|
226
255
|
/** {zh}
|
|
227
256
|
* @detail callback
|
|
228
257
|
* @brief 音量等级回调,当推流器的音频音量等级发生变化时,触发该回调。
|
|
229
|
-
* @order
|
|
258
|
+
* @order 15
|
|
230
259
|
* @param level 变化后的音量等级。详情请参见 [VeLiveAudioPowerLevel](147521#VeLiveAudioPowerLevel)。
|
|
231
|
-
* @param value 当前音量的分贝值(dB
|
|
232
|
-
* -
|
|
260
|
+
* @param value 当前音量的分贝值(dB)。<br/>
|
|
261
|
+
* - \\-1 表示当前没有获取到对应的音量分贝值。
|
|
233
262
|
* - 分贝数小于 1,对应 VeLiveAudioPowerLevelSilent 级别
|
|
234
263
|
* - 分贝数大于 1 小于等于 15,对应 VeLiveAudioPowerLevelQuiet 级别
|
|
235
264
|
* - 分贝数大于 15 小于等于 30,对应 VeLiveAudioPowerLevelLight 级别
|
|
@@ -238,24 +267,27 @@ export declare class VeLivePusherObserver {
|
|
|
238
267
|
* - 分贝数大于 85,对应 VeLiveAudioPowerLevelNoisy 级别
|
|
239
268
|
*
|
|
240
269
|
*/
|
|
270
|
+
|
|
241
271
|
onAudioPowerQuality?(level: VeLiveAudioPowerLevel, value: float): void;
|
|
242
272
|
}
|
|
243
273
|
export declare class VeLivePusherStatisticsObserver {
|
|
244
274
|
/** {zh}
|
|
245
275
|
* @detail callback
|
|
246
|
-
* @brief
|
|
247
|
-
* @order
|
|
248
|
-
* @param statistics
|
|
276
|
+
* @brief 推流周期性统计信息回调,每 5s 回调一次,您可以调用 [setStatisticsObserver](147517#VeLivePusher-setstatisticsobserver) 修改回调时间间隔。
|
|
277
|
+
* @order 18
|
|
278
|
+
* @param statistics 周期性统计信息,详情请参见 [VeLivePusherStatistics](147521#VeLivePusherDef-VeLivePusherStatistics)。
|
|
249
279
|
*
|
|
250
280
|
*/
|
|
281
|
+
|
|
251
282
|
onStatistics?(statistics: VeLivePusherStatistics): void;
|
|
252
283
|
/** {zh}
|
|
253
284
|
* @detail callback
|
|
254
285
|
* @brief 周期性日志信息回调。
|
|
255
|
-
* @order
|
|
286
|
+
* @order 25
|
|
256
287
|
* @param logInfo 周期性日志信息。
|
|
257
288
|
*
|
|
258
289
|
*/
|
|
290
|
+
|
|
259
291
|
onLogMonitor?(logInfo: JSONObject): void;
|
|
260
292
|
}
|
|
261
293
|
export declare class VeLivePusherDef {
|
|
@@ -264,25 +296,28 @@ export declare class VeLiveFileRecordingListener {
|
|
|
264
296
|
/** {zh}
|
|
265
297
|
* @detail callback
|
|
266
298
|
* @brief 直播录制开始回调。
|
|
267
|
-
* @order
|
|
299
|
+
* @order 22
|
|
268
300
|
*
|
|
269
301
|
*/
|
|
302
|
+
|
|
270
303
|
onFileRecordingStarted?(): void;
|
|
271
304
|
/** {zh}
|
|
272
305
|
* @detail callback
|
|
273
306
|
* @brief 直播录制停止回调。
|
|
274
|
-
* @order
|
|
307
|
+
* @order 23
|
|
275
308
|
*
|
|
276
309
|
*/
|
|
310
|
+
|
|
277
311
|
onFileRecordingStopped?(): void;
|
|
278
312
|
/** {zh}
|
|
279
313
|
* @detail callback
|
|
280
314
|
* @brief 直播录制错误回调。
|
|
281
|
-
* @order
|
|
315
|
+
* @order 24
|
|
282
316
|
* @param errorCode 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
|
|
283
317
|
* @param message 错误信息。
|
|
284
318
|
*
|
|
285
319
|
*/
|
|
320
|
+
|
|
286
321
|
onFileRecordingError?(errorCode: int, message: String): void;
|
|
287
322
|
}
|
|
288
323
|
export declare class VeLiveVideoEffectHandleCallback {
|
|
@@ -290,7 +325,9 @@ export declare class VeLiveVideoEffectHandleCallback {
|
|
|
290
325
|
* @detail callback
|
|
291
326
|
* @brief 视频特效对象回调,调用 [setAdvancedFeature](147517#VeLiveVideoEffectManager-setadvancedfeature) 接口时触发此回调,如需使用请联系[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
292
327
|
* @param handle 视频特效对象。
|
|
328
|
+
* @order 13
|
|
293
329
|
*
|
|
294
330
|
*/
|
|
331
|
+
|
|
295
332
|
onEffectHandle?(handle: Object): void;
|
|
296
333
|
}
|
|
@@ -3,60 +3,90 @@ export declare enum VeLivePusherErrorCode {
|
|
|
3
3
|
* @brief 无错误。
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
VeLivePusherSuccess = 0,
|
|
7
8
|
/** {zh}
|
|
8
9
|
* @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
|
|
9
10
|
*
|
|
10
11
|
*/
|
|
12
|
+
|
|
11
13
|
VeLivePusherInvalidLicense = -1,
|
|
12
14
|
/** {zh}
|
|
13
15
|
* @brief 参数错误,请检查入参,并重新调用。
|
|
14
16
|
*
|
|
15
17
|
*/
|
|
18
|
+
|
|
16
19
|
VeLivePusherInvalidParameter = -2,
|
|
17
20
|
/** {zh}
|
|
18
21
|
* @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
|
|
19
22
|
*
|
|
20
23
|
*/
|
|
24
|
+
|
|
21
25
|
VeLivePusherVideoCaptureError = -3,
|
|
22
26
|
/** {zh}
|
|
23
27
|
* @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
|
|
24
28
|
*
|
|
25
29
|
*/
|
|
30
|
+
|
|
26
31
|
VeLivePusherAudioCaptureError = -4,
|
|
27
32
|
/** {zh}
|
|
28
33
|
* @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
29
34
|
*
|
|
30
35
|
*/
|
|
36
|
+
|
|
31
37
|
VeLivePusherVideoEncoderError = -5,
|
|
32
38
|
/** {zh}
|
|
33
39
|
* @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
34
40
|
*
|
|
35
41
|
*/
|
|
42
|
+
|
|
36
43
|
VeLivePusherAudioEncoderError = -6,
|
|
37
44
|
/** {zh}
|
|
38
45
|
* @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
39
46
|
*
|
|
40
47
|
*/
|
|
48
|
+
|
|
41
49
|
VeLivePusherTransportError = -7,
|
|
42
50
|
/** {zh}
|
|
43
51
|
* @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
44
52
|
*
|
|
45
53
|
*/
|
|
54
|
+
|
|
46
55
|
VeLivePusherVideoEffectError = -8,
|
|
47
56
|
/** {zh}
|
|
48
57
|
* @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
49
58
|
*
|
|
50
59
|
*/
|
|
60
|
+
|
|
51
61
|
VeLivePusherAudioDeviceError = -9,
|
|
52
62
|
/** {zh}
|
|
53
63
|
* @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
|
|
54
64
|
*
|
|
55
65
|
*/
|
|
66
|
+
|
|
56
67
|
VeLivePusherLicenseUnsupportedH265 = -10,
|
|
68
|
+
/** {zh}
|
|
69
|
+
* @brief 当前系统版本不支持屏幕采集功能
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
VeLivePusherScreenCaptureNotSupportError = -11,
|
|
74
|
+
/** {zh}
|
|
75
|
+
* @brief 屏幕采集权限的获取被用户拒绝
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
VeLivePusherScreenCaptureStartError = -12,
|
|
80
|
+
/** {zh}
|
|
81
|
+
* @brief 屏幕采集被系统中断,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
VeLivePusherScreenCaptureInterruptedError = -13,
|
|
57
86
|
/** {zh}
|
|
58
87
|
* @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
|
|
59
88
|
*
|
|
60
89
|
*/
|
|
90
|
+
|
|
61
91
|
VeLivePusherError = -100
|
|
62
92
|
}
|