Agora Java API Reference for Android
|
Classes | |
class | MusicCacheStatusType |
class | MusicContentCenterStatusCode |
class | PreloadStatusCode |
Public Member Functions | |
abstract int | initialize (MusicContentCenterConfiguration configuration) |
abstract int | renewToken (String token) |
abstract IAgoraMusicPlayer | createMusicPlayer () |
abstract int | registerEventHandler (IMusicContentCenterEventHandler eventHandler) |
abstract int | unregisterEventHandler () |
abstract int | preload (long songCode, String jsonOption) |
abstract int | isPreloaded (long songCode) |
abstract String | getMusicCharts () |
String | getMusicCollectionByMusicChartId (int musicChartId, int page, int pageSize) |
abstract String | getMusicCollectionByMusicChartId (int musicChartId, int page, int pageSize, String jsonOption) |
String | searchMusic (String keyword, int page, int pageSize) |
abstract String | searchMusic (String keyword, int page, int pageSize, String jsonOption) |
abstract String | getLyric (long songCode, int lyricType) |
abstract int | removeCache (long songCode) |
abstract MusicCacheInfo[] | getCaches () |
Static Public Member Functions | |
static synchronized IAgoraMusicContentCenter | create (RtcEngine rtcEngine) |
static synchronized void | destroy () |
Protected Member Functions | |
abstract void | release () |
|
abstract |
set coryright music token and other param
configuration |
|
abstract |
Renew token of music content center
token | The new token. |
|
abstract |
Creates a music player source object and return its pointer.
|
abstract |
preload a media file with specified parameters.
songCode | The identify of the media file that you want to play. |
jsonOption | The ext param, default is null. |
|
abstract |
check if the media file is preloaded
songCode | The identify of the media file that you want to play. |
|
abstract |
Get music chart list of music.
String io.agora.musiccontentcenter.IAgoraMusicContentCenter.getMusicCollectionByMusicChartId | ( | int | musicChartId, |
int | page, | ||
int | pageSize | ||
) |
Get song list of the music chart by musicChartId and page info.
musicChartId | The musicChartId id from getMusicCharts. |
page | The page, start from 1. |
pageSize | The page size, max is 50. |
|
abstract |
Get song list of the music chart by musicChartId and page info.
musicChartId | The musicChartId id from getMusicCharts. |
page | The page, start from 1. |
pageSize | The page size, max is 50. |
jsonOption | The ext param, default is null. |
String io.agora.musiccontentcenter.IAgoraMusicContentCenter.searchMusic | ( | String | keyword, |
int | page, | ||
int | pageSize | ||
) |
Get hot song list by musicChartId and page info.
keyword | The key word to search. |
page | The page, start from 1. |
pageSize | The page size, max is 50. |
|
abstract |
Get hot song list by musicChartId and page info.
keyword | The key word to search. |
page | The page, start from 1. |
pageSize | The page size, max is 50. |
jsonOption | The ext param, default is null. |
|
abstract |
get lyric of the song.
songCode | The identifier of the media file that you want to play. |
lyricType | The type of the lyric file. may be 0:xml or 1:lrc. |
|
abstract |
remove song cache.
songCode | The identifier of the media file that you want to play. |
|
abstract |
Get media cache files.