onMusicCollectionResult

Callback for retrieving the music resource list.

virtual void onMusicCollectionResult(const char* requestId, agora_refptr<MusicCollection> result, MusicContentCenterStateReason reason) = 0;

When calling getMusicCollectionByMusicChartId to retrieve the music resource list of a chart, or calling searchMusic to search for music resources, the SDK triggers this callback and returns detailed information of the music resource list.

Trigger Timing

Triggered after calling getMusicCollectionByMusicChartId or searchMusic.

Parameters

requestId
Request ID, used to identify the uniqueness of this request.
result
Detailed information of the music resource list. See MusicCollection.
reason
Request status code. See MusicContentCenterStateReason.