@byteplus/react-native-live-pull 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 +93 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/AndroidManifestNew.xml +8 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/NativeVariableManager.java +15 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModule.java +108 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModuleSpec.java +17 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLivePackage.java +27 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcView.java +32 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcViewManager.java +87 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/autogen/MethodSignature.java +129 -0
- package/ios/VeLivePullSDK.h +24 -0
- package/ios/VeLivePullSDK.m +91 -0
- package/ios/VeLivePullView.h +25 -0
- package/ios/VeLivePullView.m +74 -0
- package/ios/VeLivePullViewManager.m +59 -0
- package/lib/commonjs/index.js +10697 -0
- package/lib/module/index.js +10684 -0
- package/lib/typescript/codegen/android/api.d.ts +61 -0
- package/lib/typescript/codegen/android/callback.d.ts +40 -0
- package/lib/typescript/codegen/android/errorcode.d.ts +53 -0
- package/lib/typescript/codegen/android/index.d.ts +5 -0
- package/lib/typescript/codegen/android/keytype.d.ts +263 -0
- package/lib/typescript/codegen/android/types.d.ts +30 -0
- package/lib/typescript/codegen/ios/api.d.ts +81 -0
- package/lib/typescript/codegen/ios/callback.d.ts +44 -0
- package/lib/typescript/codegen/ios/errorcode.d.ts +56 -0
- package/lib/typescript/codegen/ios/index.d.ts +5 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +271 -0
- package/lib/typescript/codegen/ios/types.d.ts +35 -0
- package/lib/typescript/codegen/pack/api.d.ts +381 -0
- package/lib/typescript/codegen/pack/callback.d.ts +217 -0
- package/lib/typescript/codegen/pack/errorcode.d.ts +150 -0
- package/lib/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/typescript/codegen/pack/keytype.d.ts +931 -0
- package/lib/typescript/codegen/pack/types.d.ts +1 -0
- package/lib/typescript/component.d.ts +8 -0
- package/lib/typescript/core/api.d.ts +1 -0
- package/lib/typescript/core/callback.d.ts +1 -0
- package/lib/typescript/core/env.d.ts +38 -0
- package/lib/typescript/core/errorcode.d.ts +1 -0
- package/lib/typescript/core/index.d.ts +6 -0
- package/lib/typescript/core/keytype.d.ts +1 -0
- package/lib/typescript/core/player.d.ts +16 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/platforms/android/extends.d.ts +39 -0
- package/lib/typescript/platforms/ios/extends.d.ts +41 -0
- package/lib/typescript/runtime/index.d.ts +1 -0
- package/package.json +32 -0
- package/react-native-velive-pull.podspec +45 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { VeLivePlayerConfiguration, VeLivePlayerFillMode, VeLivePlayerStreamData, VeLivePlayerResolution, VeLivePlayerPixelFormat, VeLivePlayerVideoBufferType, VeLivePlayerRotation, VeLivePlayerMirror, VeLivePlayerLogLevel } from './keytype';
|
|
2
|
+
import { VeLivePlayerObserver } from './callback';
|
|
3
|
+
import { SurfaceHolder, Surface, String, float, Map, List, int } from './types';
|
|
4
|
+
import { ApplicationContext } from '../../platforms/android/extends';
|
|
5
|
+
export declare class VeLivePlayer {
|
|
6
|
+
|
|
7
|
+
static getVersion(): String;
|
|
8
|
+
|
|
9
|
+
static setLogLevel(logLevel: VeLivePlayerLogLevel): void;
|
|
10
|
+
|
|
11
|
+
setConfig(config: VeLivePlayerConfiguration): void;
|
|
12
|
+
|
|
13
|
+
setObserver(observer: VeLivePlayerObserver): void;
|
|
14
|
+
|
|
15
|
+
setRenderFillMode(fillMode: VeLivePlayerFillMode): Promise<void>;
|
|
16
|
+
|
|
17
|
+
setSurfaceHolder(surfaceHolder: SurfaceHolder): void;
|
|
18
|
+
|
|
19
|
+
setSurface(surface: Surface): void;
|
|
20
|
+
|
|
21
|
+
setPlayUrl(url: String): void;
|
|
22
|
+
|
|
23
|
+
setPlayStreamData(streamData: VeLivePlayerStreamData): void;
|
|
24
|
+
|
|
25
|
+
play(): void;
|
|
26
|
+
|
|
27
|
+
pause(): void;
|
|
28
|
+
|
|
29
|
+
stop(): void;
|
|
30
|
+
|
|
31
|
+
destroy(): void;
|
|
32
|
+
|
|
33
|
+
switchResolution(resolution: VeLivePlayerResolution): boolean;
|
|
34
|
+
|
|
35
|
+
isPlaying(): boolean;
|
|
36
|
+
|
|
37
|
+
setPlayerVolume(volume: float): void;
|
|
38
|
+
|
|
39
|
+
setMute(mute: boolean): void;
|
|
40
|
+
|
|
41
|
+
isMute(): boolean;
|
|
42
|
+
|
|
43
|
+
setUrlHostIP(hostIpMap: Map<String, List<String>>): void;
|
|
44
|
+
|
|
45
|
+
setProperty(key: String, value: Object): void;
|
|
46
|
+
|
|
47
|
+
snapshot(): int;
|
|
48
|
+
|
|
49
|
+
enableVideoFrameObserver(enable: boolean, pixelFormat: VeLivePlayerPixelFormat, bufferType: VeLivePlayerVideoBufferType): void;
|
|
50
|
+
|
|
51
|
+
enableAudioFrameObserver(enable: boolean, enableRendering: boolean): void;
|
|
52
|
+
|
|
53
|
+
setRenderRotation(rotation: VeLivePlayerRotation): Promise<void>;
|
|
54
|
+
|
|
55
|
+
setRenderMirror(mirror: VeLivePlayerMirror): Promise<void>;
|
|
56
|
+
|
|
57
|
+
setEnableSuperResolution(enable: boolean): void;
|
|
58
|
+
|
|
59
|
+
setEnableSharpen(enable: boolean): void;
|
|
60
|
+
constructor(context: ApplicationContext);
|
|
61
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VeLivePlayer } from './api';
|
|
2
|
+
import { VeLivePlayerError } from './errorcode';
|
|
3
|
+
import { long, int, String, Bitmap } from './types';
|
|
4
|
+
import { VeLivePlayerResolution, VeLivePlayerResolutionSwitchReason, VeLivePlayerStreamType, VeLivePlayerStatus, VeLivePlayerStatistics, VeLivePlayerVideoFrame, VeLivePlayerAudioFrame } from './keytype';
|
|
5
|
+
export declare class VeLivePlayerObserver {
|
|
6
|
+
|
|
7
|
+
onError?(player: VeLivePlayer, error: VeLivePlayerError): void;
|
|
8
|
+
|
|
9
|
+
onFirstVideoFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
|
|
10
|
+
|
|
11
|
+
onFirstAudioFrameRender?(player: VeLivePlayer, isFirstFrame: boolean): void;
|
|
12
|
+
|
|
13
|
+
onStallStart?(player: VeLivePlayer): void;
|
|
14
|
+
|
|
15
|
+
onStallEnd?(player: VeLivePlayer): void;
|
|
16
|
+
|
|
17
|
+
onVideoRenderStall?(player: VeLivePlayer, stallTime: long): void;
|
|
18
|
+
|
|
19
|
+
onAudioRenderStall?(player: VeLivePlayer, stallTime: long): void;
|
|
20
|
+
|
|
21
|
+
onResolutionSwitch?(player: VeLivePlayer, resolution: VeLivePlayerResolution, error: VeLivePlayerError, reason: VeLivePlayerResolutionSwitchReason): void;
|
|
22
|
+
|
|
23
|
+
onVideoSizeChanged?(player: VeLivePlayer, width: int, height: int): void;
|
|
24
|
+
|
|
25
|
+
onReceiveSeiMessage?(player: VeLivePlayer, message: String): void;
|
|
26
|
+
|
|
27
|
+
onMainBackupSwitch?(player: VeLivePlayer, streamType: VeLivePlayerStreamType, error: VeLivePlayerError): void;
|
|
28
|
+
|
|
29
|
+
onPlayerStatusUpdate?(player: VeLivePlayer, status: VeLivePlayerStatus): void;
|
|
30
|
+
|
|
31
|
+
onStatistics?(player: VeLivePlayer, statistics: VeLivePlayerStatistics): void;
|
|
32
|
+
|
|
33
|
+
onSnapshotComplete?(player: VeLivePlayer, bitmap: Bitmap): void;
|
|
34
|
+
|
|
35
|
+
onRenderVideoFrame?(player: VeLivePlayer, videoFrame: VeLivePlayerVideoFrame): void;
|
|
36
|
+
|
|
37
|
+
onRenderAudioFrame?(player: VeLivePlayer, audioFrame: VeLivePlayerAudioFrame): void;
|
|
38
|
+
|
|
39
|
+
onStreamFailedOpenSuperResolution?(player: VeLivePlayer, error: VeLivePlayerError): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { int, String } from './types';
|
|
2
|
+
export declare class VeLivePlayerError {
|
|
3
|
+
|
|
4
|
+
mErrorCode: int;
|
|
5
|
+
|
|
6
|
+
mErrorMsg: String;
|
|
7
|
+
static new_VeLivePlayerError_int(errorCode: int): VeLivePlayerError;
|
|
8
|
+
static new_VeLivePlayerError_int$String(errorCode: int, errorMsg: String): VeLivePlayerError;
|
|
9
|
+
}
|
|
10
|
+
export declare enum VeLivePlayerErrorCode {
|
|
11
|
+
|
|
12
|
+
VeLivePlayerNoError = 0,
|
|
13
|
+
|
|
14
|
+
VeLivePlayerInvalidLicense = -1,
|
|
15
|
+
|
|
16
|
+
VeLivePlayerInvalidParameter = -2,
|
|
17
|
+
|
|
18
|
+
VeLivePlayerErrorRefused = -3,
|
|
19
|
+
|
|
20
|
+
VeLivePlayerErrorLibraryLoadFailed = -4,
|
|
21
|
+
|
|
22
|
+
VeLivePlayerErrorPlayUrl = -100,
|
|
23
|
+
|
|
24
|
+
VeLivePlayerErrorNoStreamData = -101,
|
|
25
|
+
|
|
26
|
+
VeLivePlayerErrorInternalRetryStart = -102,
|
|
27
|
+
|
|
28
|
+
VeLivePlayerErrorInternalRetryFailed = -103,
|
|
29
|
+
|
|
30
|
+
VeLivePlayerErrorDnsParseFailed = -200,
|
|
31
|
+
|
|
32
|
+
VeLivePlayerErrorNetworkRequestFailed = -201,
|
|
33
|
+
|
|
34
|
+
VeLivePlayerErrorDemuxFailed = -300,
|
|
35
|
+
|
|
36
|
+
VeLivePlayerErrorDecodeFailed = -301,
|
|
37
|
+
|
|
38
|
+
VeLivePlayerErrorAVOutputFailed = -302,
|
|
39
|
+
|
|
40
|
+
VeLivePlayerErrorSRDeviceUnsupported = -303,
|
|
41
|
+
|
|
42
|
+
VeLivePlayerErrorSRResolutionUnsupported = -304,
|
|
43
|
+
|
|
44
|
+
VeLivePlayerErrorSRFpsUnsupported = -305,
|
|
45
|
+
|
|
46
|
+
VeLivePlayerErrorSRInitFail = -306,
|
|
47
|
+
|
|
48
|
+
VeLivePlayerErrorSRExecuteFail = -307,
|
|
49
|
+
|
|
50
|
+
VeLivePlayerLicenseUnsupportedH265 = -308,
|
|
51
|
+
|
|
52
|
+
VeLivePlayerErrorInternal = -999
|
|
53
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { int, String, List, long, float, ByteBuffer, EGLContext } from './types';
|
|
2
|
+
export declare enum VeLivePlayerResolution {
|
|
3
|
+
|
|
4
|
+
VeLivePlayerResolutionOrigin = 0,
|
|
5
|
+
|
|
6
|
+
VeLivePlayerResolutionUHD = 1,
|
|
7
|
+
|
|
8
|
+
VeLivePlayerResolutionHD = 2,
|
|
9
|
+
|
|
10
|
+
VeLivePlayerResolutionSD = 3,
|
|
11
|
+
|
|
12
|
+
VeLivePlayerResolutionLD = 4
|
|
13
|
+
}
|
|
14
|
+
export declare class VeLivePlayerConfiguration {
|
|
15
|
+
|
|
16
|
+
enableSei: boolean;
|
|
17
|
+
|
|
18
|
+
enableHardwareDecode: boolean;
|
|
19
|
+
|
|
20
|
+
networkTimeoutMs: int;
|
|
21
|
+
|
|
22
|
+
retryIntervalTimeMs: int;
|
|
23
|
+
|
|
24
|
+
retryMaxCount: int;
|
|
25
|
+
|
|
26
|
+
enableLiveDNS: boolean;
|
|
27
|
+
|
|
28
|
+
enableStatisticsCallback: boolean;
|
|
29
|
+
|
|
30
|
+
statisticsCallbackInterval: int;
|
|
31
|
+
}
|
|
32
|
+
export declare enum VeLivePlayerFormat {
|
|
33
|
+
|
|
34
|
+
VeLivePlayerFormatFLV = 0,
|
|
35
|
+
|
|
36
|
+
VeLivePlayerFormatHLS = 1,
|
|
37
|
+
|
|
38
|
+
VeLivePlayerFormatRTM = 2
|
|
39
|
+
}
|
|
40
|
+
export declare enum VeLivePlayerProtocol {
|
|
41
|
+
|
|
42
|
+
VeLivePlayerProtocolTCP = 0,
|
|
43
|
+
|
|
44
|
+
VeLivePlayerProtocolQUIC = 1,
|
|
45
|
+
|
|
46
|
+
VeLivePlayerProtocolTLS = 2
|
|
47
|
+
}
|
|
48
|
+
export declare enum VeLivePlayerMirror {
|
|
49
|
+
|
|
50
|
+
VeLivePlayerMirrorNone = 0,
|
|
51
|
+
|
|
52
|
+
VeLivePlayerMirrorHorizontal = 1,
|
|
53
|
+
|
|
54
|
+
VeLivePlayerMirrorVertical = 2
|
|
55
|
+
}
|
|
56
|
+
export declare enum VeLivePlayerVideoBufferType {
|
|
57
|
+
|
|
58
|
+
VeLivePlayerVideoBufferTypeUnknown = 0,
|
|
59
|
+
|
|
60
|
+
VeLivePlayerVideoBufferTypeByteBuffer = 1,
|
|
61
|
+
|
|
62
|
+
VeLivePlayerVideoBufferTypeByteArray = 2,
|
|
63
|
+
|
|
64
|
+
VeLivePlayerVideoBufferTypeTexture = 3
|
|
65
|
+
}
|
|
66
|
+
export declare enum VeLivePlayerStatus {
|
|
67
|
+
|
|
68
|
+
VeLivePlayerStatusStopped = 0,
|
|
69
|
+
|
|
70
|
+
VeLivePlayerStatusPaused = 1,
|
|
71
|
+
|
|
72
|
+
VeLivePlayerStatusPrepared = 2,
|
|
73
|
+
|
|
74
|
+
VeLivePlayerStatusPlaying = 3,
|
|
75
|
+
|
|
76
|
+
VeLivePlayerStatusError = 4
|
|
77
|
+
}
|
|
78
|
+
export declare class VeLivePlayerLogConfig {
|
|
79
|
+
|
|
80
|
+
deviceID: String;
|
|
81
|
+
|
|
82
|
+
logPath: String;
|
|
83
|
+
|
|
84
|
+
maxLogSizeM: int;
|
|
85
|
+
|
|
86
|
+
singleLogSizeM: int;
|
|
87
|
+
|
|
88
|
+
logExpireTimeS: int;
|
|
89
|
+
|
|
90
|
+
enableConsole: boolean;
|
|
91
|
+
|
|
92
|
+
enableLogFile: boolean;
|
|
93
|
+
|
|
94
|
+
queryUrl: String;
|
|
95
|
+
|
|
96
|
+
enableThreadLoop: boolean;
|
|
97
|
+
|
|
98
|
+
intervalMS: int;
|
|
99
|
+
|
|
100
|
+
httpTimeoutMS: int;
|
|
101
|
+
|
|
102
|
+
httpUploadFileTimeoutMS: int;
|
|
103
|
+
|
|
104
|
+
logLevel: VeLivePlayerLogLevel;
|
|
105
|
+
}
|
|
106
|
+
export declare class VeLivePlayerStreamData {
|
|
107
|
+
|
|
108
|
+
enableABR: boolean;
|
|
109
|
+
|
|
110
|
+
enableMainBackupSwitch: boolean;
|
|
111
|
+
|
|
112
|
+
defaultResolution: VeLivePlayerResolution;
|
|
113
|
+
|
|
114
|
+
defaultFormat: VeLivePlayerFormat;
|
|
115
|
+
|
|
116
|
+
defaultProtocol: VeLivePlayerProtocol;
|
|
117
|
+
|
|
118
|
+
mainStreamList: List<VeLivePlayerStream>;
|
|
119
|
+
|
|
120
|
+
backupStreamList: List<VeLivePlayerStream>;
|
|
121
|
+
}
|
|
122
|
+
export declare enum VeLivePlayerResolutionSwitchReason {
|
|
123
|
+
|
|
124
|
+
VeLiveplayerResolutionSwitchByAuto = 0,
|
|
125
|
+
|
|
126
|
+
VeLiveplayerResolutionSwitchByManual = 1
|
|
127
|
+
}
|
|
128
|
+
export declare class VeLivePlayerStream {
|
|
129
|
+
|
|
130
|
+
url: String;
|
|
131
|
+
|
|
132
|
+
resolution: VeLivePlayerResolution;
|
|
133
|
+
|
|
134
|
+
bitrate: long;
|
|
135
|
+
|
|
136
|
+
format: VeLivePlayerFormat;
|
|
137
|
+
|
|
138
|
+
streamType: VeLivePlayerStreamType;
|
|
139
|
+
constructor();
|
|
140
|
+
}
|
|
141
|
+
export declare enum VeLivePlayerFillMode {
|
|
142
|
+
|
|
143
|
+
VeLivePlayerFillModeAspectFit = 0,
|
|
144
|
+
|
|
145
|
+
VeLivePlayerFillModeFullFill = 1,
|
|
146
|
+
|
|
147
|
+
VeLivePlayerFillModeAspectFill = 2
|
|
148
|
+
}
|
|
149
|
+
export declare enum VeLivePlayerPixelFormat {
|
|
150
|
+
|
|
151
|
+
VeLivePlayerPixelFormatUnknown = 0,
|
|
152
|
+
|
|
153
|
+
VeLivePlayerPixelFormatRGBA32 = 1,
|
|
154
|
+
|
|
155
|
+
VeLivePlayerPixelFormatTexture = 2
|
|
156
|
+
}
|
|
157
|
+
export declare class VeLivePlayerStatistics {
|
|
158
|
+
|
|
159
|
+
url: String;
|
|
160
|
+
|
|
161
|
+
isHardwareDecode: boolean;
|
|
162
|
+
|
|
163
|
+
videoCodec: String;
|
|
164
|
+
|
|
165
|
+
stallTimeMs: long;
|
|
166
|
+
|
|
167
|
+
bandwidthEstimation: long;
|
|
168
|
+
|
|
169
|
+
delayMs: long;
|
|
170
|
+
|
|
171
|
+
width: int;
|
|
172
|
+
|
|
173
|
+
height: int;
|
|
174
|
+
|
|
175
|
+
fps: float;
|
|
176
|
+
|
|
177
|
+
bitrate: long;
|
|
178
|
+
|
|
179
|
+
videoBufferMs: long;
|
|
180
|
+
|
|
181
|
+
audioBufferMs: long;
|
|
182
|
+
|
|
183
|
+
format: String;
|
|
184
|
+
|
|
185
|
+
protocol: String;
|
|
186
|
+
constructor();
|
|
187
|
+
}
|
|
188
|
+
export declare class VeLivePlayerVideoFrame {
|
|
189
|
+
|
|
190
|
+
bufferType: VeLivePlayerVideoBufferType;
|
|
191
|
+
|
|
192
|
+
pixelFormat: VeLivePlayerPixelFormat;
|
|
193
|
+
|
|
194
|
+
width: int;
|
|
195
|
+
|
|
196
|
+
height: int;
|
|
197
|
+
|
|
198
|
+
pts: long;
|
|
199
|
+
|
|
200
|
+
texture: VeLivePlayerVideoTexture;
|
|
201
|
+
|
|
202
|
+
buffer: ByteBuffer;
|
|
203
|
+
|
|
204
|
+
data: ArrayBuffer;
|
|
205
|
+
}
|
|
206
|
+
export declare class VeLivePlayerVideoTexture {
|
|
207
|
+
|
|
208
|
+
texId: int;
|
|
209
|
+
|
|
210
|
+
eglContext: EGLContext;
|
|
211
|
+
}
|
|
212
|
+
export declare enum VeLivePlayerStreamType {
|
|
213
|
+
|
|
214
|
+
VeLivePlayerStreamTypeMain = 0,
|
|
215
|
+
|
|
216
|
+
VeLivePlayerStreamTypeBackup = 1
|
|
217
|
+
}
|
|
218
|
+
export declare enum VeLivePlayerLogLevel {
|
|
219
|
+
|
|
220
|
+
VeLivePlayerLogLevelVerbose = 0,
|
|
221
|
+
|
|
222
|
+
VeLivePlayerLogLevelDebug = 1,
|
|
223
|
+
|
|
224
|
+
VeLivePlayerLogLevelInfo = 2,
|
|
225
|
+
|
|
226
|
+
VeLivePlayerLogLevelWarn = 3,
|
|
227
|
+
|
|
228
|
+
VeLivePlayerLogLevelError = 4,
|
|
229
|
+
|
|
230
|
+
VeLivePlayerLogLevelNone = 5
|
|
231
|
+
}
|
|
232
|
+
export declare class VeLivePlayerAudioFrame {
|
|
233
|
+
|
|
234
|
+
bufferType: VeLivePlayerAudioBufferType;
|
|
235
|
+
|
|
236
|
+
sampleRate: int;
|
|
237
|
+
|
|
238
|
+
channels: int;
|
|
239
|
+
|
|
240
|
+
bitDepth: int;
|
|
241
|
+
|
|
242
|
+
pts: long;
|
|
243
|
+
|
|
244
|
+
buffer: ArrayBuffer;
|
|
245
|
+
|
|
246
|
+
samples: int;
|
|
247
|
+
}
|
|
248
|
+
export declare enum VeLivePlayerAudioBufferType {
|
|
249
|
+
|
|
250
|
+
VeLivePlayerAudioBufferTypeUnknown = 0,
|
|
251
|
+
|
|
252
|
+
VeLivePlayerAudioBufferTypeByteArray = 1
|
|
253
|
+
}
|
|
254
|
+
export declare enum VeLivePlayerRotation {
|
|
255
|
+
|
|
256
|
+
VeLivePlayerRotation0 = 0,
|
|
257
|
+
|
|
258
|
+
VeLivePlayerRotation90 = 1,
|
|
259
|
+
|
|
260
|
+
VeLivePlayerRotation180 = 2,
|
|
261
|
+
|
|
262
|
+
VeLivePlayerRotation270 = 3
|
|
263
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { VeLivePlayerConfiguration, VeLivePlayerFillMode, VeLivePlayerStreamData, VeLivePlayerResolution, VeLivePlayerRotation, VeLivePlayerMirror, VeLivePlayerPixelFormat, VeLivePlayerVideoBufferType, VeLivePlayerLogLevel } from './keytype';
|
|
2
|
+
import { id, NSString, NSDictionary, BOOL, int, UIView, float } from './types';
|
|
3
|
+
import { VeLivePlayerObserver } from './callback';
|
|
4
|
+
import { VeLivePlayerLogConfig } from '../../platforms/ios/extends';
|
|
5
|
+
export declare class TVLManager {
|
|
6
|
+
|
|
7
|
+
static setLogLevel(logLevel: VeLivePlayerLogLevel): void;
|
|
8
|
+
|
|
9
|
+
static setLogConfig(logConfig: VeLivePlayerLogConfig): void;
|
|
10
|
+
|
|
11
|
+
static getVersion(): NSString;
|
|
12
|
+
|
|
13
|
+
static setHttpDNSHostIP(hostIpMap: NSDictionary): void;
|
|
14
|
+
|
|
15
|
+
observer: id<VeLivePlayerObserver>;
|
|
16
|
+
|
|
17
|
+
playerView: UIView;
|
|
18
|
+
|
|
19
|
+
volume: float;
|
|
20
|
+
|
|
21
|
+
isPlaying: BOOL;
|
|
22
|
+
setVolume(volume: float): void;
|
|
23
|
+
|
|
24
|
+
init(): this;
|
|
25
|
+
|
|
26
|
+
initWithType(type: VeLivePlayerType): this;
|
|
27
|
+
|
|
28
|
+
setConfig(config: VeLivePlayerConfiguration): void;
|
|
29
|
+
|
|
30
|
+
setObserver(observer: id<VeLivePlayerObserver>): void;
|
|
31
|
+
|
|
32
|
+
setRenderFillMode(fillMode: VeLivePlayerFillMode): Promise<void>;
|
|
33
|
+
|
|
34
|
+
setPlayUrl(url: NSString): void;
|
|
35
|
+
|
|
36
|
+
setUrlHostIP(hostIpMap: NSDictionary): void;
|
|
37
|
+
|
|
38
|
+
setProperty(key: NSString, value: id): void;
|
|
39
|
+
|
|
40
|
+
setPlayStreamData(streamData: VeLivePlayerStreamData): void;
|
|
41
|
+
|
|
42
|
+
prepare(item: TVLManager): void;
|
|
43
|
+
|
|
44
|
+
play(): Promise<void>;
|
|
45
|
+
|
|
46
|
+
pause(): Promise<void>;
|
|
47
|
+
|
|
48
|
+
stop(): Promise<void>;
|
|
49
|
+
|
|
50
|
+
destroy(): void;
|
|
51
|
+
|
|
52
|
+
switchResolution(resolution: VeLivePlayerResolution): void;
|
|
53
|
+
|
|
54
|
+
setMute(mute: BOOL): void;
|
|
55
|
+
|
|
56
|
+
isMute(): BOOL;
|
|
57
|
+
|
|
58
|
+
setRenderRotation(rotation: VeLivePlayerRotation): Promise<void>;
|
|
59
|
+
|
|
60
|
+
setRenderMirror(mirror: VeLivePlayerMirror): Promise<void>;
|
|
61
|
+
|
|
62
|
+
snapshot(): int;
|
|
63
|
+
|
|
64
|
+
enableVideoFrameObserver(enable: BOOL, pixelFormat: VeLivePlayerPixelFormat, bufferType: VeLivePlayerVideoBufferType): void;
|
|
65
|
+
|
|
66
|
+
enableAudioFrameObserver(enable: BOOL, enableRendering: BOOL): void;
|
|
67
|
+
|
|
68
|
+
setEnableSuperResolution(enable: BOOL): void;
|
|
69
|
+
}
|
|
70
|
+
export declare enum VeLivePlayerType {
|
|
71
|
+
|
|
72
|
+
VeLivePlayerTypeOwn = 0,
|
|
73
|
+
|
|
74
|
+
VeLivePlayerTypeSystem = 1
|
|
75
|
+
}
|
|
76
|
+
export declare enum VeLivePlayerEffectType {
|
|
77
|
+
|
|
78
|
+
VeLivePlayerEffectUnknown = 0,
|
|
79
|
+
|
|
80
|
+
VeLivePlayerEffectAudioBalance = 1
|
|
81
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TVLManager } from './api';
|
|
2
|
+
import { VeLivePlayerError } from './errorcode';
|
|
3
|
+
import { BOOL, int64_t, int, NSString, UIImage, NSData } from './types';
|
|
4
|
+
import { VeLivePlayerResolution, VeLivePlayerResolutionSwitchReason, VeLivePlayerStreamType, VeLivePlayerStatus, VeLivePlayerStatistics, VeLivePlayerVideoFrame, VeLivePlayerAudioFrame } from './keytype';
|
|
5
|
+
export declare abstract class VeLivePlayerObserver {
|
|
6
|
+
|
|
7
|
+
onError?(player: TVLManager, error: VeLivePlayerError): void;
|
|
8
|
+
|
|
9
|
+
onFirstVideoFrameRender?(player: TVLManager, isFirstFrame: BOOL): void;
|
|
10
|
+
|
|
11
|
+
onFirstAudioFrameRender?(player: TVLManager, isFirstFrame: BOOL): void;
|
|
12
|
+
|
|
13
|
+
onStallStart?(player: TVLManager): void;
|
|
14
|
+
|
|
15
|
+
onStallEnd?(player: TVLManager): void;
|
|
16
|
+
|
|
17
|
+
onVideoRenderStall?(player: TVLManager, stallTime: int64_t): void;
|
|
18
|
+
|
|
19
|
+
onAudioRenderStall?(player: TVLManager, stallTime: int64_t): void;
|
|
20
|
+
|
|
21
|
+
onResolutionSwitch?(player: TVLManager, resolution: VeLivePlayerResolution, error: VeLivePlayerError, reason: VeLivePlayerResolutionSwitchReason): void;
|
|
22
|
+
|
|
23
|
+
onVideoSizeChanged?(player: TVLManager, width: int, height: int): void;
|
|
24
|
+
|
|
25
|
+
onReceiveSeiMessage?(player: TVLManager, message: NSString): void;
|
|
26
|
+
|
|
27
|
+
onMainBackupSwitch?(player: TVLManager, streamType: VeLivePlayerStreamType, error: VeLivePlayerError): void;
|
|
28
|
+
|
|
29
|
+
onPlayerStatusUpdate?(player: TVLManager, status: VeLivePlayerStatus): void;
|
|
30
|
+
|
|
31
|
+
onStatistics?(player: TVLManager, statistics: VeLivePlayerStatistics): void;
|
|
32
|
+
|
|
33
|
+
onSnapshotComplete?(player: TVLManager, image: UIImage): void;
|
|
34
|
+
|
|
35
|
+
onRenderVideoFrame?(player: TVLManager, videoFrame: VeLivePlayerVideoFrame): void;
|
|
36
|
+
|
|
37
|
+
onRenderAudioFrame?(player: TVLManager, audioFrame: VeLivePlayerAudioFrame): void;
|
|
38
|
+
|
|
39
|
+
onStreamFailedOpenSuperResolution?(player: TVLManager, error: VeLivePlayerError): void;
|
|
40
|
+
|
|
41
|
+
getDrmResourceLoaderCertificateData?(player: TVLManager): NSData;
|
|
42
|
+
|
|
43
|
+
getDrmResourceLoaderLicenseUrl?(player: TVLManager): NSString;
|
|
44
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { NSInteger, NSString } from './types';
|
|
2
|
+
export declare class VeLivePlayerError {
|
|
3
|
+
|
|
4
|
+
errorCode: NSInteger;
|
|
5
|
+
|
|
6
|
+
errorMsg: NSString;
|
|
7
|
+
init(): this;
|
|
8
|
+
}
|
|
9
|
+
export declare enum VeLivePlayerErrorCode {
|
|
10
|
+
|
|
11
|
+
VeLivePlayerNoError = 0,
|
|
12
|
+
|
|
13
|
+
VeLivePlayerInvalidLicense = -1,
|
|
14
|
+
|
|
15
|
+
VeLivePlayerInvalidParameter = -2,
|
|
16
|
+
|
|
17
|
+
VeLivePlayerErrorRefused = -3,
|
|
18
|
+
|
|
19
|
+
VeLivePlayerErrorLibraryLoadFailed = -4,
|
|
20
|
+
|
|
21
|
+
VeLivePlayerErrorPlayUrl = -100,
|
|
22
|
+
|
|
23
|
+
VeLivePlayerErrorNoStreamData = -101,
|
|
24
|
+
|
|
25
|
+
VeLivePlayerErrorInternalRetryStart = -102,
|
|
26
|
+
|
|
27
|
+
VeLivePlayerErrorInternalRetryFailed = -103,
|
|
28
|
+
|
|
29
|
+
VeLivePlayerErrorDnsParseFailed = -200,
|
|
30
|
+
|
|
31
|
+
VeLivePlayerErrorNetworkRequestFailed = -201,
|
|
32
|
+
|
|
33
|
+
VeLivePlayerErrorDemuxFailed = -300,
|
|
34
|
+
|
|
35
|
+
VeLivePlayerErrorDecodeFailed = -301,
|
|
36
|
+
|
|
37
|
+
VeLivePlayerErrorAVOutputFailed = -302,
|
|
38
|
+
|
|
39
|
+
VeLivePlayerErrorSRDeviceUnsupported = -303,
|
|
40
|
+
|
|
41
|
+
VeLivePlayerErrorSRResolutionUnsupported = -304,
|
|
42
|
+
|
|
43
|
+
VeLivePlayerErrorSRFpsUnsupported = -305,
|
|
44
|
+
|
|
45
|
+
VeLivePlayerErrorSRInitFail = -306,
|
|
46
|
+
|
|
47
|
+
VeLivePlayerErrorSRExecuteFail = -307,
|
|
48
|
+
|
|
49
|
+
VeLivePlayerLicenseUnsupportedH265 = -308,
|
|
50
|
+
|
|
51
|
+
VeLivePlayerDRMFetchCKCFailed = -400,
|
|
52
|
+
|
|
53
|
+
VeLivePlayerDRMFetchSPCFailed = -401,
|
|
54
|
+
|
|
55
|
+
VeLivePlayerErrorInternal = -999
|
|
56
|
+
}
|