Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.musiccontentcenter.IMusicContentCenterEventHandler Interface Reference

Public Member Functions

void onPreLoadEvent (String requestId, long songCode, int percent, String lyricUrl, int status, int errorCode)
 
void onMusicCollectionResult (String requestId, int page, int pageSize, int total, Music[] list, int errorCode)
 
void onMusicChartsResult (String requestId, MusicChartInfo[] list, int errorCode)
 
void onLyricResult (String requestId, long songCode, String lyricUrl, int errorCode)
 
void onSongSimpleInfoResult (String requestId, long songCode, String simpleInfo, int errorCode)
 

Member Function Documentation

◆ onPreLoadEvent()

void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onPreLoadEvent ( String  requestId,
long  songCode,
int  percent,
String  lyricUrl,
int  status,
int  errorCode 
)

Preload process callback, occurs when preload is called

Parameters
requestIdThe request id is same as that returned by onPreLoadEvent.
songCodeSong code
percentPreload progress (0 ~ 100)
lyricUrlThe lyric url of this music
statusPreload status; see PreloadStatusCode.
errorCodeThe status of the request. See MusicContentCenterStatusCode

◆ onMusicCollectionResult()

void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onMusicCollectionResult ( String  requestId,
int  page,
int  pageSize,
int  total,
Music[]  list,
int  errorCode 
)

Music collection, occurs when getMusicCollectionByMusicChartId or searchMusic method is called.

Parameters
requestIdThe request id is same as that returned by getMusicCollectionByMusicChartId or searchMusic
pageThe page of the music chart, starting from 1
pageSizeThe page size, max is 50.
totalThe total size.
listThe result of music collection.
errorCodeThe status of the request.

◆ onMusicChartsResult()

void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onMusicChartsResult ( String  requestId,
MusicChartInfo[]  list,
int  errorCode 
)

The music chart result callback; occurs when getMusicCharts method is called.

Parameters
requestIdThe request id is same as that returned by getMusicCharts.
listThe result of music chart collection
errorCodeThe status of the request. See MusicContentCenterStatusCode

◆ onLyricResult()

void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onLyricResult ( String  requestId,
long  songCode,
String  lyricUrl,
int  errorCode 
)

Lyric url callback of getLyric, occurs when getLyric is called

Parameters
requestIdThe request id is same as that returned by getLyric
songCodeSong code
lyricUrlThe lyric url of this music
errorCodeThe status of the request. See MusicContentCenterStatusCode

◆ onSongSimpleInfoResult()

void io.agora.musiccontentcenter.IMusicContentCenterEventHandler.onSongSimpleInfoResult ( String  requestId,
long  songCode,
String  simpleInfo,
int  errorCode 
)

Simple info callback of getSongSimpleInfo, occurs when getSongSimpleInfo is called

Parameters
requestIdThe request id is same as that returned by getSongSimpleInfo.
songCodeSong code
simpleInfoThe metadata of the music.
errorCodeThe status of the request. See MusicContentCenterStatusCode