|
| void | onPreLoadEvent (String requestId, long songCode, int percent, String lyricUrl, int state, int reason) |
| | Reports the event of preloading music resources. More...
|
| |
| void | onMusicCollectionResult (String requestId, int page, int pageSize, int total, Music[] list, int reason) |
| | Callback for retrieving a list of music resources. More...
|
| |
| void | onMusicChartsResult (String requestId, MusicChartInfo[] list, int reason) |
| | Callback for retrieving music charts. More...
|
| |
| void | onLyricResult (String requestId, long songCode, String lyricUrl, int reason) |
| | Callback for lyric download URL. More...
|
| |
| void | onSongSimpleInfoResult (String requestId, long songCode, String simpleInfo, int reason) |
| | Callback for detailed information of a music resource. More...
|
| |
| void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onMusicCollectionResult |
( |
String |
requestId, |
|
|
int |
page, |
|
|
int |
pageSize, |
|
|
int |
total, |
|
|
Music[] |
list, |
|
|
int |
reason |
|
) |
| |
Callback for retrieving a list of music resources.
This callback is triggered by the SDK when you call the getMusicCollectionByMusicChartId(int musicChartId, int page, int pageSize) method to retrieve a list of music resources from a specific chart, or the searchMusic(String keyword, int page, int pageSize) method to search for music resources. It reports detailed information about the music resources in the chart.
- Parameters
-
| requestId | The request ID. A unique identifier for this request. |
| reason | The request status code from the music content center:
MUSIC_CONTENT_CENTER_STATE_REASON_OK (0): Request succeeded.
MUSIC_CONTENT_CENTER_STATE_REASON_ERROR (1): General error without specific attribution.
MUSIC_CONTENT_CENTER_STATE_REASON_GATEWAY (2): Gateway error. Possible causes include:
- The current Temporary Token has expired. Please regenerate the Temporary Token.
- The provided Temporary Token is invalid. Please ensure you are using an RTM Token.
- Network error. Please check your network connection.
MUSIC_CONTENT_CENTER_STATE_REASON_PERMISSION_AND_RESOURCE (3): Permission error or music resource not found. Please ensure your project has enabled access to the Agora Music Content Center. Contact technical support.
MUSIC_CONTENT_CENTER_STATE_REASON_INTERNAL_DATA_PARSE (4): Internal data parsing error. Contact technical support.
MUSIC_CONTENT_CENTER_STATE_REASON_MUSIC_LOADING (5): Error occurred while loading music resources. Contact technical support.
MUSIC_CONTENT_CENTER_STATE_REASON_MUSIC_DECRYPTION (6): Error occurred while decrypting music resources. Contact technical support.
MUSIC_CONTENT_CENTER_STATE_REASON_HTTP_INTERNAL (7): Internal HTTP error. Please try again later.
|
| page | The current page number, starting from 1 by default. |
| pageSize | The maximum number of music resources displayed per page, up to 50. |
| total | The total number of music resources in the list. |
| list | Detailed information about the list of music resources. See Music. |