@byteplus/react-native-live-push 1.0.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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/android/build.gradle +92 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +16 -0
  6. package/android/src/main/AndroidManifestNew.xml +16 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/ExternalSourceHelper.java +58 -0
  8. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +19 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +73 -0
  10. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +182 -0
  11. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +16 -0
  12. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +27 -0
  13. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +45 -0
  14. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +87 -0
  15. package/ios/VeLivePushSDK.h +24 -0
  16. package/ios/VeLivePushSDK.m +109 -0
  17. package/ios/VeLivePushView.h +24 -0
  18. package/ios/VeLivePushView.m +74 -0
  19. package/ios/VeLivePushViewManager.m +59 -0
  20. package/lib/commonjs/index.js +24238 -0
  21. package/lib/module/index.js +24186 -0
  22. package/lib/typescript/android/index.d.ts +44 -0
  23. package/lib/typescript/codegen/android/api.d.ts +372 -0
  24. package/lib/typescript/codegen/android/callback.d.ts +91 -0
  25. package/lib/typescript/codegen/android/errorcode.d.ts +26 -0
  26. package/lib/typescript/codegen/android/index.d.ts +5 -0
  27. package/lib/typescript/codegen/android/keytype.d.ts +469 -0
  28. package/lib/typescript/codegen/android/types.d.ts +32 -0
  29. package/lib/typescript/codegen/ios/api.d.ts +257 -0
  30. package/lib/typescript/codegen/ios/callback.d.ts +88 -0
  31. package/lib/typescript/codegen/ios/errorcode.d.ts +54 -0
  32. package/lib/typescript/codegen/ios/index.d.ts +5 -0
  33. package/lib/typescript/codegen/ios/keytype.d.ts +488 -0
  34. package/lib/typescript/codegen/ios/types.d.ts +35 -0
  35. package/lib/typescript/codegen/pack/api.d.ts +1933 -0
  36. package/lib/typescript/codegen/pack/callback.d.ts +542 -0
  37. package/lib/typescript/codegen/pack/errorcode.d.ts +174 -0
  38. package/lib/typescript/codegen/pack/index.d.ts +5 -0
  39. package/lib/typescript/codegen/pack/keytype.d.ts +1952 -0
  40. package/lib/typescript/codegen/pack/types.d.ts +1 -0
  41. package/lib/typescript/codegen/type-shim.d.ts +6 -0
  42. package/lib/typescript/component.d.ts +8 -0
  43. package/lib/typescript/core/api.d.ts +2 -0
  44. package/lib/typescript/core/callback.d.ts +2 -0
  45. package/lib/typescript/core/env.d.ts +29 -0
  46. package/lib/typescript/core/errorcode.d.ts +2 -0
  47. package/lib/typescript/core/index.d.ts +6 -0
  48. package/lib/typescript/core/keytype.d.ts +7 -0
  49. package/lib/typescript/core/pusher.d.ts +16 -0
  50. package/lib/typescript/index.d.ts +2 -0
  51. package/lib/typescript/ios/extends.d.ts +41 -0
  52. package/lib/typescript/runtime.d.ts +1 -0
  53. package/package.json +31 -0
  54. package/react-native-velive-push.podspec +45 -0
@@ -0,0 +1,469 @@
1
+ import { int, double, String, ArrayList, float, long } from './types';
2
+ export declare class VeLiveVideoEncoderConfiguration {
3
+
4
+ getResolution(): VeLiveVideoResolution;
5
+
6
+ setResolution(resolution: VeLiveVideoResolution): VeLiveVideoEncoderConfiguration;
7
+
8
+ getCodec(): VeLiveVideoCodec;
9
+
10
+ setCodec(codec: VeLiveVideoCodec): VeLiveVideoEncoderConfiguration;
11
+
12
+ getBitrate(): int;
13
+
14
+ setBitrate(bitrate: int): VeLiveVideoEncoderConfiguration;
15
+
16
+ getMinBitrate(): int;
17
+
18
+ setMinBitrate(minBitrate: int): VeLiveVideoEncoderConfiguration;
19
+
20
+ getMaxBitrate(): int;
21
+
22
+ setMaxBitrate(maxBitrate: int): VeLiveVideoEncoderConfiguration;
23
+
24
+ getGopSize(): int;
25
+
26
+ setGopSize(gopSize: int): VeLiveVideoEncoderConfiguration;
27
+
28
+ getFps(): int;
29
+
30
+ setFps(fps: int): VeLiveVideoEncoderConfiguration;
31
+
32
+ isEnableBFrame(): boolean;
33
+
34
+ setEnableBFrame(enableBFrame: boolean): VeLiveVideoEncoderConfiguration;
35
+
36
+ isEnableAccelerate(): boolean;
37
+
38
+ setEnableAccelerate(enableAccelerate: boolean): VeLiveVideoEncoderConfiguration;
39
+ }
40
+ export declare enum VeLiveAudioCodec {
41
+
42
+ VeLiveAudioCodecFdkAAC = 0,
43
+
44
+ VeLiveAudioCodecMediaCodecAAC = 1,
45
+
46
+ VeLiveAudioCodecFFmpegAAC = 2
47
+ }
48
+ export declare enum VeLiveVideoCodec {
49
+
50
+ VeLiveVideoCodecH264 = 0,
51
+
52
+ VeLiveVideoCodecByteVC1 = 1
53
+ }
54
+ export declare class VeLivePusherStatistics {
55
+
56
+ encodeWidth: int;
57
+
58
+ encodeHeight: int;
59
+
60
+ captureWidth: int;
61
+
62
+ captureHeight: int;
63
+
64
+ captureFps: double;
65
+
66
+ encodeFps: double;
67
+
68
+ transportFps: double;
69
+
70
+ fps: int;
71
+
72
+ videoBitrate: int;
73
+
74
+ minVideoBitrate: int;
75
+
76
+ maxVideoBitrate: int;
77
+
78
+ encodeVideoBitrate: double;
79
+
80
+ transportVideoBitrate: double;
81
+
82
+ encodeAudioBitrate: double;
83
+
84
+ url: String;
85
+
86
+ codec: String;
87
+ }
88
+ export declare enum VeLivePusherRenderMode {
89
+
90
+ VeLivePusherRenderModeFill = 0,
91
+
92
+ VeLivePusherRenderModeFit = 1,
93
+
94
+ VeLivePusherRenderModeHidden = 2
95
+ }
96
+ export declare enum VeLiveVideoEffectLicenseType {
97
+
98
+ VeLiveVideoEffectLicenseTypeOffLine = 0,
99
+
100
+ VeLiveVideoEffectLicenseTypeOnLine = 1
101
+ }
102
+ export declare enum VeLiveAudioBufferType {
103
+
104
+ VeLiveAudioBufferTypeUnknown = 0,
105
+
106
+ VeLiveAudioBufferTypeByteBuffer = 1
107
+ }
108
+ export declare enum VeLiveAudioChannel {
109
+
110
+ VeLiveAudioChannelMono = 0,
111
+
112
+ VeLiveAudioChannelStereo = 1
113
+ }
114
+ export declare enum VeLiveFirstFrameType {
115
+
116
+ VeLiveFirstCaptureFrame = 0,
117
+
118
+ VeLiveFirstRenderFrame = 1,
119
+
120
+ VeLiveFirstEncodedFrame = 2,
121
+
122
+ VeLiveFirstSendFrame = 3
123
+ }
124
+ export declare enum VeLiveVideoFluencyLevel {
125
+
126
+ VeLiveVideoFluencyLevelSmooth = 0,
127
+
128
+ VeLiveVideoFluencyLevelSluggish = 1,
129
+
130
+ VeLiveVideoFluencyLevelBlocked = 2
131
+ }
132
+ export declare enum VeLiveVideoCaptureType {
133
+
134
+ VeLiveVideoCaptureFrontCamera = 0,
135
+
136
+ VeLiveVideoCaptureBackCamera = 1,
137
+
138
+ VeLiveVideoCaptureDualCamera = 2,
139
+
140
+ VeLiveVideoCaptureScreen = 3,
141
+
142
+ VeLiveVideoCaptureExternal = 4,
143
+
144
+ VeLiveVideoCaptureCustomImage = 5,
145
+
146
+ VeLiveVideoCaptureLastFrame = 6,
147
+
148
+ VeLiveVideoCaptureDummyFrame = 7
149
+ }
150
+ export declare enum VeLiveVideoProfile {
151
+
152
+ VeLiveVideoProfileUnknown = 0,
153
+
154
+ VeLiveVideoProfileH264Baseline = 1,
155
+
156
+ VeLiveVideoProfileH264Main = 2,
157
+
158
+ VeLiveVideoProfileH264High = 3,
159
+
160
+ VeLiveVideoProfileByteVC1Main = 4
161
+ }
162
+ export declare enum VeLiveVideoRotation {
163
+
164
+ VeLiveVideoRotation0 = 0,
165
+
166
+ VeLiveVideoRotation90 = 1,
167
+
168
+ VeLiveVideoRotation180 = 2,
169
+
170
+ VeLiveVideoRotation270 = 3
171
+ }
172
+ export declare enum VeLiveVideoFrameSource {
173
+
174
+ VeLiveVideoFrameSourceCapture = 1,
175
+
176
+ VeLiveVideoFrameSourcePreEncode = "1 << 1"
177
+ }
178
+ export declare enum VeLiveAudioProfile {
179
+
180
+ VeLiveAudioAACProfileLC = 0,
181
+
182
+ VeLiveAudioAACProfileHEv1 = 1,
183
+
184
+ VeLiveAudioAACProfileHEv2 = 2
185
+ }
186
+ export declare enum VeLiveVideoBufferType {
187
+
188
+ VeLiveVideoBufferTypeUnknown = 0,
189
+
190
+ VeLiveVideoBufferTypeTexture = 1,
191
+
192
+ VeLiveVideoBufferTypeByteBuffer = 2,
193
+
194
+ VeLiveVideoBufferTypeByteArray = 3
195
+ }
196
+ export declare class VeLiveAudioCaptureConfiguration {
197
+
198
+ getSampleRate(): VeLiveAudioSampleRate;
199
+
200
+ setSampleRate(sampleRate: VeLiveAudioSampleRate): VeLiveAudioCaptureConfiguration;
201
+
202
+ getChannel(): VeLiveAudioChannel;
203
+
204
+ setChannel(channel: VeLiveAudioChannel): VeLiveAudioCaptureConfiguration;
205
+ }
206
+ export declare class VeLiveStreamMixDescription {
207
+
208
+ mixVideoStreams: ArrayList<VeLiveMixVideoLayout>;
209
+
210
+ mixAudioStreams: ArrayList<VeLiveMixAudioLayout>;
211
+
212
+ backgroundColor: String;
213
+ }
214
+ export declare enum VeLiveAudioSampleRate {
215
+
216
+ VeLiveAudioSampleRate8000 = 0,
217
+
218
+ VeLiveAudioSampleRate16000 = 1,
219
+
220
+ VeLiveAudioSampleRate32000 = 2,
221
+
222
+ VeLiveAudioSampleRate44100 = 3,
223
+
224
+ VeLiveAudioSampleRate48000 = 4
225
+ }
226
+ export declare enum VeLiveAudioPowerLevel {
227
+
228
+ VeLiveAudioPowerLevelSilent = 0,
229
+
230
+ VeLiveAudioPowerLevelQuiet = 1,
231
+
232
+ VeLiveAudioPowerLevelLight = 2,
233
+
234
+ VeLiveAudioPowerLevelNormal = 3,
235
+
236
+ VeLiveAudioPowerLevelLoud = 4,
237
+
238
+ VeLiveAudioPowerLevelNoise = 5
239
+ }
240
+ export declare class VeLiveVideoCaptureConfiguration {
241
+
242
+ getWidth(): int;
243
+
244
+ setWidth(width: int): VeLiveVideoCaptureConfiguration;
245
+
246
+ getHeight(): int;
247
+
248
+ setHeight(height: int): VeLiveVideoCaptureConfiguration;
249
+
250
+ getFps(): int;
251
+
252
+ setFps(fps: int): VeLiveVideoCaptureConfiguration;
253
+ }
254
+ export declare enum VeLivePixelFormat {
255
+
256
+ VeLivePixelFormatUnknown = 0,
257
+
258
+ VeLivePixelFormatI420 = 1,
259
+
260
+ VeLivePixelFormatNV12 = 2,
261
+
262
+ VeLivePixelFormatNV21 = 3,
263
+
264
+ VeLivePixelFormat2DTexture = 4,
265
+
266
+ VeLivePixelFormatOesTexture = 5
267
+ }
268
+ export declare enum VeLivePusherStatus {
269
+
270
+ VeLivePushStatusNone = 0,
271
+
272
+ VeLivePushStatusConnecting = 1,
273
+
274
+ VeLivePushStatusConnectSuccess = 2,
275
+
276
+ VeLivePushStatusReconnecting = 3,
277
+
278
+ VeLivePushStatusConnectStop = 4,
279
+
280
+ VeLivePushStatusConnectError = 5,
281
+
282
+ VeLivePushStatusDisconnected = 6
283
+ }
284
+ export declare enum VeLiveVideoResolution {
285
+
286
+ VeLiveVideoResolution360P = "VeLiveVideoResolution360P",
287
+
288
+ VeLiveVideoResolution480P = "VeLiveVideoResolution480P",
289
+
290
+ VeLiveVideoResolution540P = "VeLiveVideoResolution540P",
291
+
292
+ VeLiveVideoResolution720P = "VeLiveVideoResolution720P",
293
+
294
+ VeLiveVideoResolution1080P = "VeLiveVideoResolution1080P"
295
+ }
296
+ export declare enum VeLiveNetworkQuality {
297
+
298
+ VeLiveNetworkQualityUnknown = 0,
299
+
300
+ VeLiveNetworkQualityBad = 1,
301
+
302
+ VeLiveNetworkQualityPoor = 2,
303
+
304
+ VeLiveNetworkQualityGood = 3
305
+ }
306
+ export declare enum VeLivePusherLogLevel {
307
+
308
+ VeLiveLogLevelVerbose = 0,
309
+
310
+ VeLiveLogLevelDebug = 1,
311
+
312
+ VeLiveLogLevelInfo = 2,
313
+
314
+ VeLiveLogLevelWarn = 3,
315
+
316
+ VeLiveLogLevelError = 4,
317
+
318
+ VeLiveLogLevelNone = 5
319
+ }
320
+ export declare enum VeLiveAudioBitDepth {
321
+
322
+ VeLiveAudioBitDepth16 = 0
323
+ }
324
+ export declare class VeLiveMixAudioLayout {
325
+
326
+ streamId: int;
327
+
328
+ volume: float;
329
+
330
+ update(other: VeLiveMixAudioLayout): void;
331
+ }
332
+ export declare enum VeLiveOrientation {
333
+
334
+ VeLiveOrientationLandscape = 0,
335
+
336
+ VeLiveOrientationPortrait = 1
337
+ }
338
+ export declare enum VeLiveVideoMirrorType {
339
+
340
+ VeLiveVideoMirrorCapture = 0,
341
+
342
+ VeLiveVideoMirrorPreview = 1,
343
+
344
+ VeLiveVideoMirrorPushStream = 2
345
+ }
346
+ export declare class VeLivePusherLogConfig {
347
+
348
+ logPath: String;
349
+
350
+ maxLogSizeM: int;
351
+
352
+ singleLogSizeM: int;
353
+
354
+ logExpireTimeS: long;
355
+
356
+ enableThreadLoop: int;
357
+
358
+ enableStdout: int;
359
+
360
+ enableLogFile: int;
361
+
362
+ logLevel: int;
363
+
364
+ intervalMs: long;
365
+
366
+ queryUrl: String;
367
+
368
+ device_id: String;
369
+
370
+ httpTimeoutMS: int;
371
+
372
+ httpUploadFileTimeoutMS: int;
373
+ }
374
+ export declare class VeLiveFileRecorderConfiguration {
375
+
376
+ getWidth(): int;
377
+
378
+ setWidth(width: int): VeLiveFileRecorderConfiguration;
379
+
380
+ getHeight(): int;
381
+
382
+ setHeight(height: int): VeLiveFileRecorderConfiguration;
383
+
384
+ getFps(): int;
385
+
386
+ setFps(fps: int): VeLiveFileRecorderConfiguration;
387
+
388
+ getBitrate(): int;
389
+
390
+ setBitrate(bitrate: int): VeLiveFileRecorderConfiguration;
391
+ }
392
+ export declare class VeLiveMixVideoLayout {
393
+
394
+ streamId: int;
395
+
396
+ x: float;
397
+
398
+ y: float;
399
+
400
+ width: float;
401
+
402
+ height: float;
403
+
404
+ alpha: float;
405
+
406
+ zOrder: int;
407
+
408
+ renderMode: VeLivePusherRenderMode;
409
+
410
+ update(other: VeLiveMixVideoLayout): void;
411
+ }
412
+ export declare class VeLiveVideoEffectLicenseConfiguration {
413
+
414
+ static create_String(path: String): VeLiveVideoEffectLicenseConfiguration;
415
+
416
+ static create_String$String$String(key: String, secret: String, url: String): VeLiveVideoEffectLicenseConfiguration;
417
+
418
+ getType(): VeLiveVideoEffectLicenseType;
419
+
420
+ getPath(): String;
421
+
422
+ getKey(): String;
423
+
424
+ getSecret(): String;
425
+
426
+ getUrl(): String;
427
+ }
428
+ export declare enum VeLiveAudioFrameSource {
429
+
430
+ VeLiveAudioFrameSourceCapture = 1,
431
+
432
+ VeLiveAudioFrameSourcePreEncode = "1 << 1"
433
+ }
434
+ export declare class VeLiveAudioEncoderConfiguration {
435
+
436
+ getBitrate(): int;
437
+
438
+ setBitrate(bitrate: int): VeLiveAudioEncoderConfiguration;
439
+
440
+ getSampleRate(): VeLiveAudioSampleRate;
441
+
442
+ setSampleRate(sampleRate: VeLiveAudioSampleRate): VeLiveAudioEncoderConfiguration;
443
+
444
+ getChannel(): VeLiveAudioChannel;
445
+
446
+ setChannel(channel: VeLiveAudioChannel): VeLiveAudioEncoderConfiguration;
447
+
448
+ getProfile(): VeLiveAudioProfile;
449
+
450
+ setProfile(profile: VeLiveAudioProfile): VeLiveAudioEncoderConfiguration;
451
+ }
452
+ export declare enum VeLiveAudioMixType {
453
+
454
+ VeLiveAudioMixPush = 0,
455
+
456
+ VeLiveAudioMixPlayAndPush = 1
457
+ }
458
+ export declare enum VeLiveAudioCaptureType {
459
+
460
+ VeLiveAudioCaptureMicrophone = 0,
461
+
462
+ VeLiveAudioCaptureVoiceCommunication = 1,
463
+
464
+ VeLiveAudioCaptureVoiceRecognition = 2,
465
+
466
+ VeLiveAudioCaptureExternal = 3,
467
+
468
+ VeLiveAudioCaptureMuteFrame = 4
469
+ }
@@ -0,0 +1,32 @@
1
+ export type String = string;
2
+ export type Boolean = boolean;
3
+ export type Void = void;
4
+ export type int = number;
5
+ export type float = number;
6
+ export type double = number;
7
+ export type long = number;
8
+ export type Integer = number;
9
+ export type Double = number;
10
+ export type List<T> = Array<T>;
11
+ export type list<T> = Array<T>;
12
+ export type ArrayList<T> = Array<T>;
13
+ export type Map<K extends keyof any, V> = Record<K, V>;
14
+ export type set<T> = Set<T>;
15
+ export type map = Object;
16
+ export type struct = Object;
17
+ export type Bitmap = unknown;
18
+ export type EGLContext = unknown;
19
+ export type ByteArray = number;
20
+ export type ByteBuffer = ArrayBuffer;
21
+ export type Matrix = unknown;
22
+ export type SurfaceHolder = unknown;
23
+ export type Surface = unknown;
24
+ export type Runnable = unknown;
25
+ export type View = unknown;
26
+ export type Intent = unknown;
27
+ export type Context = unknown;
28
+ export type Bundle = any;
29
+ export type Error = any;
30
+ export type JSONObject = any;
31
+ export type LiveSdkSetting = unknown;
32
+ export type NativeImageResource = unknown;