Agora RTC Objective-C API Reference  Refactor
Instance Methods
<AgoraMusicContentCenterEventDelegate> Protocol Reference

Inherits <NSObjectNSObject>.

Instance Methods

(void) - onMusicChartsResult:result:reason:
 
(void) - onMusicCollectionResult:result:reason:
 
(void) - onLyricResult:songCode:lyricUrl:reason:
 
(void) - onSongSimpleInfoResult:songCode:simpleInfo:reason:
 
(void) - onPreLoadEvent:songCode:percent:lyricUrl:state:reason:
 

Detailed Description

The request event delegate callback

Method Documentation

◆ onMusicChartsResult:result:reason:

- (void) onMusicChartsResult: (NSString *)  requestId
result: (NSArray< AgoraMusicChartInfo * > *)  result
reason: (AgoraMusicContentCenterStateReason reason 

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

Parameters
requestIdThe request id is same as that returned by getMusicCharts.
resultThe result of music chart collection
reasonThe status of the request. See MusicContentCenterStateReason

◆ onMusicCollectionResult:result:reason:

- (void) onMusicCollectionResult: (NSString *)  requestId
result: (AgoraMusicCollection *)  result
reason: (AgoraMusicContentCenterStateReason reason 

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

Parameters
requestIdThe request id is the same with that returned by getMusicCollectionByMusicChartId or searchMusic
resultThe result of music collection
reasonThe status of the request. See MusicContentCenterStateReason

◆ onLyricResult:songCode:lyricUrl:reason:

- (void) onLyricResult: (NSString *)  requestId
songCode: (NSInteger)  songCode
lyricUrl: (NSString *_Nullable)  lyricUrl
reason: (AgoraMusicContentCenterStateReason 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:songCode:simpleInfo:reason:

- (void) onSongSimpleInfoResult: (NSString *)  requestId
songCode: (NSInteger)  songCode
simpleInfo: (NSString *_Nullable)  simpleInfo
reason: (AgoraMusicContentCenterStateReason 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

◆ onPreLoadEvent:songCode:percent:lyricUrl:state:reason:

- (void) onPreLoadEvent: (NSString *)  requestId
songCode: (NSInteger)  songCode
percent: (NSInteger)  percent
lyricUrl: (NSString *_Nullable)  lyricUrl
state: (AgoraMusicContentCenterPreloadState state
reason: (AgoraMusicContentCenterStateReason reason 

Preload process callback, occurs when preload is called

Parameters
requestIdThe request id is same as that returned by preload.
songCodeSong code
percentPreload progress (0 ~ 100)
lyricUrlThe lyric url of this music
statePreload state; see PreloadState.
reasonThe status of the request. See MusicContentCenterStateReason