Agora Java API Reference for Android
|
Classes | |
class | MusicCacheStatusType |
class | MusicContentCenterStateReason |
class | PreloadState |
Public Member Functions | |
abstract int | initialize (MusicContentCenterConfiguration configuration) |
abstract int | renewToken (String token) |
abstract IAgoraMusicPlayer | createMusicPlayer () |
abstract int | destroyMusicPlayer (IAgoraMusicPlayer player) |
abstract int | registerEventHandler (IMusicContentCenterEventHandler eventHandler) |
abstract int | unregisterEventHandler () |
abstract String | preload (long songCode) |
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 () |
abstract String | getSongSimpleInfo (long songCode) |
abstract long | getInternalSongCode (long songCode, String jsonOption) |
Static Public Member Functions | |
static synchronized IAgoraMusicContentCenter | create (RtcEngine rtcEngine) |
static synchronized void | destroy () |
Protected Member Functions | |
abstract void | doDestroy () |
|
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 |
Destroy a music player source object and return result.
player | The music player. |
|
abstract |
Preload a media file with specified parameters.
songCode | The identify of the media file that you want to play. |
|
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 a cached media file.
songCode | The identifier of the media file that you want to play. |
|
abstract |
Get cached media files.
|
abstract |
Gets the metadata of a specific music. Once this method is called, the SDK triggers the onSongSimpleInfoResult callback to report the metadata of the music.
songCode | The identifier of the media file. |
|
abstract |
Create internal songCodeKey from songCode and jsonOption
songCode | The identifier of the media file. |
jsonOption | An extention parameter. The default value is null. it’s a json-format string and the key and value can be customized according to your scenarios. |