@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.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/android/build.gradle +92 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +16 -0
- package/android/src/main/AndroidManifestNew.xml +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/ExternalSourceHelper.java +58 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +19 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +73 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +182 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +27 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +45 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +87 -0
- package/ios/VeLivePushSDK.h +24 -0
- package/ios/VeLivePushSDK.m +109 -0
- package/ios/VeLivePushView.h +24 -0
- package/ios/VeLivePushView.m +74 -0
- package/ios/VeLivePushViewManager.m +59 -0
- package/lib/commonjs/index.js +24238 -0
- package/lib/module/index.js +24186 -0
- package/lib/typescript/android/index.d.ts +44 -0
- package/lib/typescript/codegen/android/api.d.ts +372 -0
- package/lib/typescript/codegen/android/callback.d.ts +91 -0
- package/lib/typescript/codegen/android/errorcode.d.ts +26 -0
- package/lib/typescript/codegen/android/index.d.ts +5 -0
- package/lib/typescript/codegen/android/keytype.d.ts +469 -0
- package/lib/typescript/codegen/android/types.d.ts +32 -0
- package/lib/typescript/codegen/ios/api.d.ts +257 -0
- package/lib/typescript/codegen/ios/callback.d.ts +88 -0
- package/lib/typescript/codegen/ios/errorcode.d.ts +54 -0
- package/lib/typescript/codegen/ios/index.d.ts +5 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +488 -0
- package/lib/typescript/codegen/ios/types.d.ts +35 -0
- package/lib/typescript/codegen/pack/api.d.ts +1933 -0
- package/lib/typescript/codegen/pack/callback.d.ts +542 -0
- package/lib/typescript/codegen/pack/errorcode.d.ts +174 -0
- package/lib/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/typescript/codegen/pack/keytype.d.ts +1952 -0
- package/lib/typescript/codegen/pack/types.d.ts +1 -0
- package/lib/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/typescript/component.d.ts +8 -0
- package/lib/typescript/core/api.d.ts +2 -0
- package/lib/typescript/core/callback.d.ts +2 -0
- package/lib/typescript/core/env.d.ts +29 -0
- package/lib/typescript/core/errorcode.d.ts +2 -0
- package/lib/typescript/core/index.d.ts +6 -0
- package/lib/typescript/core/keytype.d.ts +7 -0
- package/lib/typescript/core/pusher.d.ts +16 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/ios/extends.d.ts +41 -0
- package/lib/typescript/runtime.d.ts +1 -0
- package/package.json +31 -0
- package/react-native-velive-push.podspec +45 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { NativeProxyService, NativeView } from '@vcloud-lux/hybrid-runtime';
|
|
2
|
+
import type { SurfaceHolder } from '../codegen/android/index';
|
|
3
|
+
export declare class AndroidSurfaceView extends NativeView {
|
|
4
|
+
getHolder(): Promise<SurfaceHolder>;
|
|
5
|
+
}
|
|
6
|
+
declare class ApplicationContext {
|
|
7
|
+
}
|
|
8
|
+
declare class ReactApplicationContext {
|
|
9
|
+
}
|
|
10
|
+
declare class ScreenIntent {
|
|
11
|
+
}
|
|
12
|
+
export declare class NativeVariables {
|
|
13
|
+
static getApplicationContext(): Promise<ApplicationContext>;
|
|
14
|
+
static getReactApplicationContext(): Promise<ReactApplicationContext>;
|
|
15
|
+
static getScreenIntent(): Promise<ScreenIntent>;
|
|
16
|
+
}
|
|
17
|
+
export declare class VeLivePlayerConfiguration extends NativeProxyService {
|
|
18
|
+
enableStatisticsCallback?: boolean;
|
|
19
|
+
enableLiveDNS?: boolean;
|
|
20
|
+
enableSei?: boolean;
|
|
21
|
+
enableHardwareDecode?: boolean;
|
|
22
|
+
networkTimeoutMs?: number;
|
|
23
|
+
retryIntervalTimeMs?: number;
|
|
24
|
+
retryMaxCount?: number;
|
|
25
|
+
statisticsCallbackInterval?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare class Env {
|
|
28
|
+
static init(cfg: any): void;
|
|
29
|
+
static openAppLog(cfg: any): void;
|
|
30
|
+
static getApplicationContext(): ApplicationContext;
|
|
31
|
+
}
|
|
32
|
+
declare class ConfigBuilder {
|
|
33
|
+
setApplicationContext(appContext: ApplicationContext): ConfigBuilder;
|
|
34
|
+
setAppID(appId: string): ConfigBuilder;
|
|
35
|
+
setAppName(appId: string): ConfigBuilder;
|
|
36
|
+
setAppVersion(appVer: string): ConfigBuilder;
|
|
37
|
+
setAppChannel(appVer: string): ConfigBuilder;
|
|
38
|
+
setLicenseUri(appVer: string): ConfigBuilder;
|
|
39
|
+
build(): any;
|
|
40
|
+
}
|
|
41
|
+
export declare class Config {
|
|
42
|
+
static Builder: typeof ConfigBuilder;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { int, long, Matrix, ByteBuffer, Runnable, float, String, View, Bitmap, Intent, EGLContext, Context, LiveSdkSetting } from './types';
|
|
2
|
+
import { VeLiveVideoBufferType, VeLivePixelFormat, VeLiveVideoRotation, VeLiveVideoEffectLicenseConfiguration, VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveOrientation, VeLivePusherLogLevel, VeLivePusherLogConfig, VeLiveAudioMixType, VeLiveStreamMixDescription, VeLiveAudioSampleRate, VeLiveAudioChannel, VeLiveAudioBufferType, VeLiveVideoCaptureConfiguration, VeLiveAudioCaptureConfiguration } from './keytype';
|
|
3
|
+
import { VeLiveVideoEffectCallback, VeLiveVideoEffectHandleCallback, VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveFileRecordingListener, VeLiveVideoFrameFilter, VeLiveAudioFrameFilter, VeLiveVideoFrameListener, VeLiveAudioFrameListener, VeLiveSnapshotListener, VeLiveMediaPlayerListener, VeLiveMediaPlayerFrameListener } from './callback';
|
|
4
|
+
export declare class VeLiveVideoFrame {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
ptsUs: number;
|
|
8
|
+
textureId: number;
|
|
9
|
+
data: any;
|
|
10
|
+
static new_VeLiveVideoFrame(): VeLiveVideoFrame;
|
|
11
|
+
static new_VeLiveVideoFrame_int$int$long$int$boolean$Matrix(width: int, height: int, pts: long, texId: int, isOes: boolean, matrix: Matrix): VeLiveVideoFrame;
|
|
12
|
+
static new_VeLiveVideoFrame_int$int$long$ByteBuffer(width: int, height: int, pts: long, byteBuffer: ByteBuffer): VeLiveVideoFrame;
|
|
13
|
+
static new_VeLiveVideoFrame_int$int$long$byte(width: int, height: int, pts: long, data: ArrayBuffer): VeLiveVideoFrame;
|
|
14
|
+
|
|
15
|
+
retain(): void;
|
|
16
|
+
|
|
17
|
+
release(): void;
|
|
18
|
+
|
|
19
|
+
getBufferType(): VeLiveVideoBufferType;
|
|
20
|
+
|
|
21
|
+
setBufferType(bufferType: VeLiveVideoBufferType): VeLiveVideoFrame;
|
|
22
|
+
|
|
23
|
+
getPixelFormat(): VeLivePixelFormat;
|
|
24
|
+
|
|
25
|
+
setPixelFormat(pixelFormat: VeLivePixelFormat): VeLiveVideoFrame;
|
|
26
|
+
|
|
27
|
+
getRotation(): VeLiveVideoRotation;
|
|
28
|
+
|
|
29
|
+
setRotation(rotation: VeLiveVideoRotation): VeLiveVideoFrame;
|
|
30
|
+
|
|
31
|
+
getWidth(): int;
|
|
32
|
+
|
|
33
|
+
getHeight(): int;
|
|
34
|
+
|
|
35
|
+
getRotatedWidth(): int;
|
|
36
|
+
|
|
37
|
+
getRotatedHeight(): int;
|
|
38
|
+
|
|
39
|
+
getPts(): long;
|
|
40
|
+
|
|
41
|
+
getTextureId(): int;
|
|
42
|
+
|
|
43
|
+
getTextureMatrix(): Matrix;
|
|
44
|
+
|
|
45
|
+
getBuffer(): ByteBuffer;
|
|
46
|
+
|
|
47
|
+
getData(): ArrayBuffer;
|
|
48
|
+
|
|
49
|
+
getReleaseCallback(): Runnable;
|
|
50
|
+
|
|
51
|
+
setReleaseCallback(releaseCallback: Runnable): VeLiveVideoFrame;
|
|
52
|
+
}
|
|
53
|
+
export declare class VeLiveCameraDevice {
|
|
54
|
+
|
|
55
|
+
CAMERA_DEVICE_CODE_OK: int;
|
|
56
|
+
|
|
57
|
+
CAMERA_DEVICE_CODE_NOT_LIVE: int;
|
|
58
|
+
|
|
59
|
+
CAMERA_DEVICE_CODE_NOT_SUPPORT: int;
|
|
60
|
+
|
|
61
|
+
CAMERA_DEVICE_CODE_PARAM_ILLEGAL: int;
|
|
62
|
+
|
|
63
|
+
CAMERA_DEVICE_CODE_ERROR_BASE: int;
|
|
64
|
+
|
|
65
|
+
setParameter(parameter: Parameter): int;
|
|
66
|
+
|
|
67
|
+
getParameter(): Parameter;
|
|
68
|
+
|
|
69
|
+
getRealFpsRange(): int[];
|
|
70
|
+
|
|
71
|
+
enableTorch(enable: boolean): int;
|
|
72
|
+
|
|
73
|
+
setZoomRatio(ratio: float): int;
|
|
74
|
+
|
|
75
|
+
getCurrentZoomRatio(): float;
|
|
76
|
+
|
|
77
|
+
getMaxZoomRatio(): float;
|
|
78
|
+
|
|
79
|
+
getMinZoomRatio(): float;
|
|
80
|
+
|
|
81
|
+
isAutoFocusEnabled(): boolean;
|
|
82
|
+
|
|
83
|
+
enableAutoFocus(enable: boolean): int;
|
|
84
|
+
|
|
85
|
+
setFocusPosition(viewW: int, viewH: int, x: int, y: int): int;
|
|
86
|
+
|
|
87
|
+
isExposurePositionSupported(): boolean;
|
|
88
|
+
|
|
89
|
+
setExposurePosition(viewW: int, viewH: int, x: int, y: int): int;
|
|
90
|
+
|
|
91
|
+
getMinExposureCompensation(): float;
|
|
92
|
+
|
|
93
|
+
getMaxExposureCompensation(): float;
|
|
94
|
+
|
|
95
|
+
setExposureCompensation(value: float): int;
|
|
96
|
+
}
|
|
97
|
+
export declare class VeLiveVideoEffectManager {
|
|
98
|
+
|
|
99
|
+
setupWithConfig(config: VeLiveVideoEffectLicenseConfiguration): int;
|
|
100
|
+
|
|
101
|
+
updateLicense(callback: VeLiveVideoEffectCallback): void;
|
|
102
|
+
|
|
103
|
+
setEnable(enable: boolean, callback: VeLiveVideoEffectCallback): void;
|
|
104
|
+
|
|
105
|
+
setAlgorithmModelPath(path: String): int;
|
|
106
|
+
|
|
107
|
+
setComposeNodes(nodes: String[]): int;
|
|
108
|
+
|
|
109
|
+
appendComposeNodes(nodes: String[]): int;
|
|
110
|
+
|
|
111
|
+
removeComposeNodes(nodes: String[]): int;
|
|
112
|
+
|
|
113
|
+
updateComposerNodeIntensity(node: String, key: String, intensity: float): int;
|
|
114
|
+
|
|
115
|
+
setFilter(path: String): int;
|
|
116
|
+
|
|
117
|
+
updateFilterIntensity(intensity: float): int;
|
|
118
|
+
|
|
119
|
+
setSticker(path: String): int;
|
|
120
|
+
|
|
121
|
+
setAdvancedFeature(callback: VeLiveVideoEffectHandleCallback, isGLThread: boolean, isAsync: boolean): int;
|
|
122
|
+
}
|
|
123
|
+
export declare class WrappedI420BufferFrame {
|
|
124
|
+
constructor(width: int, height: int, pts: long, rotation: VeLiveVideoRotation);
|
|
125
|
+
getDataY(): ByteBuffer;
|
|
126
|
+
getDataU(): ByteBuffer;
|
|
127
|
+
getDataV(): ByteBuffer;
|
|
128
|
+
}
|
|
129
|
+
export declare class VeLivePusher {
|
|
130
|
+
|
|
131
|
+
static getVersion(): String;
|
|
132
|
+
|
|
133
|
+
static setLogLevel(logLevel: VeLivePusherLogLevel): void;
|
|
134
|
+
|
|
135
|
+
static setLogConfig(config: VeLivePusherLogConfig): void;
|
|
136
|
+
|
|
137
|
+
static setEGLVersion(version: int): void;
|
|
138
|
+
|
|
139
|
+
static setEGLContext(context: EGLContext): void;
|
|
140
|
+
|
|
141
|
+
static getEGLContext(): EGLContext;
|
|
142
|
+
|
|
143
|
+
release(): void;
|
|
144
|
+
|
|
145
|
+
setObserver(observer: VeLivePusherObserver): void;
|
|
146
|
+
|
|
147
|
+
setStatisticsObserver(observer: VeLivePusherStatisticsObserver, interval: int): void;
|
|
148
|
+
|
|
149
|
+
setRenderView(view: View): Promise<void>;
|
|
150
|
+
|
|
151
|
+
setRenderFillMode(mode: VeLivePusherRenderMode): void;
|
|
152
|
+
|
|
153
|
+
setVideoMirror(type: VeLiveVideoMirrorType, mirror: boolean): void;
|
|
154
|
+
|
|
155
|
+
startVideoCapture(type: VeLiveVideoCaptureType): void;
|
|
156
|
+
|
|
157
|
+
stopVideoCapture(): void;
|
|
158
|
+
|
|
159
|
+
startAudioCapture(type: VeLiveAudioCaptureType): void;
|
|
160
|
+
|
|
161
|
+
stopAudioCapture(): void;
|
|
162
|
+
|
|
163
|
+
switchVideoCapture(type: VeLiveVideoCaptureType): void;
|
|
164
|
+
|
|
165
|
+
switchAudioCapture(type: VeLiveAudioCaptureType): void;
|
|
166
|
+
|
|
167
|
+
getCurrentVideoCaptureType(): VeLiveVideoCaptureType;
|
|
168
|
+
|
|
169
|
+
getCurrentAudioCaptureType(): VeLiveAudioCaptureType;
|
|
170
|
+
|
|
171
|
+
updateCustomImage(image: Bitmap): Promise<void>;
|
|
172
|
+
|
|
173
|
+
getCameraDevice(): VeLiveCameraDevice;
|
|
174
|
+
|
|
175
|
+
setVideoEncoderConfiguration(config: VeLiveVideoEncoderConfiguration): void;
|
|
176
|
+
|
|
177
|
+
getVideoEncoderConfiguration(): VeLiveVideoEncoderConfiguration;
|
|
178
|
+
|
|
179
|
+
setAudioEncoderConfiguration(config: VeLiveAudioEncoderConfiguration): void;
|
|
180
|
+
|
|
181
|
+
getAudioEncoderConfiguration(): VeLiveAudioEncoderConfiguration;
|
|
182
|
+
|
|
183
|
+
startPush(url: String): void;
|
|
184
|
+
|
|
185
|
+
startPushWithUrls(urls: String[]): void;
|
|
186
|
+
|
|
187
|
+
stopPush(): void;
|
|
188
|
+
|
|
189
|
+
isPushing(): boolean;
|
|
190
|
+
|
|
191
|
+
setWatermark(image: Bitmap, x: float, y: float, scale: float): Promise<int>;
|
|
192
|
+
|
|
193
|
+
startFileRecording(path: String, config: VeLiveFileRecorderConfiguration, listener: VeLiveFileRecordingListener): void;
|
|
194
|
+
|
|
195
|
+
stopFileRecording(): void;
|
|
196
|
+
|
|
197
|
+
setProperty(key: String, value: Object): int;
|
|
198
|
+
|
|
199
|
+
pushExternalVideoFrame(frame: VeLiveVideoFrame): int;
|
|
200
|
+
|
|
201
|
+
pushExternalAudioFrame(frame: VeLiveAudioFrame): int;
|
|
202
|
+
|
|
203
|
+
setOrientation(orientation: VeLiveOrientation): void;
|
|
204
|
+
|
|
205
|
+
sendSeiMessage(key: String, value: Object, repeat: int, isKeyFrame: boolean, allowsCovered: boolean): int;
|
|
206
|
+
|
|
207
|
+
setMute(mute: boolean): void;
|
|
208
|
+
|
|
209
|
+
isMute(): boolean;
|
|
210
|
+
|
|
211
|
+
getVideoEffectManager(): VeLiveVideoEffectManager;
|
|
212
|
+
|
|
213
|
+
setVideoFrameFilter(filter: VeLiveVideoFrameFilter): void;
|
|
214
|
+
|
|
215
|
+
getAudioDevice(): VeLiveAudioDevice;
|
|
216
|
+
|
|
217
|
+
setAudioFrameFilter(filter: VeLiveAudioFrameFilter): void;
|
|
218
|
+
|
|
219
|
+
createPlayer(): VeLiveMediaPlayer;
|
|
220
|
+
|
|
221
|
+
getMixerManager(): VeLiveMixerManager;
|
|
222
|
+
|
|
223
|
+
startScreenRecording(enableAppAudio: boolean, screenIntent: Intent): void;
|
|
224
|
+
|
|
225
|
+
stopScreenRecording(): void;
|
|
226
|
+
|
|
227
|
+
isScreenRecording(): boolean;
|
|
228
|
+
|
|
229
|
+
addVideoFrameListener(listener: VeLiveVideoFrameListener): int;
|
|
230
|
+
|
|
231
|
+
removeVideoFrameListener(listener: VeLiveVideoFrameListener): int;
|
|
232
|
+
|
|
233
|
+
addAudioFrameListener(listener: VeLiveAudioFrameListener): int;
|
|
234
|
+
|
|
235
|
+
removeAudioFrameListener(listener: VeLiveAudioFrameListener): int;
|
|
236
|
+
|
|
237
|
+
snapshot(listener: VeLiveSnapshotListener): void;
|
|
238
|
+
}
|
|
239
|
+
export declare class Parameter {
|
|
240
|
+
static readonly WIDTH: String;
|
|
241
|
+
static readonly HEIGHT: String;
|
|
242
|
+
static readonly FPS: String;
|
|
243
|
+
static readonly ZOOM: String;
|
|
244
|
+
static readonly FOCUS_MODE: String;
|
|
245
|
+
static readonly FOCUS_MODE_AUTO: String;
|
|
246
|
+
static readonly CURRENT_ISO: String;
|
|
247
|
+
setInt(key: String, value: int): int;
|
|
248
|
+
getInt(key: String): int;
|
|
249
|
+
setFloat(key: String, value: float): int;
|
|
250
|
+
getFloat(key: String): float;
|
|
251
|
+
}
|
|
252
|
+
export declare class VeLiveMixerManager {
|
|
253
|
+
|
|
254
|
+
addVideoStream(): int;
|
|
255
|
+
|
|
256
|
+
addAudioStream(): int;
|
|
257
|
+
|
|
258
|
+
addAudioStream_VeLiveAudioMixType(type: VeLiveAudioMixType): int;
|
|
259
|
+
|
|
260
|
+
getOriginVideoStream(): int;
|
|
261
|
+
|
|
262
|
+
getOriginAudioStream(): int;
|
|
263
|
+
|
|
264
|
+
getOriginScreenStream(): int;
|
|
265
|
+
|
|
266
|
+
getOriginSystemAudioStream(): int;
|
|
267
|
+
|
|
268
|
+
sendCustomVideoFrame(frame: VeLiveVideoFrame, streamId: int): void;
|
|
269
|
+
|
|
270
|
+
sendCustomAudioFrame(frame: VeLiveAudioFrame, streamId: int): void;
|
|
271
|
+
|
|
272
|
+
updateStreamMixDescription(mixDescription: VeLiveStreamMixDescription): void;
|
|
273
|
+
|
|
274
|
+
removeVideoStream(streamId: int): void;
|
|
275
|
+
|
|
276
|
+
removeAudioStream(streamId: int): void;
|
|
277
|
+
}
|
|
278
|
+
export declare class VeLiveMediaPlayer {
|
|
279
|
+
|
|
280
|
+
release(): void;
|
|
281
|
+
|
|
282
|
+
setListener(listener: VeLiveMediaPlayerListener): void;
|
|
283
|
+
|
|
284
|
+
prepare(url: String): int;
|
|
285
|
+
|
|
286
|
+
start(): int;
|
|
287
|
+
|
|
288
|
+
stop(): int;
|
|
289
|
+
|
|
290
|
+
pause(): void;
|
|
291
|
+
|
|
292
|
+
resume(): void;
|
|
293
|
+
|
|
294
|
+
getDuration(): long;
|
|
295
|
+
|
|
296
|
+
seek(posMs: long): int;
|
|
297
|
+
|
|
298
|
+
enableMixer(enable: boolean): void;
|
|
299
|
+
|
|
300
|
+
enableAutoEq(sourceLufs: float, targetLufs: float): void;
|
|
301
|
+
|
|
302
|
+
setRenderView(view: View): void;
|
|
303
|
+
|
|
304
|
+
setFrameListener(listener: VeLiveMediaPlayerFrameListener): void;
|
|
305
|
+
|
|
306
|
+
setBGMVolume(volume: float): void;
|
|
307
|
+
|
|
308
|
+
setVoiceVolume(volume: float): void;
|
|
309
|
+
|
|
310
|
+
enableBGMLoop(loop: boolean): void;
|
|
311
|
+
}
|
|
312
|
+
export declare class VeLiveAudioFrame {
|
|
313
|
+
bufferType: any;
|
|
314
|
+
sampleRate: any;
|
|
315
|
+
channels: any;
|
|
316
|
+
ptsUs: any;
|
|
317
|
+
buffer: any;
|
|
318
|
+
samplesPerChannel: any;
|
|
319
|
+
static new_VeLiveAudioFrame_VeLiveAudioSampleRate$VeLiveAudioChannel$long$ByteBuffer(sampleRate: VeLiveAudioSampleRate, channel: VeLiveAudioChannel, pts: long, buffer: ByteBuffer): VeLiveAudioFrame;
|
|
320
|
+
|
|
321
|
+
getBufferType(): VeLiveAudioBufferType;
|
|
322
|
+
|
|
323
|
+
getSampleRate(): VeLiveAudioSampleRate;
|
|
324
|
+
|
|
325
|
+
getChannels(): VeLiveAudioChannel;
|
|
326
|
+
|
|
327
|
+
getSamplesPerChannel(): int;
|
|
328
|
+
|
|
329
|
+
getPts(): long;
|
|
330
|
+
|
|
331
|
+
getBuffer(): ByteBuffer;
|
|
332
|
+
}
|
|
333
|
+
export declare class VeLiveAudioDevice {
|
|
334
|
+
|
|
335
|
+
setVoiceLoudness(level: float): void;
|
|
336
|
+
|
|
337
|
+
getVoiceLoudness(): float;
|
|
338
|
+
|
|
339
|
+
isSupportHardwareEcho(): boolean;
|
|
340
|
+
|
|
341
|
+
enableEcho(enable: boolean): void;
|
|
342
|
+
|
|
343
|
+
isEnableEcho(): boolean;
|
|
344
|
+
}
|
|
345
|
+
export declare class VeLivePusherConfiguration {
|
|
346
|
+
|
|
347
|
+
setReconnectIntervalSeconds(interval: int): VeLivePusherConfiguration;
|
|
348
|
+
|
|
349
|
+
getReconnectIntervalSeconds(): int;
|
|
350
|
+
|
|
351
|
+
setReconnectCount(maxCount: int): VeLivePusherConfiguration;
|
|
352
|
+
|
|
353
|
+
getReconnectCount(): int;
|
|
354
|
+
|
|
355
|
+
setVideoCaptureConfig(config: VeLiveVideoCaptureConfiguration): VeLivePusherConfiguration;
|
|
356
|
+
|
|
357
|
+
getVideoCaptureConfig(): VeLiveVideoCaptureConfiguration;
|
|
358
|
+
|
|
359
|
+
setAudioCaptureConfig(config: VeLiveAudioCaptureConfiguration): VeLivePusherConfiguration;
|
|
360
|
+
|
|
361
|
+
getAudioCaptureConfig(): VeLiveAudioCaptureConfiguration;
|
|
362
|
+
|
|
363
|
+
setContext(context: Context): VeLivePusherConfiguration;
|
|
364
|
+
|
|
365
|
+
getContext(): Context;
|
|
366
|
+
|
|
367
|
+
setExtraParameters(params: String): VeLivePusherConfiguration;
|
|
368
|
+
|
|
369
|
+
getExtraParams(): LiveSdkSetting;
|
|
370
|
+
|
|
371
|
+
build(): VeLivePusher;
|
|
372
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { VeLiveVideoFrame, VeLiveAudioFrame } from './api';
|
|
2
|
+
import { int, String, Bundle, long, Bitmap, float, JSONObject } from './types';
|
|
3
|
+
import { VeLiveVideoFrameSource, VeLiveAudioFrameSource, VeLivePusherStatus, VeLiveFirstFrameType, VeLiveNetworkQuality, VeLiveAudioPowerLevel, VeLivePusherStatistics } from './keytype';
|
|
4
|
+
export declare class VeLiveVideoFrameFilter {
|
|
5
|
+
|
|
6
|
+
onVideoProcess?(srcFrame: VeLiveVideoFrame, dstFrame: VeLiveVideoFrame): int;
|
|
7
|
+
}
|
|
8
|
+
export declare class VeLiveVideoFrameListener {
|
|
9
|
+
|
|
10
|
+
getObservedVideoFrameSource?(): VeLiveVideoFrameSource;
|
|
11
|
+
|
|
12
|
+
onCaptureVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
13
|
+
|
|
14
|
+
onPreEncodeVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
15
|
+
}
|
|
16
|
+
export declare class VeLiveVideoEffectCallback {
|
|
17
|
+
|
|
18
|
+
onResult?(result: int, msg: String): void;
|
|
19
|
+
}
|
|
20
|
+
export declare class VeLiveMediaPlayerListener {
|
|
21
|
+
|
|
22
|
+
onStart?(info: Bundle): void;
|
|
23
|
+
|
|
24
|
+
onProgress?(timeMs: long): void;
|
|
25
|
+
|
|
26
|
+
onStop?(): void;
|
|
27
|
+
|
|
28
|
+
onError?(code: int, msg: String): void;
|
|
29
|
+
}
|
|
30
|
+
export declare class VeLiveAudioFrameListener {
|
|
31
|
+
|
|
32
|
+
getObservedAudioFrameSource?(): VeLiveAudioFrameSource;
|
|
33
|
+
|
|
34
|
+
onCaptureAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
35
|
+
|
|
36
|
+
onPreEncodeAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
37
|
+
}
|
|
38
|
+
export declare class VeLiveMediaPlayerFrameListener {
|
|
39
|
+
|
|
40
|
+
onAudioFrame?(frame: VeLiveAudioFrame): void;
|
|
41
|
+
|
|
42
|
+
onVideoFrame?(frame: VeLiveVideoFrame): void;
|
|
43
|
+
}
|
|
44
|
+
export declare class VeLiveSnapshotListener {
|
|
45
|
+
|
|
46
|
+
onSnapshotComplete?(image: Bitmap): void;
|
|
47
|
+
}
|
|
48
|
+
export declare class VeLiveAudioFrameFilter {
|
|
49
|
+
|
|
50
|
+
onAudioProcess?(srcFrame: VeLiveAudioFrame, dstFrame: VeLiveAudioFrame): int;
|
|
51
|
+
}
|
|
52
|
+
export declare class VeLivePusherObserver {
|
|
53
|
+
|
|
54
|
+
onError?(code: int, subCode: int, msg: String): void;
|
|
55
|
+
|
|
56
|
+
onStatusChange?(status: VeLivePusherStatus): void;
|
|
57
|
+
|
|
58
|
+
onFirstVideoFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
|
|
59
|
+
|
|
60
|
+
onFirstAudioFrame?(type: VeLiveFirstFrameType, timestampMs: long): void;
|
|
61
|
+
|
|
62
|
+
onCameraOpened?(open: boolean): void;
|
|
63
|
+
|
|
64
|
+
onMicrophoneOpened?(open: boolean): void;
|
|
65
|
+
|
|
66
|
+
onScreenRecording?(open: boolean): void;
|
|
67
|
+
|
|
68
|
+
onNetworkQuality?(quality: VeLiveNetworkQuality): void;
|
|
69
|
+
|
|
70
|
+
onAudioPowerQuality?(level: VeLiveAudioPowerLevel, value: float): void;
|
|
71
|
+
}
|
|
72
|
+
export declare class VeLivePusherStatisticsObserver {
|
|
73
|
+
|
|
74
|
+
onStatistics?(statistics: VeLivePusherStatistics): void;
|
|
75
|
+
|
|
76
|
+
onLogMonitor?(logInfo: JSONObject): void;
|
|
77
|
+
}
|
|
78
|
+
export declare class VeLivePusherDef {
|
|
79
|
+
}
|
|
80
|
+
export declare class VeLiveFileRecordingListener {
|
|
81
|
+
|
|
82
|
+
onFileRecordingStarted?(): void;
|
|
83
|
+
|
|
84
|
+
onFileRecordingStopped?(): void;
|
|
85
|
+
|
|
86
|
+
onFileRecordingError?(errorCode: int, message: String): void;
|
|
87
|
+
}
|
|
88
|
+
export declare class VeLiveVideoEffectHandleCallback {
|
|
89
|
+
|
|
90
|
+
onEffectHandle?(handle: Object): void;
|
|
91
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum VeLivePusherErrorCode {
|
|
2
|
+
|
|
3
|
+
VeLivePusherSuccess = 0,
|
|
4
|
+
|
|
5
|
+
VeLivePusherInvalidLicense = 1,
|
|
6
|
+
|
|
7
|
+
VeLivePusherInvalidParameter = 2,
|
|
8
|
+
|
|
9
|
+
VeLivePusherVideoCaptureError = 3,
|
|
10
|
+
|
|
11
|
+
VeLivePusherAudioCaptureError = 4,
|
|
12
|
+
|
|
13
|
+
VeLivePusherVideoEncoderError = 5,
|
|
14
|
+
|
|
15
|
+
VeLivePusherAudioEncoderError = 6,
|
|
16
|
+
|
|
17
|
+
VeLivePusherTransportError = 7,
|
|
18
|
+
|
|
19
|
+
VeLivePusherVideoEffectError = 8,
|
|
20
|
+
|
|
21
|
+
VeLivePusherAudioDeviceError = 9,
|
|
22
|
+
|
|
23
|
+
VeLivePusherLicenseUnsupportedH265 = 10,
|
|
24
|
+
|
|
25
|
+
VeLivePusherError = 11
|
|
26
|
+
}
|