agora-electron-sdk 4.3.2 → 4.4.0-dev.1
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/gulpfile.js +3 -1
- package/js/AgoraSdk.js +4 -4
- package/js/Private/AgoraBase.js +367 -326
- package/js/Private/AgoraMediaBase.js +265 -76
- package/js/Private/AgoraMediaPlayerTypes.js +12 -30
- package/js/Private/IAgoraH265Transcoder.js +2 -5
- package/js/Private/IAgoraLog.js +2 -5
- package/js/Private/IAgoraMediaEngine.js +2 -5
- package/js/Private/IAgoraMediaPlayer.js +4 -10
- package/js/Private/IAgoraMediaRecorder.js +2 -5
- package/js/Private/IAgoraMediaStreamingSource.js +2 -5
- package/js/Private/IAgoraMusicContentCenter.js +21 -68
- package/js/Private/IAgoraRhythmPlayer.js +2 -5
- package/js/Private/IAgoraRtcEngine.js +76 -130
- package/js/Private/IAgoraRtcEngineEx.js +5 -28
- package/js/Private/IAgoraSpatialAudio.js +6 -15
- package/js/Private/IAudioDeviceManager.js +2 -5
- package/js/Private/impl/AgoraMediaBaseImpl.js +11 -14
- package/js/Private/impl/IAgoraH265TranscoderImpl.js +43 -46
- package/js/Private/impl/IAgoraMediaEngineImpl.js +155 -172
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +534 -546
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +26 -29
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +218 -251
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +434 -436
- package/js/Private/impl/IAgoraRtcEngineImpl.js +2445 -2423
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +167 -170
- package/js/Private/impl/IAudioDeviceManagerImpl.js +232 -235
- package/js/Private/internal/AgoraH265TranscoderInternal.js +33 -57
- package/js/Private/internal/AgoraMediaBaseInternal.js +9 -28
- package/js/Private/internal/AudioDeviceManagerInternal.js +24 -44
- package/js/Private/internal/IrisApiEngine.js +94 -145
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +3 -23
- package/js/Private/internal/MediaEngineInternal.js +69 -94
- package/js/Private/internal/MediaPlayerInternal.js +105 -125
- package/js/Private/internal/MediaRecorderInternal.js +37 -64
- package/js/Private/internal/MusicContentCenterInternal.js +92 -129
- package/js/Private/internal/RtcEngineExInternal.js +213 -243
- package/js/Private/ti/AgoraBase-ti.js +2 -2
- package/js/Private/ti/AgoraMediaBase-ti.js +2 -2
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
- package/js/Private/ti/IAgoraH265Transcoder-ti.js +2 -2
- package/js/Private/ti/IAgoraLog-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
- package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
- package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
- package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
- package/js/Private/ti/IAgoraMusicContentCenter-ti.js +2 -2
- package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
- package/js/Private/ti/IAgoraRtcEngine-ti.js +7 -7
- package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
- package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
- package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
- package/js/Renderer/AgoraView.js +100 -145
- package/js/Renderer/IRenderer.js +43 -53
- package/js/Renderer/IRendererManager.js +106 -132
- package/js/Renderer/RendererCache.js +63 -96
- package/js/Renderer/RendererManager.js +35 -69
- package/js/Renderer/WebGLRenderer/index.js +77 -106
- package/js/Renderer/YUVCanvasRenderer/index.js +18 -40
- package/js/Utils.js +45 -64
- package/package.json +9 -7
- package/scripts/checkElectron.js +41 -0
- package/scripts/downloadPrebuild.js +56 -24
- package/scripts/synclib.js +6 -6
- package/ts/Private/AgoraBase.ts +269 -4
- package/ts/Private/AgoraMediaBase.ts +343 -1
- package/ts/Private/IAgoraMediaEngine.ts +3 -3
- package/ts/Private/IAgoraRtcEngine.ts +130 -119
- package/ts/Private/IAgoraRtcEngineEx.ts +14 -9
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +30 -0
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +181 -61
- package/ts/Private/internal/IrisApiEngine.ts +3 -7
- package/ts/Private/internal/MediaEngineInternal.ts +0 -1
- package/ts/Private/internal/RtcEngineExInternal.ts +8 -4
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +5 -5
- package/ts/Renderer/IRenderer.ts +1 -2
- package/ts/Renderer/IRendererManager.ts +21 -12
- package/ts/Utils.ts +15 -0
- package/types/Private/AgoraBase.d.ts +264 -8
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +336 -1
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +3 -3
- package/types/Private/IAgoraRtcEngine.d.ts +106 -116
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +10 -10
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +3 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +13 -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/MediaEngineInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Renderer/IRenderer.d.ts.map +1 -1
- package/types/Renderer/IRendererManager.d.ts.map +1 -1
- package/types/Utils.d.ts +4 -0
- package/types/Utils.d.ts.map +1 -1
|
@@ -1,97 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
6
|
exports.MediaRecorderInternal = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_this._nativeHandle = nativeHandle;
|
|
33
|
-
return _this;
|
|
7
|
+
const ts_interface_checker_1 = require("ts-interface-checker");
|
|
8
|
+
const AgoraBase_1 = require("../AgoraBase");
|
|
9
|
+
const IAgoraMediaRecorderImpl_1 = require("../impl/IAgoraMediaRecorderImpl");
|
|
10
|
+
const AgoraMediaBase_ti_1 = __importDefault(require("../ti/AgoraMediaBase-ti"));
|
|
11
|
+
const checkers = (0, ts_interface_checker_1.createCheckers)(AgoraMediaBase_ti_1.default);
|
|
12
|
+
const IrisApiEngine_1 = require("./IrisApiEngine");
|
|
13
|
+
class MediaRecorderInternal extends IAgoraMediaRecorderImpl_1.IMediaRecorderImpl {
|
|
14
|
+
constructor(nativeHandle) {
|
|
15
|
+
super();
|
|
16
|
+
this._nativeHandle = nativeHandle;
|
|
34
17
|
}
|
|
35
|
-
|
|
18
|
+
release() {
|
|
36
19
|
MediaRecorderInternal._observers.delete(this._nativeHandle);
|
|
37
20
|
this.removeAllListeners();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
configurable: true
|
|
45
|
-
});
|
|
46
|
-
MediaRecorderInternal.prototype.setMediaRecorderObserver = function (callback) {
|
|
47
|
-
var key = this._nativeHandle;
|
|
21
|
+
}
|
|
22
|
+
get nativeHandle() {
|
|
23
|
+
return this._nativeHandle;
|
|
24
|
+
}
|
|
25
|
+
setMediaRecorderObserver(callback) {
|
|
26
|
+
const key = this._nativeHandle;
|
|
48
27
|
if (MediaRecorderInternal._observers.has(key)) {
|
|
49
28
|
return AgoraBase_1.ErrorCodeType.ErrOk;
|
|
50
29
|
}
|
|
51
30
|
MediaRecorderInternal._observers.set(key, callback);
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_a[eventType] = undefined,
|
|
59
|
-
_a))) {
|
|
31
|
+
return super.setMediaRecorderObserver(callback);
|
|
32
|
+
}
|
|
33
|
+
_addListenerPreCheck(eventType) {
|
|
34
|
+
if (checkers.IMediaRecorderObserver?.strictTest({
|
|
35
|
+
[eventType]: undefined,
|
|
36
|
+
})) {
|
|
60
37
|
if (MediaRecorderInternal._observers.get(this._nativeHandle) === undefined) {
|
|
61
38
|
this.setMediaRecorderObserver({});
|
|
62
39
|
}
|
|
63
40
|
}
|
|
64
41
|
return true;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
var _this = this;
|
|
42
|
+
}
|
|
43
|
+
addListener(eventType, listener) {
|
|
68
44
|
this._addListenerPreCheck(eventType);
|
|
69
|
-
|
|
45
|
+
const callback = (eventProcessor, data) => {
|
|
70
46
|
if (eventProcessor.type(data) !== IrisApiEngine_1.EVENT_TYPE.IMediaRecorder) {
|
|
71
47
|
return;
|
|
72
48
|
}
|
|
73
|
-
if (data.nativeHandle !==
|
|
49
|
+
if (data.nativeHandle !== this._nativeHandle) {
|
|
74
50
|
return;
|
|
75
51
|
}
|
|
76
|
-
eventProcessor.func.map(
|
|
77
|
-
|
|
78
|
-
it((_a = {}, _a[eventType] = listener, _a), eventType, data);
|
|
52
|
+
eventProcessor.func.map((it) => {
|
|
53
|
+
it({ [eventType]: listener }, eventType, data);
|
|
79
54
|
});
|
|
80
55
|
};
|
|
81
56
|
// @ts-ignore
|
|
82
57
|
listener.agoraCallback = callback;
|
|
83
58
|
IrisApiEngine_1.DeviceEventEmitter.addListener(eventType, callback);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
var _a;
|
|
59
|
+
}
|
|
60
|
+
removeListener(eventType, listener) {
|
|
87
61
|
IrisApiEngine_1.DeviceEventEmitter.removeListener(eventType,
|
|
88
62
|
// @ts-ignore
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
63
|
+
listener?.agoraCallback ?? listener);
|
|
64
|
+
}
|
|
65
|
+
removeAllListeners(eventType) {
|
|
92
66
|
IrisApiEngine_1.DeviceEventEmitter.removeAllListeners(eventType);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return MediaRecorderInternal;
|
|
96
|
-
}(IAgoraMediaRecorderImpl_1.IMediaRecorderImpl));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
97
69
|
exports.MediaRecorderInternal = MediaRecorderInternal;
|
|
70
|
+
MediaRecorderInternal._observers = new Map();
|
|
@@ -1,176 +1,139 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
6
|
exports.MusicCollectionInternal = exports.MusicPlayerInternal = exports.MusicContentCenterInternal = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
MusicContentCenterInternal.prototype._addListenerPreCheck = function (eventType) {
|
|
35
|
-
var _a;
|
|
36
|
-
var _b;
|
|
37
|
-
if ((_b = checkers.IMusicContentCenterEventHandler) === null || _b === void 0 ? void 0 : _b.strictTest((_a = {},
|
|
38
|
-
_a[eventType] = undefined,
|
|
39
|
-
_a))) {
|
|
7
|
+
const ts_interface_checker_1 = require("ts-interface-checker");
|
|
8
|
+
const IAgoraMusicContentCenter_1 = require("../IAgoraMusicContentCenter");
|
|
9
|
+
const IAgoraMusicContentCenterImpl_1 = require("../impl/IAgoraMusicContentCenterImpl");
|
|
10
|
+
const IAgoraMusicContentCenter_ti_1 = __importDefault(require("../ti/IAgoraMusicContentCenter-ti"));
|
|
11
|
+
const checkers = (0, ts_interface_checker_1.createCheckers)(IAgoraMusicContentCenter_ti_1.default);
|
|
12
|
+
const IrisApiEngine_1 = require("./IrisApiEngine");
|
|
13
|
+
const MediaPlayerInternal_1 = require("./MediaPlayerInternal");
|
|
14
|
+
class MusicContentCenterInternal extends IAgoraMusicContentCenterImpl_1.IMusicContentCenterImpl {
|
|
15
|
+
_addListenerPreCheck(eventType) {
|
|
16
|
+
if (checkers.IMusicContentCenterEventHandler?.strictTest({
|
|
17
|
+
[eventType]: undefined,
|
|
18
|
+
})) {
|
|
40
19
|
if (MusicContentCenterInternal._event_handlers.length === 0) {
|
|
41
20
|
this.registerEventHandler({});
|
|
42
21
|
}
|
|
43
22
|
}
|
|
44
23
|
return true;
|
|
45
|
-
}
|
|
46
|
-
|
|
24
|
+
}
|
|
25
|
+
addListener(eventType, listener) {
|
|
47
26
|
this._addListenerPreCheck(eventType);
|
|
48
|
-
|
|
27
|
+
const callback = (eventProcessor, data) => {
|
|
49
28
|
if (eventProcessor.type(data) !== IrisApiEngine_1.EVENT_TYPE.IMusicContentCenter) {
|
|
50
29
|
return;
|
|
51
30
|
}
|
|
52
|
-
eventProcessor.func.map(
|
|
53
|
-
|
|
54
|
-
it((_a = {}, _a[eventType] = listener, _a), eventType, data);
|
|
31
|
+
eventProcessor.func.map((it) => {
|
|
32
|
+
it({ [eventType]: listener }, eventType, data);
|
|
55
33
|
});
|
|
56
34
|
};
|
|
57
35
|
// @ts-ignore
|
|
58
36
|
listener.agoraCallback = callback;
|
|
59
37
|
IrisApiEngine_1.DeviceEventEmitter.addListener(eventType, callback);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var _a;
|
|
38
|
+
}
|
|
39
|
+
removeListener(eventType, listener) {
|
|
63
40
|
IrisApiEngine_1.DeviceEventEmitter.removeListener(eventType,
|
|
64
41
|
// @ts-ignore
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
42
|
+
listener?.agoraCallback ?? listener);
|
|
43
|
+
}
|
|
44
|
+
removeAllListeners(eventType) {
|
|
68
45
|
IrisApiEngine_1.DeviceEventEmitter.removeAllListeners(eventType);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!MusicContentCenterInternal._event_handlers.find(
|
|
46
|
+
}
|
|
47
|
+
registerEventHandler(eventHandler) {
|
|
48
|
+
if (!MusicContentCenterInternal._event_handlers.find((value) => value === eventHandler)) {
|
|
72
49
|
MusicContentCenterInternal._event_handlers.push(eventHandler);
|
|
73
50
|
}
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
|
|
51
|
+
return super.registerEventHandler(eventHandler);
|
|
52
|
+
}
|
|
53
|
+
unregisterEventHandler() {
|
|
77
54
|
MusicContentCenterInternal._event_handlers = [];
|
|
78
|
-
return
|
|
79
|
-
}
|
|
80
|
-
|
|
55
|
+
return super.unregisterEventHandler();
|
|
56
|
+
}
|
|
57
|
+
release() {
|
|
81
58
|
MusicContentCenterInternal._event_handlers = [];
|
|
82
59
|
this.removeAllListeners();
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
60
|
+
super.release();
|
|
61
|
+
}
|
|
62
|
+
createMusicPlayer() {
|
|
86
63
|
// @ts-ignore
|
|
87
|
-
|
|
64
|
+
const mediaPlayerId = super.createMusicPlayer();
|
|
88
65
|
return new MusicPlayerInternal(mediaPlayerId);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return MusicContentCenterInternal;
|
|
92
|
-
}(IAgoraMusicContentCenterImpl_1.IMusicContentCenterImpl));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
93
68
|
exports.MusicContentCenterInternal = MusicContentCenterInternal;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_MusicPlayerInternal.prototype.getMediaPlayerId = function () {
|
|
69
|
+
MusicContentCenterInternal._event_handlers = [];
|
|
70
|
+
class _MusicPlayerInternal extends IAgoraMusicContentCenterImpl_1.IMusicPlayerImpl {
|
|
71
|
+
constructor(mediaPlayerId) {
|
|
72
|
+
super();
|
|
73
|
+
this._mediaPlayerId = mediaPlayerId;
|
|
74
|
+
}
|
|
75
|
+
getMediaPlayerId() {
|
|
102
76
|
return this._mediaPlayerId;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
function MusicPlayerInternal(mediaPlayerId) {
|
|
109
|
-
var _this = _super.call(this, mediaPlayerId) || this;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
class MusicPlayerInternal extends MediaPlayerInternal_1.MediaPlayerInternal {
|
|
80
|
+
constructor(mediaPlayerId) {
|
|
81
|
+
super(mediaPlayerId);
|
|
110
82
|
// @ts-ignore
|
|
111
|
-
|
|
112
|
-
return _this;
|
|
83
|
+
this._musicPlayer = new _MusicPlayerInternal(mediaPlayerId);
|
|
113
84
|
}
|
|
114
|
-
|
|
85
|
+
setPlayMode(mode) {
|
|
115
86
|
return this._musicPlayer.setPlayMode(mode);
|
|
116
|
-
}
|
|
117
|
-
|
|
87
|
+
}
|
|
88
|
+
openWithSongCode(songCode, startPos) {
|
|
118
89
|
return this._musicPlayer.openWithSongCode(songCode, startPos);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}(MediaPlayerInternal_1.MediaPlayerInternal));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
122
92
|
exports.MusicPlayerInternal = MusicPlayerInternal;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
_MusicCollection.prototype.getCount = function () {
|
|
93
|
+
class _MusicCollection extends IAgoraMusicContentCenter_1.MusicCollection {
|
|
94
|
+
constructor(collection) {
|
|
95
|
+
super();
|
|
96
|
+
this.count = collection.count;
|
|
97
|
+
this.music = collection.music;
|
|
98
|
+
this.page = collection.page;
|
|
99
|
+
this.pageSize = collection.pageSize;
|
|
100
|
+
this.total = collection.total;
|
|
101
|
+
}
|
|
102
|
+
getCount() {
|
|
135
103
|
return this.count;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
_MusicCollection.prototype.getPage = function () {
|
|
104
|
+
}
|
|
105
|
+
getMusic(index) {
|
|
106
|
+
return this.music[index] ?? {};
|
|
107
|
+
}
|
|
108
|
+
getPage() {
|
|
142
109
|
return this.page;
|
|
143
|
-
}
|
|
144
|
-
|
|
110
|
+
}
|
|
111
|
+
getPageSize() {
|
|
145
112
|
return this.pageSize;
|
|
146
|
-
}
|
|
147
|
-
|
|
113
|
+
}
|
|
114
|
+
getTotal() {
|
|
148
115
|
return this.total;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return _this;
|
|
158
|
-
}
|
|
159
|
-
MusicCollectionInternal.prototype.getCount = function () {
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
class MusicCollectionInternal extends IAgoraMusicContentCenterImpl_1.MusicCollectionImpl {
|
|
119
|
+
constructor(musicCollection) {
|
|
120
|
+
super();
|
|
121
|
+
this._musicCollection = new _MusicCollection(musicCollection);
|
|
122
|
+
}
|
|
123
|
+
getCount() {
|
|
160
124
|
return this._musicCollection.getCount();
|
|
161
|
-
}
|
|
162
|
-
|
|
125
|
+
}
|
|
126
|
+
getMusic(index) {
|
|
163
127
|
return this._musicCollection.getMusic(index);
|
|
164
|
-
}
|
|
165
|
-
|
|
128
|
+
}
|
|
129
|
+
getPage() {
|
|
166
130
|
return this._musicCollection.getPage();
|
|
167
|
-
}
|
|
168
|
-
|
|
131
|
+
}
|
|
132
|
+
getPageSize() {
|
|
169
133
|
return this._musicCollection.getPageSize();
|
|
170
|
-
}
|
|
171
|
-
|
|
134
|
+
}
|
|
135
|
+
getTotal() {
|
|
172
136
|
return this._musicCollection.getTotal();
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
}(IAgoraMusicContentCenterImpl_1.MusicCollectionImpl));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
176
139
|
exports.MusicCollectionInternal = MusicCollectionInternal;
|