agora-electron-sdk 4.2.0 → 4.2.2-dev.4
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/js/AgoraSdk.js +7 -5
- package/js/Private/AgoraBase.js +394 -1292
- package/js/Private/AgoraMediaBase.js +76 -340
- package/js/Private/AgoraMediaPlayerTypes.js +25 -122
- package/js/Private/IAgoraLog.js +5 -14
- package/js/Private/IAgoraMediaEngine.js +5 -2
- package/js/Private/IAgoraMediaPlayer.js +10 -4
- package/js/Private/IAgoraMediaRecorder.js +5 -2
- package/js/Private/IAgoraMediaStreamingSource.js +5 -12
- package/js/Private/IAgoraMusicContentCenter.js +68 -125
- package/js/Private/IAgoraRhythmPlayer.js +5 -10
- package/js/Private/IAgoraRtcEngine.js +141 -932
- package/js/Private/IAgoraRtcEngineEx.js +29 -13
- package/js/Private/IAgoraSpatialAudio.js +40 -53
- package/js/Private/IAudioDeviceManager.js +5 -2
- package/js/Private/impl/IAgoraMediaEngineImpl.js +156 -139
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +538 -526
- package/js/Private/impl/IAgoraMediaRecorderImpl.js +29 -26
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +264 -192
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +419 -399
- package/js/Private/impl/IAgoraRtcEngineImpl.js +2352 -2207
- package/js/Private/impl/IAgoraSpatialAudioImpl.js +192 -169
- package/js/Private/impl/IAudioDeviceManagerImpl.js +235 -232
- package/js/Private/internal/AudioDeviceManagerInternal.js +44 -24
- package/js/Private/internal/IrisApiEngine.js +109 -76
- package/js/Private/internal/LocalSpatialAudioEngineInternal.js +49 -29
- package/js/Private/internal/MediaEngineInternal.js +82 -58
- package/js/Private/internal/MediaPlayerInternal.js +132 -111
- package/js/Private/internal/MediaRecorderInternal.js +64 -38
- package/js/Private/internal/MusicContentCenterInternal.js +130 -100
- package/js/Private/internal/RtcEngineExInternal.js +265 -219
- package/js/Private/ti/AgoraBase-ti.js +2 -2
- package/js/Private/ti/AgoraMediaBase-ti.js +15 -15
- package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
- 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 +5 -4
- package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
- package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
- 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 +145 -100
- package/js/Renderer/IRenderer.js +18 -17
- package/js/Renderer/IRendererManager.js +5 -2
- package/js/Renderer/RendererManager.js +208 -180
- package/js/Renderer/WebGLRenderer/index.js +111 -107
- package/js/Renderer/YUVCanvasRenderer/index.js +68 -51
- package/js/Utils.js +85 -36
- package/package.json +3 -3
- package/ts/AgoraSdk.ts +3 -1
- package/ts/Private/AgoraBase.ts +227 -86
- package/ts/Private/AgoraMediaBase.ts +69 -54
- package/ts/Private/AgoraMediaPlayerTypes.ts +4 -4
- package/ts/Private/IAgoraLog.ts +1 -1
- package/ts/Private/IAgoraMediaEngine.ts +42 -39
- package/ts/Private/IAgoraMediaPlayer.ts +98 -67
- package/ts/Private/IAgoraMediaPlayerSource.ts +15 -8
- package/ts/Private/IAgoraMusicContentCenter.ts +25 -4
- package/ts/Private/IAgoraRtcEngine.ts +951 -747
- package/ts/Private/IAgoraRtcEngineEx.ts +183 -157
- package/ts/Private/IAgoraSpatialAudio.ts +55 -32
- package/ts/Private/IAudioDeviceManager.ts +39 -25
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +72 -21
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +136 -15
- package/ts/Private/internal/RtcEngineExInternal.ts +8 -0
- package/ts/Private/ti/AgoraMediaBase-ti.ts +13 -13
- package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +3 -2
- package/types/AgoraSdk.d.ts +3 -1
- package/types/AgoraSdk.d.ts.map +1 -1
- package/types/Private/AgoraBase.d.ts +221 -86
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +69 -51
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaPlayerTypes.d.ts +4 -4
- package/types/Private/IAgoraLog.d.ts +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +42 -39
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +98 -67
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayerSource.d.ts +15 -8
- package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
- package/types/Private/IAgoraMusicContentCenter.d.ts +17 -5
- package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +936 -744
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +183 -157
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAgoraSpatialAudio.d.ts +55 -32
- package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +39 -25
- package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +9 -5
- package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +18 -6
- package/types/Private/impl/IAgoraRtcEngineImpl.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/Private/ti/IAgoraMusicContentCenter-ti.d.ts.map +1 -1
|
@@ -1,231 +1,266 @@
|
|
|
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.IMusicContentCenterImpl = exports.IMusicPlayerImpl = exports.processIMusicContentCenterEventHandler = exports.MusicCollectionImpl = exports.MusicChartCollectionImpl = void 0;
|
|
4
|
-
|
|
19
|
+
var IAgoraMediaPlayerImpl_1 = require("./IAgoraMediaPlayerImpl");
|
|
5
20
|
// @ts-ignore
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const apiType = this.getApiTypeFromGetCount();
|
|
9
|
-
const jsonParams = {};
|
|
10
|
-
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
11
|
-
return jsonResults.result;
|
|
21
|
+
var MusicChartCollectionImpl = /** @class */ (function () {
|
|
22
|
+
function MusicChartCollectionImpl() {
|
|
12
23
|
}
|
|
13
|
-
|
|
24
|
+
MusicChartCollectionImpl.prototype.getCount = function () {
|
|
25
|
+
var apiType = this.getApiTypeFromGetCount();
|
|
26
|
+
var jsonParams = {};
|
|
27
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
28
|
+
return jsonResults.result;
|
|
29
|
+
};
|
|
30
|
+
MusicChartCollectionImpl.prototype.getApiTypeFromGetCount = function () {
|
|
14
31
|
return 'MusicChartCollection_getCount';
|
|
15
|
-
}
|
|
16
|
-
get(index) {
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
};
|
|
33
|
+
MusicChartCollectionImpl.prototype.get = function (index) {
|
|
34
|
+
var apiType = this.getApiTypeFromGet(index);
|
|
35
|
+
var jsonParams = {
|
|
19
36
|
index: index,
|
|
20
|
-
toJSON: ()
|
|
37
|
+
toJSON: function () {
|
|
21
38
|
return {
|
|
22
39
|
index: index,
|
|
23
40
|
};
|
|
24
41
|
},
|
|
25
42
|
};
|
|
26
|
-
|
|
43
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
27
44
|
return jsonResults.result;
|
|
28
|
-
}
|
|
29
|
-
getApiTypeFromGet(index) {
|
|
45
|
+
};
|
|
46
|
+
MusicChartCollectionImpl.prototype.getApiTypeFromGet = function (index) {
|
|
30
47
|
return 'MusicChartCollection_get';
|
|
31
|
-
}
|
|
32
|
-
|
|
48
|
+
};
|
|
49
|
+
return MusicChartCollectionImpl;
|
|
50
|
+
}());
|
|
33
51
|
exports.MusicChartCollectionImpl = MusicChartCollectionImpl;
|
|
34
52
|
// @ts-ignore
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const apiType = this.getApiTypeFromGetCount();
|
|
38
|
-
const jsonParams = {};
|
|
39
|
-
const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
40
|
-
return jsonResults.result;
|
|
53
|
+
var MusicCollectionImpl = /** @class */ (function () {
|
|
54
|
+
function MusicCollectionImpl() {
|
|
41
55
|
}
|
|
42
|
-
|
|
56
|
+
MusicCollectionImpl.prototype.getCount = function () {
|
|
57
|
+
var apiType = this.getApiTypeFromGetCount();
|
|
58
|
+
var jsonParams = {};
|
|
59
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
60
|
+
return jsonResults.result;
|
|
61
|
+
};
|
|
62
|
+
MusicCollectionImpl.prototype.getApiTypeFromGetCount = function () {
|
|
43
63
|
return 'MusicCollection_getCount';
|
|
44
|
-
}
|
|
45
|
-
getTotal() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
};
|
|
65
|
+
MusicCollectionImpl.prototype.getTotal = function () {
|
|
66
|
+
var apiType = this.getApiTypeFromGetTotal();
|
|
67
|
+
var jsonParams = {};
|
|
68
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
49
69
|
return jsonResults.result;
|
|
50
|
-
}
|
|
51
|
-
getApiTypeFromGetTotal() {
|
|
70
|
+
};
|
|
71
|
+
MusicCollectionImpl.prototype.getApiTypeFromGetTotal = function () {
|
|
52
72
|
return 'MusicCollection_getTotal';
|
|
53
|
-
}
|
|
54
|
-
getPage() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
};
|
|
74
|
+
MusicCollectionImpl.prototype.getPage = function () {
|
|
75
|
+
var apiType = this.getApiTypeFromGetPage();
|
|
76
|
+
var jsonParams = {};
|
|
77
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
58
78
|
return jsonResults.result;
|
|
59
|
-
}
|
|
60
|
-
getApiTypeFromGetPage() {
|
|
79
|
+
};
|
|
80
|
+
MusicCollectionImpl.prototype.getApiTypeFromGetPage = function () {
|
|
61
81
|
return 'MusicCollection_getPage';
|
|
62
|
-
}
|
|
63
|
-
getPageSize() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
};
|
|
83
|
+
MusicCollectionImpl.prototype.getPageSize = function () {
|
|
84
|
+
var apiType = this.getApiTypeFromGetPageSize();
|
|
85
|
+
var jsonParams = {};
|
|
86
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
67
87
|
return jsonResults.result;
|
|
68
|
-
}
|
|
69
|
-
getApiTypeFromGetPageSize() {
|
|
88
|
+
};
|
|
89
|
+
MusicCollectionImpl.prototype.getApiTypeFromGetPageSize = function () {
|
|
70
90
|
return 'MusicCollection_getPageSize';
|
|
71
|
-
}
|
|
72
|
-
getMusic(index) {
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
};
|
|
92
|
+
MusicCollectionImpl.prototype.getMusic = function (index) {
|
|
93
|
+
var apiType = this.getApiTypeFromGetMusic(index);
|
|
94
|
+
var jsonParams = {
|
|
75
95
|
index: index,
|
|
76
|
-
toJSON: ()
|
|
96
|
+
toJSON: function () {
|
|
77
97
|
return {
|
|
78
98
|
index: index,
|
|
79
99
|
};
|
|
80
100
|
},
|
|
81
101
|
};
|
|
82
|
-
|
|
102
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
83
103
|
return jsonResults.result;
|
|
84
|
-
}
|
|
85
|
-
getApiTypeFromGetMusic(index) {
|
|
104
|
+
};
|
|
105
|
+
MusicCollectionImpl.prototype.getApiTypeFromGetMusic = function (index) {
|
|
86
106
|
return 'MusicCollection_getMusic';
|
|
87
|
-
}
|
|
88
|
-
|
|
107
|
+
};
|
|
108
|
+
return MusicCollectionImpl;
|
|
109
|
+
}());
|
|
89
110
|
exports.MusicCollectionImpl = MusicCollectionImpl;
|
|
90
111
|
function processIMusicContentCenterEventHandler(handler, event, jsonParams) {
|
|
91
112
|
switch (event) {
|
|
92
113
|
case 'onMusicChartsResult':
|
|
93
114
|
if (handler.onMusicChartsResult !== undefined) {
|
|
94
|
-
handler.onMusicChartsResult(jsonParams.requestId, jsonParams.result, jsonParams.
|
|
115
|
+
handler.onMusicChartsResult(jsonParams.requestId, jsonParams.result, jsonParams.errorCode);
|
|
95
116
|
}
|
|
96
117
|
break;
|
|
97
118
|
case 'onMusicCollectionResult':
|
|
98
119
|
if (handler.onMusicCollectionResult !== undefined) {
|
|
99
|
-
handler.onMusicCollectionResult(jsonParams.requestId, jsonParams.result, jsonParams.
|
|
120
|
+
handler.onMusicCollectionResult(jsonParams.requestId, jsonParams.result, jsonParams.errorCode);
|
|
100
121
|
}
|
|
101
122
|
break;
|
|
102
123
|
case 'onLyricResult':
|
|
103
124
|
if (handler.onLyricResult !== undefined) {
|
|
104
|
-
handler.onLyricResult(jsonParams.requestId, jsonParams.lyricUrl, jsonParams.
|
|
125
|
+
handler.onLyricResult(jsonParams.requestId, jsonParams.songCode, jsonParams.lyricUrl, jsonParams.errorCode);
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
case 'onSongSimpleInfoResult':
|
|
129
|
+
if (handler.onSongSimpleInfoResult !== undefined) {
|
|
130
|
+
handler.onSongSimpleInfoResult(jsonParams.requestId, jsonParams.songCode, jsonParams.simpleInfo, jsonParams.errorCode);
|
|
105
131
|
}
|
|
106
132
|
break;
|
|
107
133
|
case 'onPreLoadEvent':
|
|
108
134
|
if (handler.onPreLoadEvent !== undefined) {
|
|
109
|
-
handler.onPreLoadEvent(jsonParams.songCode, jsonParams.percent, jsonParams.lyricUrl, jsonParams.status, jsonParams.
|
|
135
|
+
handler.onPreLoadEvent(jsonParams.requestId, jsonParams.songCode, jsonParams.percent, jsonParams.lyricUrl, jsonParams.status, jsonParams.errorCode);
|
|
110
136
|
}
|
|
111
137
|
break;
|
|
112
138
|
}
|
|
113
139
|
}
|
|
114
140
|
exports.processIMusicContentCenterEventHandler = processIMusicContentCenterEventHandler;
|
|
115
141
|
// @ts-ignore
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
142
|
+
var IMusicPlayerImpl = /** @class */ (function (_super) {
|
|
143
|
+
__extends(IMusicPlayerImpl, _super);
|
|
144
|
+
function IMusicPlayerImpl() {
|
|
145
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
146
|
+
}
|
|
147
|
+
IMusicPlayerImpl.prototype.openWithSongCode = function (songCode, startPos) {
|
|
148
|
+
if (startPos === void 0) { startPos = 0; }
|
|
149
|
+
var apiType = this.getApiTypeFromOpenWithSongCode(songCode, startPos);
|
|
150
|
+
var jsonParams = {
|
|
120
151
|
songCode: songCode,
|
|
121
152
|
startPos: startPos,
|
|
122
|
-
toJSON: ()
|
|
153
|
+
toJSON: function () {
|
|
123
154
|
return {
|
|
124
155
|
songCode: songCode,
|
|
125
156
|
startPos: startPos,
|
|
126
157
|
};
|
|
127
158
|
},
|
|
128
159
|
};
|
|
129
|
-
|
|
160
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
130
161
|
return jsonResults.result;
|
|
131
|
-
}
|
|
132
|
-
getApiTypeFromOpenWithSongCode(songCode, startPos
|
|
162
|
+
};
|
|
163
|
+
IMusicPlayerImpl.prototype.getApiTypeFromOpenWithSongCode = function (songCode, startPos) {
|
|
164
|
+
if (startPos === void 0) { startPos = 0; }
|
|
133
165
|
return 'MusicPlayer_openWithSongCode';
|
|
134
|
-
}
|
|
135
|
-
|
|
166
|
+
};
|
|
167
|
+
return IMusicPlayerImpl;
|
|
168
|
+
}(IAgoraMediaPlayerImpl_1.IMediaPlayerImpl));
|
|
136
169
|
exports.IMusicPlayerImpl = IMusicPlayerImpl;
|
|
137
170
|
// @ts-ignore
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
171
|
+
var IMusicContentCenterImpl = /** @class */ (function () {
|
|
172
|
+
function IMusicContentCenterImpl() {
|
|
173
|
+
}
|
|
174
|
+
IMusicContentCenterImpl.prototype.initialize = function (configuration) {
|
|
175
|
+
var apiType = this.getApiTypeFromInitialize(configuration);
|
|
176
|
+
var jsonParams = {
|
|
142
177
|
configuration: configuration,
|
|
143
|
-
toJSON: ()
|
|
178
|
+
toJSON: function () {
|
|
144
179
|
return {
|
|
145
180
|
configuration: configuration,
|
|
146
181
|
};
|
|
147
182
|
},
|
|
148
183
|
};
|
|
149
|
-
|
|
184
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
150
185
|
return jsonResults.result;
|
|
151
|
-
}
|
|
152
|
-
getApiTypeFromInitialize(configuration) {
|
|
186
|
+
};
|
|
187
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromInitialize = function (configuration) {
|
|
153
188
|
return 'MusicContentCenter_initialize';
|
|
154
|
-
}
|
|
155
|
-
renewToken(token) {
|
|
156
|
-
|
|
157
|
-
|
|
189
|
+
};
|
|
190
|
+
IMusicContentCenterImpl.prototype.renewToken = function (token) {
|
|
191
|
+
var apiType = this.getApiTypeFromRenewToken(token);
|
|
192
|
+
var jsonParams = {
|
|
158
193
|
token: token,
|
|
159
|
-
toJSON: ()
|
|
194
|
+
toJSON: function () {
|
|
160
195
|
return {
|
|
161
196
|
token: token,
|
|
162
197
|
};
|
|
163
198
|
},
|
|
164
199
|
};
|
|
165
|
-
|
|
200
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
166
201
|
return jsonResults.result;
|
|
167
|
-
}
|
|
168
|
-
getApiTypeFromRenewToken(token) {
|
|
202
|
+
};
|
|
203
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromRenewToken = function (token) {
|
|
169
204
|
return 'MusicContentCenter_renewToken';
|
|
170
|
-
}
|
|
171
|
-
release() {
|
|
172
|
-
|
|
173
|
-
|
|
205
|
+
};
|
|
206
|
+
IMusicContentCenterImpl.prototype.release = function () {
|
|
207
|
+
var apiType = this.getApiTypeFromRelease();
|
|
208
|
+
var jsonParams = {};
|
|
174
209
|
IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
175
|
-
}
|
|
176
|
-
getApiTypeFromRelease() {
|
|
210
|
+
};
|
|
211
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromRelease = function () {
|
|
177
212
|
return 'MusicContentCenter_release';
|
|
178
|
-
}
|
|
179
|
-
registerEventHandler(eventHandler) {
|
|
180
|
-
|
|
181
|
-
|
|
213
|
+
};
|
|
214
|
+
IMusicContentCenterImpl.prototype.registerEventHandler = function (eventHandler) {
|
|
215
|
+
var apiType = this.getApiTypeFromRegisterEventHandler(eventHandler);
|
|
216
|
+
var jsonParams = {
|
|
182
217
|
eventHandler: eventHandler,
|
|
183
|
-
toJSON: ()
|
|
218
|
+
toJSON: function () {
|
|
184
219
|
return {};
|
|
185
220
|
},
|
|
186
221
|
};
|
|
187
|
-
|
|
222
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
188
223
|
return jsonResults.result;
|
|
189
|
-
}
|
|
190
|
-
getApiTypeFromRegisterEventHandler(eventHandler) {
|
|
224
|
+
};
|
|
225
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromRegisterEventHandler = function (eventHandler) {
|
|
191
226
|
return 'MusicContentCenter_registerEventHandler';
|
|
192
|
-
}
|
|
193
|
-
unregisterEventHandler() {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
227
|
+
};
|
|
228
|
+
IMusicContentCenterImpl.prototype.unregisterEventHandler = function () {
|
|
229
|
+
var apiType = this.getApiTypeFromUnregisterEventHandler();
|
|
230
|
+
var jsonParams = {};
|
|
231
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
197
232
|
return jsonResults.result;
|
|
198
|
-
}
|
|
199
|
-
getApiTypeFromUnregisterEventHandler() {
|
|
233
|
+
};
|
|
234
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromUnregisterEventHandler = function () {
|
|
200
235
|
return 'MusicContentCenter_unregisterEventHandler';
|
|
201
|
-
}
|
|
202
|
-
createMusicPlayer() {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
236
|
+
};
|
|
237
|
+
IMusicContentCenterImpl.prototype.createMusicPlayer = function () {
|
|
238
|
+
var apiType = this.getApiTypeFromCreateMusicPlayer();
|
|
239
|
+
var jsonParams = {};
|
|
240
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
206
241
|
return jsonResults.result;
|
|
207
|
-
}
|
|
208
|
-
getApiTypeFromCreateMusicPlayer() {
|
|
242
|
+
};
|
|
243
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromCreateMusicPlayer = function () {
|
|
209
244
|
return 'MusicContentCenter_createMusicPlayer';
|
|
210
|
-
}
|
|
211
|
-
getMusicCharts() {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
245
|
+
};
|
|
246
|
+
IMusicContentCenterImpl.prototype.getMusicCharts = function () {
|
|
247
|
+
var apiType = this.getApiTypeFromGetMusicCharts();
|
|
248
|
+
var jsonParams = {};
|
|
249
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
250
|
+
var requestId = jsonResults.requestId;
|
|
216
251
|
return requestId;
|
|
217
|
-
}
|
|
218
|
-
getApiTypeFromGetMusicCharts() {
|
|
252
|
+
};
|
|
253
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetMusicCharts = function () {
|
|
219
254
|
return 'MusicContentCenter_getMusicCharts';
|
|
220
|
-
}
|
|
221
|
-
getMusicCollectionByMusicChartId(musicChartId, page, pageSize, jsonOption) {
|
|
222
|
-
|
|
223
|
-
|
|
255
|
+
};
|
|
256
|
+
IMusicContentCenterImpl.prototype.getMusicCollectionByMusicChartId = function (musicChartId, page, pageSize, jsonOption) {
|
|
257
|
+
var apiType = this.getApiTypeFromGetMusicCollectionByMusicChartId(musicChartId, page, pageSize, jsonOption);
|
|
258
|
+
var jsonParams = {
|
|
224
259
|
musicChartId: musicChartId,
|
|
225
260
|
page: page,
|
|
226
261
|
pageSize: pageSize,
|
|
227
262
|
jsonOption: jsonOption,
|
|
228
|
-
toJSON: ()
|
|
263
|
+
toJSON: function () {
|
|
229
264
|
return {
|
|
230
265
|
musicChartId: musicChartId,
|
|
231
266
|
page: page,
|
|
@@ -234,24 +269,22 @@ class IMusicContentCenterImpl {
|
|
|
234
269
|
};
|
|
235
270
|
},
|
|
236
271
|
};
|
|
237
|
-
|
|
238
|
-
|
|
272
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
273
|
+
var requestId = jsonResults.requestId;
|
|
239
274
|
return requestId;
|
|
240
|
-
}
|
|
241
|
-
getApiTypeFromGetMusicCollectionByMusicChartId(musicChartId, page, pageSize, jsonOption) {
|
|
275
|
+
};
|
|
276
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetMusicCollectionByMusicChartId = function (musicChartId, page, pageSize, jsonOption) {
|
|
242
277
|
return 'MusicContentCenter_getMusicCollectionByMusicChartId';
|
|
243
|
-
}
|
|
244
|
-
searchMusic(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
requestId: requestId,
|
|
278
|
+
};
|
|
279
|
+
IMusicContentCenterImpl.prototype.searchMusic = function (keyWord, page, pageSize, jsonOption) {
|
|
280
|
+
var apiType = this.getApiTypeFromSearchMusic(keyWord, page, pageSize, jsonOption);
|
|
281
|
+
var jsonParams = {
|
|
248
282
|
keyWord: keyWord,
|
|
249
283
|
page: page,
|
|
250
284
|
pageSize: pageSize,
|
|
251
285
|
jsonOption: jsonOption,
|
|
252
|
-
toJSON: ()
|
|
286
|
+
toJSON: function () {
|
|
253
287
|
return {
|
|
254
|
-
requestId: requestId,
|
|
255
288
|
keyWord: keyWord,
|
|
256
289
|
page: page,
|
|
257
290
|
pageSize: pageSize,
|
|
@@ -259,95 +292,134 @@ class IMusicContentCenterImpl {
|
|
|
259
292
|
};
|
|
260
293
|
},
|
|
261
294
|
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
295
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
296
|
+
var requestId = jsonResults.requestId;
|
|
297
|
+
return requestId;
|
|
298
|
+
};
|
|
299
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromSearchMusic = function (keyWord, page, pageSize, jsonOption) {
|
|
266
300
|
return 'MusicContentCenter_searchMusic';
|
|
267
|
-
}
|
|
268
|
-
preload(songCode
|
|
269
|
-
|
|
270
|
-
|
|
301
|
+
};
|
|
302
|
+
IMusicContentCenterImpl.prototype.preload = function (songCode) {
|
|
303
|
+
var apiType = this.getApiTypeFromPreload(songCode);
|
|
304
|
+
var jsonParams = {
|
|
271
305
|
songCode: songCode,
|
|
272
|
-
|
|
273
|
-
toJSON: () => {
|
|
306
|
+
toJSON: function () {
|
|
274
307
|
return {
|
|
275
308
|
songCode: songCode,
|
|
276
|
-
jsonOption: jsonOption,
|
|
277
309
|
};
|
|
278
310
|
},
|
|
279
311
|
};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
312
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
313
|
+
var requestId = jsonResults.requestId;
|
|
314
|
+
return requestId;
|
|
315
|
+
};
|
|
316
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromPreload = function (songCode) {
|
|
284
317
|
return 'MusicContentCenter_preload';
|
|
285
|
-
}
|
|
286
|
-
removeCache(songCode) {
|
|
287
|
-
|
|
288
|
-
|
|
318
|
+
};
|
|
319
|
+
IMusicContentCenterImpl.prototype.removeCache = function (songCode) {
|
|
320
|
+
var apiType = this.getApiTypeFromRemoveCache(songCode);
|
|
321
|
+
var jsonParams = {
|
|
289
322
|
songCode: songCode,
|
|
290
|
-
toJSON: ()
|
|
323
|
+
toJSON: function () {
|
|
291
324
|
return {
|
|
292
325
|
songCode: songCode,
|
|
293
326
|
};
|
|
294
327
|
},
|
|
295
328
|
};
|
|
296
|
-
|
|
329
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
297
330
|
return jsonResults.result;
|
|
298
|
-
}
|
|
299
|
-
getApiTypeFromRemoveCache(songCode) {
|
|
331
|
+
};
|
|
332
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromRemoveCache = function (songCode) {
|
|
300
333
|
return 'MusicContentCenter_removeCache';
|
|
301
|
-
}
|
|
302
|
-
getCaches() {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
334
|
+
};
|
|
335
|
+
IMusicContentCenterImpl.prototype.getCaches = function () {
|
|
336
|
+
var apiType = this.getApiTypeFromGetCaches();
|
|
337
|
+
var jsonParams = {};
|
|
338
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
339
|
+
var cacheInfo = jsonResults.cacheInfo;
|
|
340
|
+
var cacheInfoSize = jsonResults.cacheInfoSize;
|
|
308
341
|
return {
|
|
309
|
-
cacheInfo,
|
|
310
|
-
cacheInfoSize,
|
|
342
|
+
cacheInfo: cacheInfo,
|
|
343
|
+
cacheInfoSize: cacheInfoSize,
|
|
311
344
|
};
|
|
312
|
-
}
|
|
313
|
-
getApiTypeFromGetCaches() {
|
|
345
|
+
};
|
|
346
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetCaches = function () {
|
|
314
347
|
return 'MusicContentCenter_getCaches';
|
|
315
|
-
}
|
|
316
|
-
isPreloaded(songCode) {
|
|
317
|
-
|
|
318
|
-
|
|
348
|
+
};
|
|
349
|
+
IMusicContentCenterImpl.prototype.isPreloaded = function (songCode) {
|
|
350
|
+
var apiType = this.getApiTypeFromIsPreloaded(songCode);
|
|
351
|
+
var jsonParams = {
|
|
319
352
|
songCode: songCode,
|
|
320
|
-
toJSON: ()
|
|
353
|
+
toJSON: function () {
|
|
321
354
|
return {
|
|
322
355
|
songCode: songCode,
|
|
323
356
|
};
|
|
324
357
|
},
|
|
325
358
|
};
|
|
326
|
-
|
|
359
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
327
360
|
return jsonResults.result;
|
|
328
|
-
}
|
|
329
|
-
getApiTypeFromIsPreloaded(songCode) {
|
|
361
|
+
};
|
|
362
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromIsPreloaded = function (songCode) {
|
|
330
363
|
return 'MusicContentCenter_isPreloaded';
|
|
331
|
-
}
|
|
332
|
-
getLyric(songCode, lyricType
|
|
333
|
-
|
|
334
|
-
|
|
364
|
+
};
|
|
365
|
+
IMusicContentCenterImpl.prototype.getLyric = function (songCode, lyricType) {
|
|
366
|
+
if (lyricType === void 0) { lyricType = 0; }
|
|
367
|
+
var apiType = this.getApiTypeFromGetLyric(songCode, lyricType);
|
|
368
|
+
var jsonParams = {
|
|
335
369
|
songCode: songCode,
|
|
336
370
|
LyricType: lyricType,
|
|
337
|
-
toJSON: ()
|
|
371
|
+
toJSON: function () {
|
|
338
372
|
return {
|
|
339
373
|
songCode: songCode,
|
|
340
374
|
LyricType: lyricType,
|
|
341
375
|
};
|
|
342
376
|
},
|
|
343
377
|
};
|
|
344
|
-
|
|
345
|
-
|
|
378
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
379
|
+
var requestId = jsonResults.requestId;
|
|
346
380
|
return requestId;
|
|
347
|
-
}
|
|
348
|
-
getApiTypeFromGetLyric(songCode, lyricType
|
|
381
|
+
};
|
|
382
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetLyric = function (songCode, lyricType) {
|
|
383
|
+
if (lyricType === void 0) { lyricType = 0; }
|
|
349
384
|
return 'MusicContentCenter_getLyric';
|
|
350
|
-
}
|
|
351
|
-
|
|
385
|
+
};
|
|
386
|
+
IMusicContentCenterImpl.prototype.getSongSimpleInfo = function (songCode) {
|
|
387
|
+
var apiType = this.getApiTypeFromGetSongSimpleInfo(songCode);
|
|
388
|
+
var jsonParams = {
|
|
389
|
+
songCode: songCode,
|
|
390
|
+
toJSON: function () {
|
|
391
|
+
return {
|
|
392
|
+
songCode: songCode,
|
|
393
|
+
};
|
|
394
|
+
},
|
|
395
|
+
};
|
|
396
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
397
|
+
var requestId = jsonResults.requestId;
|
|
398
|
+
return requestId;
|
|
399
|
+
};
|
|
400
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetSongSimpleInfo = function (songCode) {
|
|
401
|
+
return 'MusicContentCenter_getSongSimpleInfo';
|
|
402
|
+
};
|
|
403
|
+
IMusicContentCenterImpl.prototype.getInternalSongCode = function (songCode, jsonOption) {
|
|
404
|
+
var apiType = this.getApiTypeFromGetInternalSongCode(songCode, jsonOption);
|
|
405
|
+
var jsonParams = {
|
|
406
|
+
songCode: songCode,
|
|
407
|
+
jsonOption: jsonOption,
|
|
408
|
+
toJSON: function () {
|
|
409
|
+
return {
|
|
410
|
+
songCode: songCode,
|
|
411
|
+
jsonOption: jsonOption,
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
|
|
416
|
+
var internalSongCode = jsonResults.internalSongCode;
|
|
417
|
+
return internalSongCode;
|
|
418
|
+
};
|
|
419
|
+
IMusicContentCenterImpl.prototype.getApiTypeFromGetInternalSongCode = function (songCode, jsonOption) {
|
|
420
|
+
return 'MusicContentCenter_getInternalSongCode';
|
|
421
|
+
};
|
|
422
|
+
return IMusicContentCenterImpl;
|
|
423
|
+
}());
|
|
352
424
|
exports.IMusicContentCenterImpl = IMusicContentCenterImpl;
|
|
353
|
-
|
|
425
|
+
var IrisApiEngine_1 = require("../internal/IrisApiEngine");
|