@volcengine/react-native-live-push 1.1.3-rc.0 → 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.
Files changed (139) hide show
  1. package/android/build.gradle +2 -2
  2. package/android/src/main/java/com/volcengine/velive/rn/push/ClassHelper.java +9 -0
  3. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +5 -8
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +14 -2
  5. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
  6. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
  8. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +410 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +434 -0
  10. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +79 -0
  11. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
  12. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +165 -0
  13. package/ios/VeLiveMixerHelper.h +46 -0
  14. package/ios/VeLiveMixerHelper.m +620 -0
  15. package/ios/VeLiveMixerView.h +69 -0
  16. package/ios/VeLiveMixerView.m +600 -0
  17. package/ios/VeLiveMixerViewManager.m +92 -0
  18. package/lib/commonjs/index.js +22698 -20359
  19. package/lib/commonjs/typescript/android/index.d.ts +44 -0
  20. package/lib/commonjs/typescript/codegen/android/api.d.ts +1068 -0
  21. package/lib/commonjs/typescript/codegen/android/callback.d.ts +333 -0
  22. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +92 -0
  23. package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
  24. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +1693 -0
  25. package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
  26. package/lib/commonjs/typescript/codegen/ios/api.d.ts +1125 -0
  27. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +242 -0
  28. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +154 -0
  29. package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
  30. package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
  31. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +1154 -0
  32. package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
  33. package/lib/commonjs/typescript/codegen/pack/api.d.ts +1470 -0
  34. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +446 -0
  35. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +109 -0
  36. package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
  37. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +2248 -0
  38. package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
  39. package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
  40. package/lib/commonjs/typescript/component.d.ts +15 -0
  41. package/lib/commonjs/typescript/core/api.d.ts +18 -0
  42. package/lib/commonjs/typescript/core/callback.d.ts +2 -0
  43. package/lib/commonjs/typescript/core/env.d.ts +29 -0
  44. package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
  45. package/lib/commonjs/typescript/core/index.d.ts +6 -0
  46. package/lib/commonjs/typescript/core/keytype.d.ts +18 -0
  47. package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
  48. package/lib/commonjs/typescript/core/pusher.d.ts +13 -0
  49. package/lib/commonjs/typescript/index.d.ts +3 -0
  50. package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
  51. package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
  52. package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
  53. package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
  54. package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
  55. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
  56. package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
  57. package/lib/commonjs/typescript/runtime.d.ts +1 -0
  58. package/lib/commonjs/typescript/view/MixView.d.ts +52 -0
  59. package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
  60. package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
  61. package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
  62. package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
  63. package/lib/commonjs/typescript/view/index.d.ts +5 -0
  64. package/lib/module/index.js +22695 -20360
  65. package/lib/module/typescript/android/index.d.ts +44 -0
  66. package/lib/module/typescript/codegen/android/api.d.ts +1068 -0
  67. package/lib/module/typescript/codegen/android/callback.d.ts +333 -0
  68. package/lib/module/typescript/codegen/android/errorcode.d.ts +92 -0
  69. package/lib/module/typescript/codegen/android/index.d.ts +5 -0
  70. package/lib/module/typescript/codegen/android/keytype.d.ts +1693 -0
  71. package/lib/module/typescript/codegen/android/types.d.ts +33 -0
  72. package/lib/module/typescript/codegen/ios/api.d.ts +1125 -0
  73. package/lib/module/typescript/codegen/ios/callback.d.ts +242 -0
  74. package/lib/module/typescript/codegen/ios/errorcode.d.ts +154 -0
  75. package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
  76. package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
  77. package/lib/module/typescript/codegen/ios/keytype.d.ts +1154 -0
  78. package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
  79. package/lib/module/typescript/codegen/pack/api.d.ts +1470 -0
  80. package/lib/module/typescript/codegen/pack/callback.d.ts +446 -0
  81. package/lib/module/typescript/codegen/pack/errorcode.d.ts +109 -0
  82. package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
  83. package/lib/module/typescript/codegen/pack/keytype.d.ts +2248 -0
  84. package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
  85. package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
  86. package/lib/module/typescript/component.d.ts +15 -0
  87. package/lib/module/typescript/core/api.d.ts +18 -0
  88. package/lib/module/typescript/core/callback.d.ts +2 -0
  89. package/lib/module/typescript/core/env.d.ts +29 -0
  90. package/lib/module/typescript/core/errorcode.d.ts +2 -0
  91. package/lib/module/typescript/core/index.d.ts +6 -0
  92. package/lib/module/typescript/core/keytype.d.ts +18 -0
  93. package/lib/module/typescript/core/mixer.d.ts +26 -0
  94. package/lib/module/typescript/core/pusher.d.ts +13 -0
  95. package/lib/module/typescript/index.d.ts +3 -0
  96. package/lib/module/typescript/ios/extends.d.ts +41 -0
  97. package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
  98. package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
  99. package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
  100. package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
  101. package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
  102. package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
  103. package/lib/module/typescript/runtime.d.ts +1 -0
  104. package/lib/module/typescript/view/MixView.d.ts +52 -0
  105. package/lib/module/typescript/view/VeImageView.d.ts +19 -0
  106. package/lib/module/typescript/view/VeTextView.d.ts +7 -0
  107. package/lib/module/typescript/view/VeView.d.ts +7 -0
  108. package/lib/module/typescript/view/VeWebView.d.ts +7 -0
  109. package/lib/module/typescript/view/index.d.ts +5 -0
  110. package/lib/typescript/android/index.d.ts +0 -3
  111. package/lib/typescript/codegen/android/api.d.ts +194 -762
  112. package/lib/typescript/codegen/android/callback.d.ts +85 -48
  113. package/lib/typescript/codegen/android/errorcode.d.ts +30 -0
  114. package/lib/typescript/codegen/android/keytype.d.ts +514 -122
  115. package/lib/typescript/codegen/ios/api.d.ts +380 -351
  116. package/lib/typescript/codegen/ios/callback.d.ts +33 -6
  117. package/lib/typescript/codegen/ios/errorcode.d.ts +52 -2
  118. package/lib/typescript/codegen/ios/keytype.d.ts +313 -35
  119. package/lib/typescript/codegen/pack/api.d.ts +302 -821
  120. package/lib/typescript/codegen/pack/callback.d.ts +54 -49
  121. package/lib/typescript/codegen/pack/errorcode.d.ts +38 -5
  122. package/lib/typescript/codegen/pack/keytype.d.ts +672 -228
  123. package/lib/typescript/core/api.d.ts +18 -2
  124. package/lib/typescript/core/keytype.d.ts +16 -0
  125. package/lib/typescript/core/mixer.d.ts +26 -0
  126. package/lib/typescript/core/pusher.d.ts +0 -3
  127. package/lib/typescript/index.d.ts +1 -0
  128. package/lib/typescript/platforms/android/extends.d.ts +8 -0
  129. package/lib/typescript/platforms/android/mixer.d.ts +8 -0
  130. package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
  131. package/lib/typescript/view/MixView.d.ts +52 -0
  132. package/lib/typescript/view/VeImageView.d.ts +19 -0
  133. package/lib/typescript/view/VeTextView.d.ts +7 -0
  134. package/lib/typescript/view/VeView.d.ts +7 -0
  135. package/lib/typescript/view/VeWebView.d.ts +7 -0
  136. package/lib/typescript/view/index.d.ts +5 -0
  137. package/package.json +1 -1
  138. package/react-native-velive-push.podspec +3 -3
  139. package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +0 -73
@@ -0,0 +1,446 @@
1
+ import * as $p_a from '../android/index';
2
+ import * as $p_i from '../ios/index';
3
+ import { VeLiveVideoFrame, VeLiveAudioFrame, VeLivePusherStatus, VeLiveFirstFrameType, VeLiveNetworkQuality, VeLiveAudioPowerLevel, VeLivePusherStatistics } from './keytype';
4
+ import { int, Bitmap, NSString, BOOL, JSONObject, NSDictionary } from './types';
5
+ /** {zh}
6
+ * @detail callback
7
+ * @brief 自定义的视频处理回调。
8
+ *
9
+ */
10
+ export interface VeLiveVideoFrameFilter {
11
+ }
12
+ /** {zh}
13
+ * @detail callback
14
+ * @brief 视频帧订阅回调。
15
+ *
16
+ */
17
+ export interface VeLiveVideoFrameListener {
18
+ /** {zh}
19
+ * @detail callback
20
+ * @brief 采集视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourceCapture` 时,才会触发该回调。
21
+ * @order 26
22
+ * @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](#VeLivePusherDef-VeLiveVideoFrameFilter)。
23
+ *
24
+ */
25
+
26
+ onCaptureVideoFrame?(frame: VeLiveVideoFrame): void;
27
+ /** {zh}
28
+ * @detail callback
29
+ * @brief 编码前视频帧回调。只有当您通过 [getObservedVideoFrameSource](#VeLiveVideoFrameListener-getobservedvideoframesource) 返回 `VeLiveVideoFrameSourcePreEncode` 时,才会触发该回调。
30
+ * @order 27
31
+ * @param frame 视频帧数据,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
32
+ *
33
+ */
34
+
35
+ onPreEncodeVideoFrame?(frame: VeLiveVideoFrame): void;
36
+ }
37
+ /** {zh}
38
+ * @detail callback
39
+ * @brief 播放器播放回调。通过该回调,您可以获取与播放相关的事件和通知。
40
+ *
41
+ */
42
+ export interface VeLiveMediaPlayerListener {
43
+ /** {zh}
44
+ * @detail callback
45
+ * @brief 开始播放的回调。
46
+ * @order 7
47
+ *
48
+ */
49
+
50
+ onStart?(): void;
51
+ /** {zh}
52
+ * @detail callback
53
+ * @brief 播放进度的回调,每 100ms 触发一次。
54
+ * @param timeMs 播放进度,单位为 ms。
55
+ * @order 8
56
+ *
57
+ */
58
+
59
+ onProgress?(timeMs: number): void;
60
+ /** {zh}
61
+ * @detail callback
62
+ * @brief 停止播放的回调。
63
+ * @order 9
64
+ *
65
+ */
66
+
67
+ onStop?(): void;
68
+ /** {zh}
69
+ * @detail callback
70
+ * @brief 返错误状态的回调。
71
+ * @param code 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
72
+ * @param msg 错误消息。
73
+ * @order 10
74
+ *
75
+ */
76
+
77
+ onError?(error: number): void;
78
+ }
79
+ /** {zh}
80
+ * @detail callback
81
+ * @brief 音频帧订阅回调。
82
+ *
83
+ */
84
+ export interface VeLiveAudioFrameListener {
85
+ /** {zh}
86
+ * @detail callback
87
+ * @brief 采集音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourceCapture` 时,才会触发该回调。
88
+ * @order 28
89
+ * @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
90
+ *
91
+ */
92
+
93
+ onCaptureAudioFrame?(frame: VeLiveAudioFrame): void;
94
+ /** {zh}
95
+ * @detail callback
96
+ * @brief 编码前音频帧回调。只有当您通过 [getObservedAudioFrameSource](#VeLiveAudioFrameListener-getobservedaudioframesource) 返回 `VeLiveAudioFrameSourcePreEncode` 时,才会触发该回调。
97
+ * @order 29
98
+ * @param frame 音频帧数据,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
99
+ *
100
+ */
101
+
102
+ onPreEncodeAudioFrame?(frame: VeLiveAudioFrame): void;
103
+ }
104
+ /** {zh}
105
+ * @detail callback
106
+ * @brief 播放器音视频帧回调。通过该回调,您可以获取音频和视频帧的数据。
107
+ *
108
+ */
109
+ export interface VeLiveMediaPlayerFrameListener {
110
+ /** {zh}
111
+ * @detail callback
112
+ * @brief 播放器音频帧回调。
113
+ * @param frame 音频帧,详情请参见 [VeLiveAudioFrame](147521#VeLiveAudioFrame)。
114
+ * @order 11
115
+ *
116
+ */
117
+
118
+ onAudioFrame?(frame: VeLiveAudioFrame): void;
119
+ /** {zh}
120
+ * @detail callback
121
+ * @brief 播放器视频帧回调。当完成一个新的视频帧的解码后,触发该回调。
122
+ * @param frame 视频帧数据,包含了帧的时间戳和格式等信息,详情请参见 [VeLiveVideoFrame](147521#VeLiveVideoFrame)。
123
+ * @order 12
124
+ *
125
+ */
126
+
127
+ onVideoFrame?(frame: VeLiveVideoFrame): void;
128
+ }
129
+ /** {zh}
130
+ * @detail callback
131
+ * @brief 直播截图回调。
132
+ *
133
+ */
134
+ export interface VeLiveSnapshotListener {
135
+ /** {zh}
136
+ * @detail callback
137
+ * @brief 截图成功回调。
138
+ * @notes <br>
139
+ * 调用 snapshot{@link #VeLivePusher#snapshot} 截图成功后,会收到这个回调。
140
+ * @order 19
141
+ * @param image 视频的截图。
142
+ *
143
+ */
144
+
145
+ onSnapshotComplete?(image: Bitmap): void;
146
+ }
147
+ /** {zh}
148
+ * @detail callback
149
+ * @brief 自定义的音频处理回调。
150
+ *
151
+ */
152
+ export interface VeLiveAudioFrameFilter {
153
+ }
154
+ /** {zh}
155
+ * @detail callback
156
+ * @brief 回调协议,用于监听推流器的推流错误、状态、网络质量、设备、首帧等回调事件等。
157
+ */
158
+ export interface VeLivePusherObserver {
159
+ /** {zh}
160
+ * @detail callback
161
+ * @brief 推流错误回调。
162
+ * @order 1
163
+ * @param code 错误码。详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
164
+ * @param subCode 子错误码。
165
+ * @param msg 错误信息。
166
+ *
167
+ */
168
+
169
+ onError?(code: number, subCode: number, msg: string): void;
170
+ /** {zh}
171
+ * @detail callback
172
+ * @brief 推流状态变化回调。
173
+ * @order 16
174
+ * @param status 变化后的推流状态。详情请参见 [VeLivePusherStatus](147521#VeLivePusherStatus)。
175
+ *
176
+ */
177
+
178
+ onStatusChange?(status: VeLivePusherStatus): void;
179
+ /** {zh}
180
+ * @detail callback
181
+ * @brief 首帧视频回调,当推流器发送出第一帧视频时,触发该回调。
182
+ * @order 2
183
+ * @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
184
+ * @param timestampMs 时间戳,单位为 ms。
185
+ *
186
+ */
187
+
188
+ onFirstVideoFrame?(type: VeLiveFirstFrameType, timestampMs: number): void;
189
+ /** {zh}
190
+ * @detail callback
191
+ * @brief 首帧音频回调,当推流器发送出第一帧音频时,触发该回调。
192
+ * @order 3
193
+ * @param type 首帧的类型,详情请参见 [VeLiveFirstFrameType](147521#VeLiveFirstFrameType)。
194
+ * @param timestampMs 时间戳,单位为 ms。
195
+ *
196
+ */
197
+
198
+ onFirstAudioFrame?(type: VeLiveFirstFrameType, timestampMs: number): void;
199
+ /** {zh}
200
+ * @detail callback
201
+ * @brief 摄像头开启/关闭回调,当推流器的摄像头开启或关闭时,触发该回调。
202
+ * @param open 摄像头的新状态是否为开启。<br>
203
+ * - true:摄像头开启;
204
+ * - false:摄像头关闭。
205
+ * @order 4
206
+ *
207
+ */
208
+
209
+ onCameraOpened?(open: boolean): void;
210
+ /** {zh}
211
+ * @detail callback
212
+ * @brief 麦克风开启/关闭回调,当推流器的麦克风开启或关闭时,触发该回调。
213
+ * @param open 麦克风的新状态是否为开启。<br>
214
+ * - true:麦克风开启;
215
+ * - false:麦克风关闭。
216
+ * @order 5
217
+ *
218
+ */
219
+
220
+ onMicrophoneOpened?(open: boolean): void;
221
+ /** {zh}
222
+ * @platform android
223
+ * @detail callback
224
+ * @brief 屏幕采集开启/关闭回调,当推流器的屏幕采集开启或关闭时,触发该回调。
225
+ * @param open 屏幕采集的新状态是否为开启。<br>
226
+ * - true:屏幕采集开启;
227
+ * - false:屏幕采集关闭。
228
+ * @order 14
229
+ *
230
+ */
231
+
232
+ onScreenRecording?(): void;
233
+ /** {zh}
234
+ * @detail callback
235
+ * @brief 网络质量状态回调,当推流器检测到网络质量发生变化时,触发该回调。
236
+ * @order 17
237
+ * @param quality 变化后的网络质量。详情请参见 [VeLiveNetworkQuality](147521#VeLiveNetworkQuality)。
238
+ *
239
+ */
240
+
241
+ onNetworkQuality?(quality: VeLiveNetworkQuality): void;
242
+ /** {zh}
243
+ * @detail callback
244
+ * @brief 音量等级回调,当推流器的音频音量等级发生变化时,触发该回调。
245
+ * @order 15
246
+ * @param level 变化后的音量等级。详情请参见 [VeLiveAudioPowerLevel](147521#VeLiveAudioPowerLevel)。
247
+ * @param value 当前音量的分贝值(dB)。<br/>
248
+ * - \\-1 表示当前没有获取到对应的音量分贝值。
249
+ * - 分贝数小于 1,对应 VeLiveAudioPowerLevelSilent 级别
250
+ * - 分贝数大于 1 小于等于 15,对应 VeLiveAudioPowerLevelQuiet 级别
251
+ * - 分贝数大于 15 小于等于 30,对应 VeLiveAudioPowerLevelLight 级别
252
+ * - 分贝数大于 30 小于等于 60,对应 VeLiveAudioPowerLevelNormal 级别
253
+ * - 分贝数大于 60 小于等于 85,对应 VeLiveAudioPowerLevelLoud
254
+ * - 分贝数大于 85,对应 VeLiveAudioPowerLevelNoisy 级别
255
+ *
256
+ */
257
+
258
+ onAudioPowerQuality?(level: VeLiveAudioPowerLevel, value: number): void;
259
+ }
260
+ /** {zh}
261
+ * @detail callback
262
+ * @brief 推流器周期性回调。
263
+ *
264
+ */
265
+ export interface VeLivePusherStatisticsObserver {
266
+ /** {zh}
267
+ * @detail callback
268
+ * @brief 推流周期性统计信息回调,每 5s 回调一次,您可以调用 [setStatisticsObserver](147517#VeLivePusher-setstatisticsobserver) 修改回调时间间隔。
269
+ * @order 18
270
+ * @param statistics 周期性统计信息,详情请参见 [VeLivePusherStatistics](147521#VeLivePusherDef-VeLivePusherStatistics)。
271
+ *
272
+ */
273
+
274
+ onStatistics?(statistics: VeLivePusherStatistics): void;
275
+ /** {zh}
276
+ * @detail callback
277
+ * @brief 周期性日志信息回调。
278
+ * @order 25
279
+ * @param logInfo 周期性日志信息。
280
+ *
281
+ */
282
+
283
+ onLogMonitor?(logInfo: JSONObject): void;
284
+ }
285
+ /** {zh}
286
+ * @detail callback
287
+ * @brief 直播录制回调。
288
+ *
289
+ */
290
+ export interface VeLiveFileRecordingListener {
291
+ /** {zh}
292
+ * @detail callback
293
+ * @brief 直播录制开始回调。
294
+ * @order 22
295
+ *
296
+ */
297
+
298
+ onFileRecordingStarted?(): void;
299
+ /** {zh}
300
+ * @detail callback
301
+ * @brief 直播录制停止回调。
302
+ * @order 23
303
+ *
304
+ */
305
+
306
+ onFileRecordingStopped?(): void;
307
+ /** {zh}
308
+ * @detail callback
309
+ * @brief 直播录制错误回调。
310
+ * @order 24
311
+ * @param errorCode 错误码,详情请参见 [VeLivePusherErrorCode](147520#VeLivePusherErrorCode)。
312
+ * @param message 错误信息。
313
+ *
314
+ */
315
+
316
+ onFileRecordingError?(errorCode: number, message: string): void;
317
+ }
318
+ export declare class android_VeLiveVideoFrameFilter extends $p_a.VeLiveVideoFrameFilter {
319
+ protected _instance: VeLiveVideoFrameFilter;
320
+ constructor(_instance: VeLiveVideoFrameFilter);
321
+ }
322
+ export declare class ios_VeLiveVideoFrameFilter extends $p_i.VeLiveVideoFrameFilter {
323
+ protected _instance: VeLiveVideoFrameFilter;
324
+ constructor(_instance: VeLiveVideoFrameFilter);
325
+ }
326
+ export declare class android_VeLiveVideoFrameListener extends $p_a.VeLiveVideoFrameListener {
327
+ protected _instance: VeLiveVideoFrameListener;
328
+ constructor(_instance: VeLiveVideoFrameListener);
329
+ onCaptureVideoFrame(frame: $p_a.VeLiveVideoFrame): void;
330
+ onPreEncodeVideoFrame(frame: $p_a.VeLiveVideoFrame): void;
331
+ }
332
+ export declare class ios_VeLiveVideoFrameListener extends $p_i.VeLiveVideoFrameListener {
333
+ protected _instance: VeLiveVideoFrameListener;
334
+ constructor(_instance: VeLiveVideoFrameListener);
335
+ onCaptureVideoFrame(frame: $p_i.VeLiveVideoFrame): void;
336
+ onPreEncodeVideoFrame(frame: $p_i.VeLiveVideoFrame): void;
337
+ }
338
+ export declare class android_VeLiveMediaPlayerListener extends $p_a.VeLiveMediaPlayerListener {
339
+ protected _instance: VeLiveMediaPlayerListener;
340
+ constructor(_instance: VeLiveMediaPlayerListener);
341
+ onStart(info: $p_a.Bundle): void;
342
+ onProgress(timeMs: int): void;
343
+ onStop(): void;
344
+ onError(code: int, msg: string): void;
345
+ }
346
+ export declare class ios_VeLiveMediaPlayerListener extends $p_i.VeLiveMediaPlayerListener {
347
+ protected _instance: VeLiveMediaPlayerListener;
348
+ constructor(_instance: VeLiveMediaPlayerListener);
349
+ onStart(): void;
350
+ onProgress(timeMS: int): void;
351
+ onStop(): void;
352
+ onError(error: $p_i.NSError): void;
353
+ }
354
+ export declare class android_VeLiveAudioFrameListener extends $p_a.VeLiveAudioFrameListener {
355
+ protected _instance: VeLiveAudioFrameListener;
356
+ constructor(_instance: VeLiveAudioFrameListener);
357
+ onCaptureAudioFrame(frame: $p_a.VeLiveAudioFrame): void;
358
+ onPreEncodeAudioFrame(frame: $p_a.VeLiveAudioFrame): void;
359
+ }
360
+ export declare class ios_VeLiveAudioFrameListener extends $p_i.VeLiveAudioFrameListener {
361
+ protected _instance: VeLiveAudioFrameListener;
362
+ constructor(_instance: VeLiveAudioFrameListener);
363
+ onCaptureAudioFrame(frame: $p_i.VeLiveAudioFrame): void;
364
+ onPreEncodeAudioFrame(frame: $p_i.VeLiveAudioFrame): void;
365
+ }
366
+ export declare class android_VeLiveMediaPlayerFrameListener extends $p_a.VeLiveMediaPlayerFrameListener {
367
+ protected _instance: VeLiveMediaPlayerFrameListener;
368
+ constructor(_instance: VeLiveMediaPlayerFrameListener);
369
+ onAudioFrame(frame: $p_a.VeLiveAudioFrame): void;
370
+ onVideoFrame(frame: $p_a.VeLiveVideoFrame): void;
371
+ }
372
+ export declare class ios_VeLiveMediaPlayerFrameListener extends $p_i.VeLiveMediaPlayerFrameListener {
373
+ protected _instance: VeLiveMediaPlayerFrameListener;
374
+ constructor(_instance: VeLiveMediaPlayerFrameListener);
375
+ onAudioFrame(audioFrame: $p_i.VeLiveAudioFrame): void;
376
+ onVideoFrame(videoFrame: $p_i.VeLiveVideoFrame): void;
377
+ }
378
+ export declare class android_VeLiveSnapshotListener extends $p_a.VeLiveSnapshotListener {
379
+ protected _instance: VeLiveSnapshotListener;
380
+ constructor(_instance: VeLiveSnapshotListener);
381
+ onSnapshotComplete(image: $p_a.Bitmap): void;
382
+ }
383
+ export declare class ios_VeLiveSnapshotListener extends $p_i.VeLiveSnapshotListener {
384
+ protected _instance: VeLiveSnapshotListener;
385
+ constructor(_instance: VeLiveSnapshotListener);
386
+ onSnapshotComplete(image: $p_i.UIImage): void;
387
+ }
388
+ export declare class android_VeLiveAudioFrameFilter extends $p_a.VeLiveAudioFrameFilter {
389
+ protected _instance: VeLiveAudioFrameFilter;
390
+ constructor(_instance: VeLiveAudioFrameFilter);
391
+ }
392
+ export declare class ios_VeLiveAudioFrameFilter extends $p_i.VeLiveAudioFrameFilter {
393
+ protected _instance: VeLiveAudioFrameFilter;
394
+ constructor(_instance: VeLiveAudioFrameFilter);
395
+ }
396
+ export declare class android_VeLivePusherObserver extends $p_a.VeLivePusherObserver {
397
+ protected _instance: VeLivePusherObserver;
398
+ constructor(_instance: VeLivePusherObserver);
399
+ onError(code: int, subCode: int, msg: string): void;
400
+ onStatusChange(status: $p_a.VeLivePusherStatus): void;
401
+ onFirstVideoFrame(type: $p_a.VeLiveFirstFrameType, timestampMs: int): void;
402
+ onFirstAudioFrame(type: $p_a.VeLiveFirstFrameType, timestampMs: int): void;
403
+ onCameraOpened(open: boolean): void;
404
+ onMicrophoneOpened(open: boolean): void;
405
+ onScreenRecording(open: boolean): void;
406
+ onNetworkQuality(quality: $p_a.VeLiveNetworkQuality): void;
407
+ onAudioPowerQuality(level: $p_a.VeLiveAudioPowerLevel, value: $p_a.float): void;
408
+ }
409
+ export declare class ios_VeLivePusherObserver extends $p_i.VeLivePusherObserver {
410
+ protected _instance: VeLivePusherObserver;
411
+ constructor(_instance: VeLivePusherObserver);
412
+ onError$subcode$message(code: int, subcode: int, msg: NSString): void;
413
+ onStatusChange(status: $p_i.VeLivePushStatus): void;
414
+ onFirstVideoFrame$timestampMs(type: $p_i.VeLiveFirstFrameType, timestampMs: $p_i.int64_t): void;
415
+ onFirstAudioFrame$timestampMs(type: $p_i.VeLiveFirstFrameType, timestampMs: $p_i.int64_t): void;
416
+ onCameraOpened(open: BOOL): void;
417
+ onMicrophoneOpened(open: BOOL): void;
418
+ onNetworkQuality(quality: $p_i.VeLiveNetworkQuality): void;
419
+ onAudioPowerQuality$value(level: $p_i.VeLiveAudioPowerLevel, value: $p_i.float): void;
420
+ }
421
+ export declare class android_VeLivePusherStatisticsObserver extends $p_a.VeLivePusherStatisticsObserver {
422
+ protected _instance: VeLivePusherStatisticsObserver;
423
+ constructor(_instance: VeLivePusherStatisticsObserver);
424
+ onStatistics(statistics: $p_a.VeLivePusherStatistics): void;
425
+ onLogMonitor(logInfo: JSONObject): void;
426
+ }
427
+ export declare class ios_VeLivePusherStatisticsObserver extends $p_i.VeLivePusherStatisticsObserver {
428
+ protected _instance: VeLivePusherStatisticsObserver;
429
+ constructor(_instance: VeLivePusherStatisticsObserver);
430
+ onStatistics(statistics: $p_i.VeLivePusherStatistics): void;
431
+ onLogMonitor(logInfo: NSDictionary): void;
432
+ }
433
+ export declare class android_VeLiveFileRecordingListener extends $p_a.VeLiveFileRecordingListener {
434
+ protected _instance: VeLiveFileRecordingListener;
435
+ constructor(_instance: VeLiveFileRecordingListener);
436
+ onFileRecordingStarted(): void;
437
+ onFileRecordingStopped(): void;
438
+ onFileRecordingError(errorCode: int, message: string): void;
439
+ }
440
+ export declare class ios_VeLiveFileRecordingListener extends $p_i.VeLiveFileRecordingListener {
441
+ protected _instance: VeLiveFileRecordingListener;
442
+ constructor(_instance: VeLiveFileRecordingListener);
443
+ onFileRecordingStarted(): void;
444
+ onFileRecordingStopped(): void;
445
+ onFileRecordingError$message(errorCode: int, msg: NSString): void;
446
+ }
@@ -0,0 +1,109 @@
1
+ import * as $p_a from '../android/index';
2
+ import * as $p_i from '../ios/index';
3
+ /** {zh}
4
+ * @detail errorcode
5
+ * @brief 推流过程错误码定义。
6
+ *
7
+ */
8
+ export declare enum VeLivePusherErrorCode {
9
+ /** {zh}
10
+ * @brief 无错误。
11
+ *
12
+ */
13
+
14
+ VeLivePusherSuccess = 0,
15
+ /** {zh}
16
+ * @brief License 错误,可能 License 集成错误或 License 过期,请检查 License 集成方式和有效性。
17
+ *
18
+ */
19
+
20
+ VeLivePusherInvalidLicense = -1,
21
+ /** {zh}
22
+ * @brief 参数错误,请检查入参,并重新调用。
23
+ *
24
+ */
25
+
26
+ VeLivePusherInvalidParameter = -2,
27
+ /** {zh}
28
+ * @brief 视频采集错误,可能未开启设备视频采集权限,请检查权限是否获取。
29
+ *
30
+ */
31
+
32
+ VeLivePusherVideoCaptureError = -3,
33
+ /** {zh}
34
+ * @brief 音频采集错误,可能未开启设备麦克风采集权限,请检查权限是否获取。
35
+ *
36
+ */
37
+
38
+ VeLivePusherAudioCaptureError = -4,
39
+ /** {zh}
40
+ * @brief 视频编码错误,可能配置了当前设备不支持的视频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
41
+ *
42
+ */
43
+
44
+ VeLivePusherVideoEncoderError = -5,
45
+ /** {zh}
46
+ * @brief 音频编码错误,可能配置了当前设备不支持的音频编码方式,请检查编码参数,并重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
47
+ *
48
+ */
49
+
50
+ VeLivePusherAudioEncoderError = -6,
51
+ /** {zh}
52
+ * @brief 网络发送错误,可能当前网络链路不通,或者开启了代理和关闭了网络权限,请检查网络后重新调用。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
53
+ *
54
+ */
55
+
56
+ VeLivePusherTransportError = -7,
57
+ /** {zh}
58
+ * @brief 视频特效错误,请检查视频特效 SDK 是否已经集成并且初试化成功。检查特效资源路径是否配置正确。如果故障未排除,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
59
+ *
60
+ */
61
+
62
+ VeLivePusherVideoEffectError = -8,
63
+ /** {zh}
64
+ * @brief 音频模块错误,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
65
+ *
66
+ */
67
+
68
+ VeLivePusherAudioDeviceError = -9,
69
+ /** {zh}
70
+ * @platform android
71
+ * @brief 您使用的基础版 License 暂不支持 H.265 硬件编码,请登录火山引擎控制台获取高级版 License。
72
+ *
73
+ */
74
+
75
+ VeLivePusherLicenseUnsupportedH265 = -10,
76
+ /** {zh}
77
+ * @brief 其他错误类型,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
78
+ *
79
+ */
80
+
81
+ VeLivePusherError = -100,
82
+ /** {zh}
83
+ * @platform android
84
+ * @brief 当前系统版本不支持屏幕采集功能
85
+ *
86
+ */
87
+
88
+ VeLivePusherScreenCaptureNotSupportError = -99,
89
+ /** {zh}
90
+ * @platform android
91
+ * @brief 屏幕采集权限的获取被用户拒绝
92
+ *
93
+ */
94
+
95
+ VeLivePusherScreenCaptureStartError = -98,
96
+ /** {zh}
97
+ * @platform android
98
+ * @brief 屏幕采集被系统中断,请联系火山引擎[技术支持](https://console.volcengine.com/workorder/create?step=3&SubProductID=P00000076)。
99
+ *
100
+ */
101
+
102
+ VeLivePusherScreenCaptureInterruptedError = -97
103
+ }
104
+ export declare class t_VeLivePusherErrorCode {
105
+ static code_to_android(value: VeLivePusherErrorCode): $p_a.VeLivePusherErrorCode;
106
+ static android_to_code(value: $p_a.VeLivePusherErrorCode): VeLivePusherErrorCode;
107
+ static code_to_ios(value: VeLivePusherErrorCode): $p_i.VeLivePusherCode;
108
+ static ios_to_code(value: $p_i.VeLivePusherCode): VeLivePusherErrorCode;
109
+ }
@@ -0,0 +1,5 @@
1
+ export * from './keytype';
2
+ export * from './api';
3
+ export * from './callback';
4
+ export * from './errorcode';
5
+ export * from './types';