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.
Files changed (103) hide show
  1. package/js/AgoraSdk.js +7 -5
  2. package/js/Private/AgoraBase.js +394 -1292
  3. package/js/Private/AgoraMediaBase.js +76 -340
  4. package/js/Private/AgoraMediaPlayerTypes.js +25 -122
  5. package/js/Private/IAgoraLog.js +5 -14
  6. package/js/Private/IAgoraMediaEngine.js +5 -2
  7. package/js/Private/IAgoraMediaPlayer.js +10 -4
  8. package/js/Private/IAgoraMediaRecorder.js +5 -2
  9. package/js/Private/IAgoraMediaStreamingSource.js +5 -12
  10. package/js/Private/IAgoraMusicContentCenter.js +68 -125
  11. package/js/Private/IAgoraRhythmPlayer.js +5 -10
  12. package/js/Private/IAgoraRtcEngine.js +141 -932
  13. package/js/Private/IAgoraRtcEngineEx.js +29 -13
  14. package/js/Private/IAgoraSpatialAudio.js +40 -53
  15. package/js/Private/IAudioDeviceManager.js +5 -2
  16. package/js/Private/impl/IAgoraMediaEngineImpl.js +156 -139
  17. package/js/Private/impl/IAgoraMediaPlayerImpl.js +538 -526
  18. package/js/Private/impl/IAgoraMediaRecorderImpl.js +29 -26
  19. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +264 -192
  20. package/js/Private/impl/IAgoraRtcEngineExImpl.js +419 -399
  21. package/js/Private/impl/IAgoraRtcEngineImpl.js +2352 -2207
  22. package/js/Private/impl/IAgoraSpatialAudioImpl.js +192 -169
  23. package/js/Private/impl/IAudioDeviceManagerImpl.js +235 -232
  24. package/js/Private/internal/AudioDeviceManagerInternal.js +44 -24
  25. package/js/Private/internal/IrisApiEngine.js +109 -76
  26. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +49 -29
  27. package/js/Private/internal/MediaEngineInternal.js +82 -58
  28. package/js/Private/internal/MediaPlayerInternal.js +132 -111
  29. package/js/Private/internal/MediaRecorderInternal.js +64 -38
  30. package/js/Private/internal/MusicContentCenterInternal.js +130 -100
  31. package/js/Private/internal/RtcEngineExInternal.js +265 -219
  32. package/js/Private/ti/AgoraBase-ti.js +2 -2
  33. package/js/Private/ti/AgoraMediaBase-ti.js +15 -15
  34. package/js/Private/ti/AgoraMediaPlayerTypes-ti.js +1 -1
  35. package/js/Private/ti/IAgoraLog-ti.js +1 -1
  36. package/js/Private/ti/IAgoraMediaEngine-ti.js +1 -1
  37. package/js/Private/ti/IAgoraMediaPlayer-ti.js +2 -2
  38. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +2 -2
  39. package/js/Private/ti/IAgoraMediaRecorder-ti.js +1 -1
  40. package/js/Private/ti/IAgoraMediaStreamingSource-ti.js +1 -1
  41. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -4
  42. package/js/Private/ti/IAgoraRhythmPlayer-ti.js +1 -1
  43. package/js/Private/ti/IAgoraRtcEngine-ti.js +2 -2
  44. package/js/Private/ti/IAgoraRtcEngineEx-ti.js +1 -1
  45. package/js/Private/ti/IAgoraSpatialAudio-ti.js +1 -1
  46. package/js/Private/ti/IAudioDeviceManager-ti.js +1 -1
  47. package/js/Renderer/AgoraView.js +145 -100
  48. package/js/Renderer/IRenderer.js +18 -17
  49. package/js/Renderer/IRendererManager.js +5 -2
  50. package/js/Renderer/RendererManager.js +208 -180
  51. package/js/Renderer/WebGLRenderer/index.js +111 -107
  52. package/js/Renderer/YUVCanvasRenderer/index.js +68 -51
  53. package/js/Utils.js +85 -36
  54. package/package.json +3 -3
  55. package/ts/AgoraSdk.ts +3 -1
  56. package/ts/Private/AgoraBase.ts +227 -86
  57. package/ts/Private/AgoraMediaBase.ts +69 -54
  58. package/ts/Private/AgoraMediaPlayerTypes.ts +4 -4
  59. package/ts/Private/IAgoraLog.ts +1 -1
  60. package/ts/Private/IAgoraMediaEngine.ts +42 -39
  61. package/ts/Private/IAgoraMediaPlayer.ts +98 -67
  62. package/ts/Private/IAgoraMediaPlayerSource.ts +15 -8
  63. package/ts/Private/IAgoraMusicContentCenter.ts +25 -4
  64. package/ts/Private/IAgoraRtcEngine.ts +951 -747
  65. package/ts/Private/IAgoraRtcEngineEx.ts +183 -157
  66. package/ts/Private/IAgoraSpatialAudio.ts +55 -32
  67. package/ts/Private/IAudioDeviceManager.ts +39 -25
  68. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +72 -21
  69. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +136 -15
  70. package/ts/Private/internal/RtcEngineExInternal.ts +8 -0
  71. package/ts/Private/ti/AgoraMediaBase-ti.ts +13 -13
  72. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +3 -2
  73. package/types/AgoraSdk.d.ts +3 -1
  74. package/types/AgoraSdk.d.ts.map +1 -1
  75. package/types/Private/AgoraBase.d.ts +221 -86
  76. package/types/Private/AgoraBase.d.ts.map +1 -1
  77. package/types/Private/AgoraMediaBase.d.ts +69 -51
  78. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  79. package/types/Private/AgoraMediaPlayerTypes.d.ts +4 -4
  80. package/types/Private/IAgoraLog.d.ts +1 -1
  81. package/types/Private/IAgoraMediaEngine.d.ts +42 -39
  82. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  83. package/types/Private/IAgoraMediaPlayer.d.ts +98 -67
  84. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  85. package/types/Private/IAgoraMediaPlayerSource.d.ts +15 -8
  86. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  87. package/types/Private/IAgoraMusicContentCenter.d.ts +17 -5
  88. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  89. package/types/Private/IAgoraRtcEngine.d.ts +936 -744
  90. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  91. package/types/Private/IAgoraRtcEngineEx.d.ts +183 -157
  92. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  93. package/types/Private/IAgoraSpatialAudio.d.ts +55 -32
  94. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  95. package/types/Private/IAudioDeviceManager.d.ts +39 -25
  96. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  97. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts +9 -5
  98. package/types/Private/impl/IAgoraMusicContentCenterImpl.d.ts.map +1 -1
  99. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +18 -6
  100. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  101. package/types/Private/internal/RtcEngineExInternal.d.ts +1 -0
  102. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  103. 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
- const IAgoraMediaPlayerImpl_1 = require("./IAgoraMediaPlayerImpl");
19
+ var IAgoraMediaPlayerImpl_1 = require("./IAgoraMediaPlayerImpl");
5
20
  // @ts-ignore
6
- class MusicChartCollectionImpl {
7
- getCount() {
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
- getApiTypeFromGetCount() {
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
- const apiType = this.getApiTypeFromGet(index);
18
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- class MusicCollectionImpl {
36
- getCount() {
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
- getApiTypeFromGetCount() {
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
- const apiType = this.getApiTypeFromGetTotal();
47
- const jsonParams = {};
48
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromGetPage();
56
- const jsonParams = {};
57
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromGetPageSize();
65
- const jsonParams = {};
66
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromGetMusic(index);
74
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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.error_code);
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.error_code);
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.error_code);
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.error_code);
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
- class IMusicPlayerImpl extends IAgoraMediaPlayerImpl_1.IMediaPlayerImpl {
117
- openWithSongCode(songCode, startPos = 0) {
118
- const apiType = this.getApiTypeFromOpenWithSongCode(songCode, startPos);
119
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
160
+ var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
130
161
  return jsonResults.result;
131
- }
132
- getApiTypeFromOpenWithSongCode(songCode, startPos = 0) {
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
- class IMusicContentCenterImpl {
139
- initialize(configuration) {
140
- const apiType = this.getApiTypeFromInitialize(configuration);
141
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromRenewToken(token);
157
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromRelease();
173
- const jsonParams = {};
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
- const apiType = this.getApiTypeFromRegisterEventHandler(eventHandler);
181
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromUnregisterEventHandler();
195
- const jsonParams = {};
196
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromCreateMusicPlayer();
204
- const jsonParams = {};
205
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromGetMusicCharts();
213
- const jsonParams = {};
214
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
215
- const requestId = jsonResults.requestId;
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
- const apiType = this.getApiTypeFromGetMusicCollectionByMusicChartId(musicChartId, page, pageSize, jsonOption);
223
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
238
- const requestId = jsonResults.requestId;
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(requestId, keyWord, page, pageSize, jsonOption) {
245
- const apiType = this.getApiTypeFromSearchMusic(requestId, keyWord, page, pageSize, jsonOption);
246
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
263
- return jsonResults.result;
264
- }
265
- getApiTypeFromSearchMusic(requestId, keyWord, page, pageSize, jsonOption) {
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, jsonOption) {
269
- const apiType = this.getApiTypeFromPreload(songCode, jsonOption);
270
- const jsonParams = {
301
+ };
302
+ IMusicContentCenterImpl.prototype.preload = function (songCode) {
303
+ var apiType = this.getApiTypeFromPreload(songCode);
304
+ var jsonParams = {
271
305
  songCode: songCode,
272
- jsonOption: jsonOption,
273
- toJSON: () => {
306
+ toJSON: function () {
274
307
  return {
275
308
  songCode: songCode,
276
- jsonOption: jsonOption,
277
309
  };
278
310
  },
279
311
  };
280
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
281
- return jsonResults.result;
282
- }
283
- getApiTypeFromPreload(songCode, jsonOption) {
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
- const apiType = this.getApiTypeFromRemoveCache(songCode);
288
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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
- const apiType = this.getApiTypeFromGetCaches();
304
- const jsonParams = {};
305
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
306
- const cacheInfo = jsonResults.cacheInfo;
307
- const cacheInfoSize = jsonResults.cacheInfoSize;
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
- const apiType = this.getApiTypeFromIsPreloaded(songCode);
318
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
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 = 0) {
333
- const apiType = this.getApiTypeFromGetLyric(songCode, lyricType);
334
- const jsonParams = {
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
- const jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
345
- const requestId = jsonResults.requestId;
378
+ var jsonResults = IrisApiEngine_1.callIrisApi.call(this, apiType, jsonParams);
379
+ var requestId = jsonResults.requestId;
346
380
  return requestId;
347
- }
348
- getApiTypeFromGetLyric(songCode, lyricType = 0) {
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
- const IrisApiEngine_1 = require("../internal/IrisApiEngine");
425
+ var IrisApiEngine_1 = require("../internal/IrisApiEngine");