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 state, int reason)
 
void onMusicCollectionResult (String requestId, int page, int pageSize, int total, Music[] list, int reason)
 
void onMusicChartsResult (String requestId, MusicChartInfo[] list, int reason)
 
void onLyricResult (String requestId, long songCode, String lyricUrl, int reason)
 
void onSongSimpleInfoResult (String requestId, long songCode, String simpleInfo, int reason)
 

Member Function Documentation

◆ onPreLoadEvent()

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

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
statePreload state; see PreloadState.
reasonThe status of the request. See MusicContentCenterStateReason

◆ onMusicCollectionResult()

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

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.
reasonThe status of the request.

◆ onMusicChartsResult()

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

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
reasonThe status of the request. See MusicContentCenterStateReason

◆ onLyricResult()

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

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
reasonThe status of the request. See MusicContentCenterStateReason

◆ onSongSimpleInfoResult()

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

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.
reasonThe status of the request. See MusicContentCenterStateReason