agora-electron-sdk 4.2.2-dev.4 → 4.2.2-dev.7
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/CHANGELOG.md +22 -0
- package/js/Private/AgoraBase.js +139 -53
- package/js/Private/AgoraMediaBase.js +13 -7
- package/js/Private/IAgoraRtcEngine.js +11 -11
- package/js/Private/IAgoraRtcEngineEx.js +1 -1
- package/js/Private/IAgoraSpatialAudio.js +2 -2
- package/js/Private/impl/IAgoraMediaEngineImpl.js +12 -6
- package/js/Private/impl/IAgoraRtcEngineImpl.js +7 -7
- package/js/Private/internal/IrisApiEngine.js +13 -0
- package/js/Private/internal/MusicContentCenterInternal.js +3 -0
- package/js/Private/internal/RtcEngineExInternal.js +24 -7
- package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
- package/js/Renderer/WebGLRenderer/index.js +19 -19
- package/js/Renderer/YUVCanvasRenderer/index.js +1 -1
- package/package.json +3 -3
- package/scripts/zipBuild.js +3 -1
- package/ts/Private/AgoraBase.ts +296 -133
- package/ts/Private/AgoraMediaBase.ts +68 -34
- package/ts/Private/AgoraMediaPlayerTypes.ts +8 -5
- package/ts/Private/IAgoraLog.ts +7 -3
- package/ts/Private/IAgoraMediaEngine.ts +76 -35
- package/ts/Private/IAgoraMediaPlayer.ts +126 -64
- package/ts/Private/IAgoraMediaPlayerSource.ts +3 -1
- package/ts/Private/IAgoraRtcEngine.ts +1325 -530
- package/ts/Private/IAgoraRtcEngineEx.ts +227 -94
- package/ts/Private/IAgoraSpatialAudio.ts +71 -36
- package/ts/Private/IAudioDeviceManager.ts +61 -31
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +12 -6
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +9 -11
- package/ts/Private/internal/IrisApiEngine.ts +14 -0
- package/ts/Private/internal/MusicContentCenterInternal.ts +4 -0
- package/ts/Private/internal/RtcEngineExInternal.ts +36 -14
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +2 -2
- package/ts/Renderer/WebGLRenderer/index.ts +26 -21
- package/ts/Renderer/YUVCanvasRenderer/index.ts +1 -1
- package/types/Private/AgoraBase.d.ts +298 -135
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +69 -35
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +8 -5
- package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
- package/types/Private/IAgoraLog.d.ts +7 -3
- package/types/Private/IAgoraLog.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +76 -35
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +126 -64
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +3 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +1326 -530
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +227 -94
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +71 -36
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +61 -31
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +2 -2
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +5 -5
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts +1 -0
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts +1 -1
- package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
|
@@ -11,7 +11,8 @@ export declare abstract class IMediaPlayer {
|
|
|
11
11
|
* Gets the ID of the media player.
|
|
12
12
|
*
|
|
13
13
|
* @returns
|
|
14
|
-
* ≥ 0: Success. The ID of the media player.
|
|
14
|
+
* ≥ 0: Success. The ID of the media player.
|
|
15
|
+
* < 0: Failure.
|
|
15
16
|
*/
|
|
16
17
|
abstract getMediaPlayerId(): number;
|
|
17
18
|
/**
|
|
@@ -23,7 +24,8 @@ export declare abstract class IMediaPlayer {
|
|
|
23
24
|
* @param startPos The starting position (ms) for playback. Default value is 0.
|
|
24
25
|
*
|
|
25
26
|
* @returns
|
|
26
|
-
* 0: Success.
|
|
27
|
+
* 0: Success.
|
|
28
|
+
* < 0: Failure.
|
|
27
29
|
*/
|
|
28
30
|
abstract open(url: string, startPos: number): number;
|
|
29
31
|
/**
|
|
@@ -34,59 +36,68 @@ export declare abstract class IMediaPlayer {
|
|
|
34
36
|
* @param source Media resources. See MediaSource.
|
|
35
37
|
*
|
|
36
38
|
* @returns
|
|
37
|
-
* 0: Success.
|
|
39
|
+
* 0: Success.
|
|
40
|
+
* < 0: Failure.
|
|
38
41
|
*/
|
|
39
42
|
abstract openWithMediaSource(source: MediaSource): number;
|
|
40
43
|
/**
|
|
41
44
|
* Plays the media file.
|
|
42
45
|
*
|
|
43
|
-
* After calling open or seek
|
|
46
|
+
* After calling open or seek, you can call this method to play the media file.
|
|
44
47
|
*
|
|
45
48
|
* @returns
|
|
46
|
-
* 0: Success.
|
|
49
|
+
* 0: Success.
|
|
50
|
+
* < 0: Failure.
|
|
47
51
|
*/
|
|
48
52
|
abstract play(): number;
|
|
49
53
|
/**
|
|
50
54
|
* Pauses the playback.
|
|
51
55
|
*
|
|
52
56
|
* @returns
|
|
53
|
-
* 0: Success.
|
|
57
|
+
* 0: Success.
|
|
58
|
+
* < 0: Failure.
|
|
54
59
|
*/
|
|
55
60
|
abstract pause(): number;
|
|
56
61
|
/**
|
|
57
62
|
* Stops playing the media track.
|
|
58
63
|
*
|
|
59
64
|
* @returns
|
|
60
|
-
* 0: Success.
|
|
65
|
+
* 0: Success.
|
|
66
|
+
* < 0: Failure.
|
|
61
67
|
*/
|
|
62
68
|
abstract stop(): number;
|
|
63
69
|
/**
|
|
64
70
|
* Resumes playing the media file.
|
|
65
71
|
*
|
|
66
72
|
* @returns
|
|
67
|
-
* 0: Success.
|
|
73
|
+
* 0: Success.
|
|
74
|
+
* < 0: Failure.
|
|
68
75
|
*/
|
|
69
76
|
abstract resume(): number;
|
|
70
77
|
/**
|
|
71
78
|
* Seeks to a new playback position.
|
|
72
79
|
*
|
|
73
|
-
*
|
|
80
|
+
* After successfully calling this method, you will receive the onPlayerEvent callback, reporting the result of the seek operation to the new playback position. To play the media file from a specific position, do the following:
|
|
81
|
+
* Call this method to seek to the position you want to begin playback.
|
|
82
|
+
* Call the play method to play the media file.
|
|
74
83
|
*
|
|
75
84
|
* @param newPos The new playback position (ms).
|
|
76
85
|
*
|
|
77
86
|
* @returns
|
|
78
|
-
* 0: Success.
|
|
87
|
+
* 0: Success.
|
|
88
|
+
* < 0: Failure.
|
|
79
89
|
*/
|
|
80
90
|
abstract seek(newPos: number): number;
|
|
81
91
|
/**
|
|
82
92
|
* Sets the pitch of the current media resource.
|
|
83
93
|
*
|
|
84
|
-
* Call this method after calling open
|
|
94
|
+
* Call this method after calling open.
|
|
85
95
|
*
|
|
86
96
|
* @param pitch Sets the pitch of the local music file by the chromatic scale. The default value is 0, which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between consecutive values is a chromatic value. The greater the absolute value of this parameter, the higher or lower the pitch of the local music file.
|
|
87
97
|
*
|
|
88
98
|
* @returns
|
|
89
|
-
* 0: Success.
|
|
99
|
+
* 0: Success.
|
|
100
|
+
* < 0: Failure.
|
|
90
101
|
*/
|
|
91
102
|
abstract setAudioPitch(pitch: number): number;
|
|
92
103
|
/**
|
|
@@ -100,49 +111,57 @@ export declare abstract class IMediaPlayer {
|
|
|
100
111
|
* Gets current local playback progress.
|
|
101
112
|
*
|
|
102
113
|
* @returns
|
|
103
|
-
* Returns the current playback progress (ms) if the call succeeds.
|
|
114
|
+
* Returns the current playback progress (ms) if the call succeeds.
|
|
115
|
+
* < 0: Failure. See MediaPlayerError.
|
|
104
116
|
*/
|
|
105
117
|
abstract getPlayPosition(): number;
|
|
106
118
|
/**
|
|
107
119
|
* Gets the number of the media streams in the media resource.
|
|
108
120
|
*
|
|
109
|
-
* Call this method after calling open
|
|
121
|
+
* Call this method after calling open.
|
|
110
122
|
*
|
|
111
123
|
* @returns
|
|
112
|
-
* The number of the media streams in the media resource if the method call succeeds.
|
|
124
|
+
* The number of the media streams in the media resource if the method call succeeds.
|
|
125
|
+
* < 0: Failure. See MediaPlayerError.
|
|
113
126
|
*/
|
|
114
127
|
abstract getStreamCount(): number;
|
|
115
128
|
/**
|
|
116
129
|
* Gets the detailed information of the media stream.
|
|
117
130
|
*
|
|
118
|
-
* Call this method after calling getStreamCount
|
|
131
|
+
* Call this method after calling getStreamCount.
|
|
119
132
|
*
|
|
120
133
|
* @param index The index of the media stream.
|
|
121
134
|
*
|
|
122
135
|
* @returns
|
|
123
|
-
* If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo
|
|
136
|
+
* If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo.
|
|
137
|
+
* If the call fails, returns NULL.
|
|
124
138
|
*/
|
|
125
139
|
abstract getStreamInfo(index: number): PlayerStreamInfo;
|
|
126
140
|
/**
|
|
127
141
|
* Sets the loop playback.
|
|
128
142
|
*
|
|
129
|
-
* If you want to loop, call this method and set the number of the loops. When the loop finishes, the SDK triggers onPlayerSourceStateChanged and reports the playback state as PlayerStatePlaybackAllLoopsCompleted
|
|
143
|
+
* If you want to loop, call this method and set the number of the loops. When the loop finishes, the SDK triggers onPlayerSourceStateChanged and reports the playback state as PlayerStatePlaybackAllLoopsCompleted.
|
|
130
144
|
*
|
|
131
145
|
* @param loopCount The number of times the audio effect loops:
|
|
132
146
|
*
|
|
133
147
|
* @returns
|
|
134
|
-
* 0: Success.
|
|
148
|
+
* 0: Success.
|
|
149
|
+
* < 0: Failure.
|
|
135
150
|
*/
|
|
136
151
|
abstract setLoopCount(loopCount: number): number;
|
|
137
152
|
/**
|
|
138
153
|
* Sets the channel mode of the current audio file.
|
|
139
154
|
*
|
|
140
|
-
* Call this method after calling open
|
|
155
|
+
* Call this method after calling open.
|
|
141
156
|
*
|
|
142
|
-
* @param speed The playback speed. Agora recommends that you limit this value to between 50 and 400, defined as follows:
|
|
157
|
+
* @param speed The playback speed. Agora recommends that you limit this value to a range between 50 and 400, which is defined as follows:
|
|
158
|
+
* 50: Half the original speed.
|
|
159
|
+
* 100: The original speed.
|
|
160
|
+
* 400: 4 times the original speed.
|
|
143
161
|
*
|
|
144
162
|
* @returns
|
|
145
|
-
* 0: Success.
|
|
163
|
+
* 0: Success.
|
|
164
|
+
* < 0: Failure.
|
|
146
165
|
*/
|
|
147
166
|
abstract setPlaybackSpeed(speed: number): number;
|
|
148
167
|
/**
|
|
@@ -153,7 +172,8 @@ export declare abstract class IMediaPlayer {
|
|
|
153
172
|
* @param index The index of the audio track.
|
|
154
173
|
*
|
|
155
174
|
* @returns
|
|
156
|
-
* 0: Success.
|
|
175
|
+
* 0: Success.
|
|
176
|
+
* < 0: Failure.
|
|
157
177
|
*/
|
|
158
178
|
abstract selectAudioTrack(index: number): number;
|
|
159
179
|
/**
|
|
@@ -163,13 +183,16 @@ export declare abstract class IMediaPlayer {
|
|
|
163
183
|
/**
|
|
164
184
|
* Sets the private options for the media player.
|
|
165
185
|
*
|
|
166
|
-
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.
|
|
186
|
+
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.
|
|
187
|
+
* Ensure that you call this method before open.
|
|
188
|
+
* If you need to push streams with SEI into the CDN, call setPlayerOptionInString ("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
|
|
167
189
|
*
|
|
168
190
|
* @param key The key of the option.
|
|
169
191
|
* @param value The value of the key.
|
|
170
192
|
*
|
|
171
193
|
* @returns
|
|
172
|
-
* 0: Success.
|
|
194
|
+
* 0: Success.
|
|
195
|
+
* < 0: Failure.
|
|
173
196
|
*/
|
|
174
197
|
abstract setPlayerOptionInString(key: string, value: string): number;
|
|
175
198
|
/**
|
|
@@ -188,16 +211,17 @@ export declare abstract class IMediaPlayer {
|
|
|
188
211
|
* Gets current playback state.
|
|
189
212
|
*
|
|
190
213
|
* @returns
|
|
191
|
-
* The current playback state. See MediaPlayerState
|
|
214
|
+
* The current playback state. See MediaPlayerState.
|
|
192
215
|
*/
|
|
193
216
|
abstract getState(): MediaPlayerState;
|
|
194
217
|
/**
|
|
195
218
|
* Sets whether to mute the media file.
|
|
196
219
|
*
|
|
197
|
-
* @param muted Whether to mute the media file:true: Mute the media file.false: (Default) Unmute the media file.
|
|
220
|
+
* @param muted Whether to mute the media file: true : Mute the media file. false : (Default) Unmute the media file.
|
|
198
221
|
*
|
|
199
222
|
* @returns
|
|
200
|
-
* 0: Success.
|
|
223
|
+
* 0: Success.
|
|
224
|
+
* < 0: Failure.
|
|
201
225
|
*/
|
|
202
226
|
abstract mute(muted: boolean): number;
|
|
203
227
|
/**
|
|
@@ -210,17 +234,22 @@ export declare abstract class IMediaPlayer {
|
|
|
210
234
|
/**
|
|
211
235
|
* Adjusts the local playback volume.
|
|
212
236
|
*
|
|
213
|
-
* @param volume The local playback volume, which ranges from 0 to 100:
|
|
237
|
+
* @param volume The local playback volume, which ranges from 0 to 100:
|
|
238
|
+
* 0: Mute.
|
|
239
|
+
* 100: (Default) The original volume.
|
|
214
240
|
*
|
|
215
241
|
* @returns
|
|
216
|
-
* 0: Success.
|
|
242
|
+
* 0: Success.
|
|
243
|
+
* < 0: Failure.
|
|
217
244
|
*/
|
|
218
245
|
abstract adjustPlayoutVolume(volume: number): number;
|
|
219
246
|
/**
|
|
220
247
|
* Gets the local playback volume.
|
|
221
248
|
*
|
|
222
249
|
* @returns
|
|
223
|
-
* The local playback volume, which ranges from 0 to 100.
|
|
250
|
+
* The local playback volume, which ranges from 0 to 100.
|
|
251
|
+
* 0: Mute.
|
|
252
|
+
* 100: (Default) The original volume.
|
|
224
253
|
*/
|
|
225
254
|
abstract getPlayoutVolume(): number;
|
|
226
255
|
/**
|
|
@@ -228,24 +257,30 @@ export declare abstract class IMediaPlayer {
|
|
|
228
257
|
*
|
|
229
258
|
* After connected to the Agora server, you can call this method to adjust the volume of the media file heard by the remote user.
|
|
230
259
|
*
|
|
231
|
-
* @param volume The volume, which ranges from 0 to 400:
|
|
260
|
+
* @param volume The volume, which ranges from 0 to 400:
|
|
261
|
+
* 0: Mute.
|
|
262
|
+
* 100: (Default) The original volume.
|
|
263
|
+
* 400: Four times the original volume (amplifying the audio signals by four times).
|
|
232
264
|
*
|
|
233
265
|
* @returns
|
|
234
|
-
* 0: Success.
|
|
266
|
+
* 0: Success.
|
|
267
|
+
* < 0: Failure.
|
|
235
268
|
*/
|
|
236
269
|
abstract adjustPublishSignalVolume(volume: number): number;
|
|
237
270
|
/**
|
|
238
271
|
* Gets the volume of the media file for publishing.
|
|
239
272
|
*
|
|
240
273
|
* @returns
|
|
241
|
-
* ≥ 0: The remote playback volume.
|
|
274
|
+
* ≥ 0: The remote playback volume.
|
|
275
|
+
* < 0: Failure.
|
|
242
276
|
*/
|
|
243
277
|
abstract getPublishSignalVolume(): number;
|
|
244
278
|
/**
|
|
245
279
|
* Sets the view.
|
|
246
280
|
*
|
|
247
281
|
* @returns
|
|
248
|
-
* 0: Success.
|
|
282
|
+
* 0: Success.
|
|
283
|
+
* < 0: Failure.
|
|
249
284
|
*/
|
|
250
285
|
abstract setView(view: any): number;
|
|
251
286
|
/**
|
|
@@ -254,7 +289,8 @@ export declare abstract class IMediaPlayer {
|
|
|
254
289
|
* @param renderMode Sets the render mode of the view. See RenderModeType.
|
|
255
290
|
*
|
|
256
291
|
* @returns
|
|
257
|
-
* 0: Success.
|
|
292
|
+
* 0: Success.
|
|
293
|
+
* < 0: Failure.
|
|
258
294
|
*/
|
|
259
295
|
abstract setRenderMode(renderMode: RenderModeType): number;
|
|
260
296
|
/**
|
|
@@ -263,7 +299,8 @@ export declare abstract class IMediaPlayer {
|
|
|
263
299
|
* @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
|
|
264
300
|
*
|
|
265
301
|
* @returns
|
|
266
|
-
* 0: Success.
|
|
302
|
+
* 0: Success.
|
|
303
|
+
* < 0: Failure.
|
|
267
304
|
*/
|
|
268
305
|
abstract registerPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
|
|
269
306
|
/**
|
|
@@ -272,7 +309,8 @@ export declare abstract class IMediaPlayer {
|
|
|
272
309
|
* @param observer The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
|
|
273
310
|
*
|
|
274
311
|
* @returns
|
|
275
|
-
* 0: Success.
|
|
312
|
+
* 0: Success.
|
|
313
|
+
* < 0: Failure.
|
|
276
314
|
*/
|
|
277
315
|
abstract unregisterPlayerSourceObserver(observer: IMediaPlayerSourceObserver): number;
|
|
278
316
|
/**
|
|
@@ -282,7 +320,8 @@ export declare abstract class IMediaPlayer {
|
|
|
282
320
|
* @param mode The use mode of the audio frame. See RawAudioFrameOpModeType.
|
|
283
321
|
*
|
|
284
322
|
* @returns
|
|
285
|
-
* 0: Success.
|
|
323
|
+
* 0: Success.
|
|
324
|
+
* < 0: Failure.
|
|
286
325
|
*/
|
|
287
326
|
abstract registerAudioFrameObserver(observer: IAudioPcmFrameSink, mode?: RawAudioFrameOpModeType): number;
|
|
288
327
|
/**
|
|
@@ -291,7 +330,8 @@ export declare abstract class IMediaPlayer {
|
|
|
291
330
|
* @param observer The audio observer. See IAudioPcmFrameSink.
|
|
292
331
|
*
|
|
293
332
|
* @returns
|
|
294
|
-
* 0: Success.
|
|
333
|
+
* 0: Success.
|
|
334
|
+
* < 0: Failure.
|
|
295
335
|
*/
|
|
296
336
|
abstract unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number;
|
|
297
337
|
/**
|
|
@@ -302,7 +342,8 @@ export declare abstract class IMediaPlayer {
|
|
|
302
342
|
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver.
|
|
303
343
|
*
|
|
304
344
|
* @returns
|
|
305
|
-
* 0: Success.
|
|
345
|
+
* 0: Success.
|
|
346
|
+
* < 0: Failure.
|
|
306
347
|
*/
|
|
307
348
|
abstract registerVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
|
|
308
349
|
/**
|
|
@@ -311,7 +352,8 @@ export declare abstract class IMediaPlayer {
|
|
|
311
352
|
* @param observer The video observer, reporting the reception of each video frame. See IMediaPlayerVideoFrameObserver.
|
|
312
353
|
*
|
|
313
354
|
* @returns
|
|
314
|
-
* 0: Success.
|
|
355
|
+
* 0: Success.
|
|
356
|
+
* < 0: Failure.
|
|
315
357
|
*/
|
|
316
358
|
abstract unregisterVideoFrameObserver(observer: IMediaPlayerVideoFrameObserver): number;
|
|
317
359
|
/**
|
|
@@ -325,12 +367,15 @@ export declare abstract class IMediaPlayer {
|
|
|
325
367
|
/**
|
|
326
368
|
* Sets the channel mode of the current audio file.
|
|
327
369
|
*
|
|
328
|
-
* In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.
|
|
370
|
+
* In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.
|
|
371
|
+
* Call this method after calling open.
|
|
372
|
+
* This method only applies to stereo audio files.
|
|
329
373
|
*
|
|
330
374
|
* @param mode The channel mode. See AudioDualMonoMode.
|
|
331
375
|
*
|
|
332
376
|
* @returns
|
|
333
|
-
* 0: Success.
|
|
377
|
+
* 0: Success.
|
|
378
|
+
* < 0: Failure.
|
|
334
379
|
*/
|
|
335
380
|
abstract setAudioDualMonoMode(mode: AudioDualMonoMode): number;
|
|
336
381
|
/**
|
|
@@ -375,25 +420,34 @@ export declare abstract class IMediaPlayer {
|
|
|
375
420
|
/**
|
|
376
421
|
* Switches the media resource being played.
|
|
377
422
|
*
|
|
378
|
-
* You can call this method to switch the media resource to be played according to the current network status. For example:
|
|
423
|
+
* You can call this method to switch the media resource to be played according to the current network status. For example:
|
|
424
|
+
* When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.
|
|
425
|
+
* When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the PlayerEventSwitchComplete event in the onPlayerEvent callback, the switch is successful; If you receive the PlayerEventSwitchError event in the onPlayerEvent callback, the switch fails.
|
|
426
|
+
* Ensure that you call this method after open.
|
|
427
|
+
* To ensure normal playback, pay attention to the following when calling this method:
|
|
428
|
+
* Do not call this method when playback is paused.
|
|
429
|
+
* Do not call the seek method during switching.
|
|
430
|
+
* Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
|
|
379
431
|
*
|
|
380
432
|
* @param src The URL of the media resource.
|
|
381
|
-
* @param syncPts Whether to synchronize the playback position (ms) before and after the switch:true: Synchronize the playback position before and after the switch.false: (Default) Do not synchronize the playback position before and after the switch.Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
|
|
433
|
+
* @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch. Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
|
|
382
434
|
*
|
|
383
435
|
* @returns
|
|
384
|
-
* 0: Success.
|
|
436
|
+
* 0: Success.
|
|
437
|
+
* < 0: Failure.
|
|
385
438
|
*/
|
|
386
439
|
abstract switchSrc(src: string, syncPts?: boolean): number;
|
|
387
440
|
/**
|
|
388
441
|
* Preloads a media resource.
|
|
389
442
|
*
|
|
390
|
-
* You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc
|
|
443
|
+
* You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop. Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
|
|
391
444
|
*
|
|
392
445
|
* @param src The URL of the media resource.
|
|
393
446
|
* @param startPos The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0.
|
|
394
447
|
*
|
|
395
448
|
* @returns
|
|
396
|
-
* 0: Success.
|
|
449
|
+
* 0: Success.
|
|
450
|
+
* < 0: Failure.
|
|
397
451
|
*/
|
|
398
452
|
abstract preloadSrc(src: string, startPos: number): number;
|
|
399
453
|
/**
|
|
@@ -404,7 +458,8 @@ export declare abstract class IMediaPlayer {
|
|
|
404
458
|
* @param src The URL of the media resource in the playlist must be consistent with the src set by the preloadSrc method; otherwise, the media resource cannot be played.
|
|
405
459
|
*
|
|
406
460
|
* @returns
|
|
407
|
-
* 0: Success.
|
|
461
|
+
* 0: Success.
|
|
462
|
+
* < 0: Failure.
|
|
408
463
|
*/
|
|
409
464
|
abstract playPreloadedSrc(src: string): number;
|
|
410
465
|
/**
|
|
@@ -415,7 +470,8 @@ export declare abstract class IMediaPlayer {
|
|
|
415
470
|
* @param src The URL of the media resource.
|
|
416
471
|
*
|
|
417
472
|
* @returns
|
|
418
|
-
* 0: Success.
|
|
473
|
+
* 0: Success.
|
|
474
|
+
* < 0: Failure.
|
|
419
475
|
*/
|
|
420
476
|
abstract unloadSrc(src: string): number;
|
|
421
477
|
/**
|
|
@@ -424,7 +480,8 @@ export declare abstract class IMediaPlayer {
|
|
|
424
480
|
* After successfully setting the spatial audio effect parameters of the media player, the SDK enables the spatial audio effect for the media player, and the local user can hear the media resources with a sense of space. If you need to disable the spatial audio effect for the media player, set the params parameter to null.
|
|
425
481
|
*
|
|
426
482
|
* @returns
|
|
427
|
-
* 0: Success.
|
|
483
|
+
* 0: Success.
|
|
484
|
+
* < 0: Failure.
|
|
428
485
|
*/
|
|
429
486
|
abstract setSpatialAudioParams(params: SpatialAudioParams): number;
|
|
430
487
|
/**
|
|
@@ -442,7 +499,8 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
442
499
|
* The cached media file currently being played will not be deleted.
|
|
443
500
|
*
|
|
444
501
|
* @returns
|
|
445
|
-
* 0: Success.
|
|
502
|
+
* 0: Success.
|
|
503
|
+
* < 0: Failure. See MediaPlayerError.
|
|
446
504
|
*/
|
|
447
505
|
abstract removeAllCaches(): number;
|
|
448
506
|
/**
|
|
@@ -452,7 +510,7 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
452
510
|
*
|
|
453
511
|
* @returns
|
|
454
512
|
* 0: Success.
|
|
455
|
-
* < 0: Failure. See MediaPlayerError
|
|
513
|
+
* < 0: Failure. See MediaPlayerError.
|
|
456
514
|
*/
|
|
457
515
|
abstract removeOldCache(): number;
|
|
458
516
|
/**
|
|
@@ -464,7 +522,7 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
464
522
|
*
|
|
465
523
|
* @returns
|
|
466
524
|
* 0: Success.
|
|
467
|
-
* < 0: Failure. See MediaPlayerError
|
|
525
|
+
* < 0: Failure. See MediaPlayerError.
|
|
468
526
|
*/
|
|
469
527
|
abstract removeCacheByUri(uri: string): number;
|
|
470
528
|
/**
|
|
@@ -476,7 +534,7 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
476
534
|
*
|
|
477
535
|
* @returns
|
|
478
536
|
* 0: Success.
|
|
479
|
-
* < 0: Failure. See MediaPlayerError
|
|
537
|
+
* < 0: Failure. See MediaPlayerError.
|
|
480
538
|
*/
|
|
481
539
|
abstract setCacheDir(path: string): number;
|
|
482
540
|
/**
|
|
@@ -486,7 +544,7 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
486
544
|
*
|
|
487
545
|
* @returns
|
|
488
546
|
* 0: Success.
|
|
489
|
-
* < 0: Failure. See MediaPlayerError
|
|
547
|
+
* < 0: Failure. See MediaPlayerError.
|
|
490
548
|
*/
|
|
491
549
|
abstract setMaxCacheFileCount(count: number): number;
|
|
492
550
|
/**
|
|
@@ -496,7 +554,7 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
496
554
|
*
|
|
497
555
|
* @returns
|
|
498
556
|
* 0: Success.
|
|
499
|
-
* < 0: Failure. See MediaPlayerError
|
|
557
|
+
* < 0: Failure. See MediaPlayerError.
|
|
500
558
|
*/
|
|
501
559
|
abstract setMaxCacheFileSize(cacheSize: number): number;
|
|
502
560
|
/**
|
|
@@ -504,11 +562,11 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
504
562
|
*
|
|
505
563
|
* If you enable this function to remove cached media files automatically, when the cached media files exceed either the number or size limit you set, the SDK automatically deletes the least recently used cache file.
|
|
506
564
|
*
|
|
507
|
-
* @param enable Whether to enable the SDK to delete cached media files automatically:true: Delete cached media files automatically.false: (Default) Do not delete cached media files automatically.
|
|
565
|
+
* @param enable Whether to enable the SDK to delete cached media files automatically: true : Delete cached media files automatically. false : (Default) Do not delete cached media files automatically.
|
|
508
566
|
*
|
|
509
567
|
* @returns
|
|
510
568
|
* 0: Success.
|
|
511
|
-
* < 0: Failure. See MediaPlayerError
|
|
569
|
+
* < 0: Failure. See MediaPlayerError.
|
|
512
570
|
*/
|
|
513
571
|
abstract enableAutoRemoveCache(enable: boolean): number;
|
|
514
572
|
/**
|
|
@@ -519,7 +577,8 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
519
577
|
* @param length An input parameter; the maximum length of the cache file storage path string.
|
|
520
578
|
*
|
|
521
579
|
* @returns
|
|
522
|
-
* The call succeeds, and the SDK returns the storage path of the cached media files.
|
|
580
|
+
* The call succeeds, and the SDK returns the storage path of the cached media files.
|
|
581
|
+
* < 0: Failure. See MediaPlayerError.
|
|
523
582
|
*/
|
|
524
583
|
abstract getCacheDir(length: number): string;
|
|
525
584
|
/**
|
|
@@ -528,7 +587,8 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
528
587
|
* By default, the maximum number of media files that can be cached is 1,000.
|
|
529
588
|
*
|
|
530
589
|
* @returns
|
|
531
|
-
* > 0: The call succeeds and returns the maximum number of media files that can be cached.
|
|
590
|
+
* > 0: The call succeeds and returns the maximum number of media files that can be cached.
|
|
591
|
+
* < 0: Failure. See MediaPlayerError.
|
|
532
592
|
*/
|
|
533
593
|
abstract getMaxCacheFileCount(): number;
|
|
534
594
|
/**
|
|
@@ -537,14 +597,16 @@ export declare abstract class IMediaPlayerCacheManager {
|
|
|
537
597
|
* By default, the maximum size of the aggregate storage space for cached media files is 1 GB. You can call the setMaxCacheFileSize method to set the limit according to your scenarios.
|
|
538
598
|
*
|
|
539
599
|
* @returns
|
|
540
|
-
* > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.
|
|
600
|
+
* > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.
|
|
601
|
+
* < 0: Failure. See MediaPlayerError.
|
|
541
602
|
*/
|
|
542
603
|
abstract getMaxCacheFileSize(): number;
|
|
543
604
|
/**
|
|
544
605
|
* Gets the number of media files that are cached.
|
|
545
606
|
*
|
|
546
607
|
* @returns
|
|
547
|
-
* ≥ 0: The call succeeds and returns the number of media files that are cached.
|
|
608
|
+
* ≥ 0: The call succeeds and returns the number of media files that are cached.
|
|
609
|
+
* < 0: Failure. See MediaPlayerError.
|
|
548
610
|
*/
|
|
549
611
|
abstract getCacheFileCount(): number;
|
|
550
612
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAgoraMediaPlayer.d.ts","sourceRoot":"","sources":["../../ts/Private/IAgoraMediaPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;GAEG;AACH,8BAAsB,YAAY;IAChC
|
|
1
|
+
{"version":3,"file":"IAgoraMediaPlayer.d.ts","sourceRoot":"","sources":["../../ts/Private/IAgoraMediaPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B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H,QAAQ,CAAC,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAEvD;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAE5C;;;;;;;;OAQG;IACH,QAAQ,CAAC,oBAAoB,IAAI,MAAM;IAEvC;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,IAAI,MAAM;IAEtC;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,IAAI,MAAM;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;;;OAMG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -43,7 +43,9 @@ export interface IMediaPlayerSourceObserver {
|
|
|
43
43
|
/**
|
|
44
44
|
* Reports the playback duration that the buffered data can support.
|
|
45
45
|
*
|
|
46
|
-
* When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support.
|
|
46
|
+
* When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support.
|
|
47
|
+
* When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow.
|
|
48
|
+
* When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover.
|
|
47
49
|
*
|
|
48
50
|
* @param playCachedBuffer The playback duration (ms) that the buffered data can support.
|
|
49
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAgoraMediaPlayerSource.d.ts","sourceRoot":"","sources":["../../ts/Private/IAgoraMediaPlayerSource.ts"],"names":[],"mappings":"AAAA,OAAO,8CAA8C,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC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