\hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{}\doxysection{io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center Class Reference}
\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class {\bfseries Music\+Cache\+Status\+Type}
\begin{DoxyCompactList}\small\item\em Cache status of music resources. \end{DoxyCompactList}\item 
class {\bfseries Music\+Content\+Center\+State\+Reason}
\begin{DoxyCompactList}\small\item\em Request status codes of the music content center. \end{DoxyCompactList}\item 
class {\bfseries Preload\+State}
\begin{DoxyCompactList}\small\item\em The loading state of music resources. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a1e0e0fc18a9af2ef926b63a90e4d92ae}{initialize}} (\mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_content_center_configuration}{Music\+Content\+Center\+Configuration}} configuration)
\begin{DoxyCompactList}\small\item\em Initializes {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}}. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a2406492da6c0d37305078b8302becffe}{renew\+Token}} (String token)
\begin{DoxyCompactList}\small\item\em Renews the Token. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}} \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_aa2cc22fcabb0c6c17eb3e9560f3de758}{create\+Music\+Player}} ()
\begin{DoxyCompactList}\small\item\em Creates a music player. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab2e9dd0e7daac8921f233275cf30a9ff}{destroy\+Music\+Player}} (\mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}} player)
\begin{DoxyCompactList}\small\item\em Destroys the music player object. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a325d7e7d9171259c94530f9fa996dbb5}{register\+Event\+Handler}} (\mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_music_content_center_event_handler}{I\+Music\+Content\+Center\+Event\+Handler}} event\+Handler)
\begin{DoxyCompactList}\small\item\em Registers the callback events for the music content center. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_abdaf7e58261ec1537f27a6a5f798bee0}{unregister\+Event\+Handler}} ()
\begin{DoxyCompactList}\small\item\em Unregisters the event callback for the music content center. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a60fcd2708feec7e4cd7a3f0024ec73fb}{preload}} (long song\+Code)
\begin{DoxyCompactList}\small\item\em Preloads copyright music resources. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7681c81a454bd8f5b95f6fe223ed6814}{preload}} (long song\+Code, String json\+Option)
\begin{DoxyCompactList}\small\item\em Preloads music resources. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7d996a2fb448d87d07d597d17d097e71}{is\+Preloaded}} (long song\+Code)
\begin{DoxyCompactList}\small\item\em Checks whether a music resource has been preloaded. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7946c723e44aa1cb78b9c0e1d3bde4ba}{get\+Music\+Charts}} ()
\begin{DoxyCompactList}\small\item\em Retrieves all music charts. \end{DoxyCompactList}\item 
String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}{get\+Music\+Collection\+By\+Music\+Chart\+Id}} (int music\+Chart\+Id, int page, int page\+Size)
\begin{DoxyCompactList}\small\item\em Retrieves the list of music resources from a specified music chart by its ID. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a35a693fb7d3722036216b944795612b1}{get\+Music\+Collection\+By\+Music\+Chart\+Id}} (int music\+Chart\+Id, int page, int page\+Size, String json\+Option)
\begin{DoxyCompactList}\small\item\em Retrieves the list of music resources from a specified music chart by its ID. \end{DoxyCompactList}\item 
String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}{search\+Music}} (String keyword, int page, int page\+Size)
\begin{DoxyCompactList}\small\item\em Searches for music resources. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a8eab3f451b756670474727bcace7a94c}{search\+Music}} (String keyword, int page, int page\+Size, String json\+Option)
\begin{DoxyCompactList}\small\item\em Searches for music resources. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab9c47593e85c33337f60648fe21d3f6b}{get\+Lyric}} (long song\+Code, int lyric\+Type)
\begin{DoxyCompactList}\small\item\em Retrieves the download U\+RL for the lyrics of a music resource. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ac065d0ab6c262606a112eef256ef83b0}{remove\+Cache}} (long song\+Code)
\begin{DoxyCompactList}\small\item\em Deletes a cached music resource. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_cache_info}{Music\+Cache\+Info}}\mbox{[}$\,$\mbox{]} \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3ce3141a31a2919302ec837cc48d9218}{get\+Caches}} ()
\begin{DoxyCompactList}\small\item\em Retrieves information about cached music resources. \end{DoxyCompactList}\item 
abstract String \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a6d635d618817250159da6c3ffa168528}{get\+Song\+Simple\+Info}} (long song\+Code)
\begin{DoxyCompactList}\small\item\em Retrieves detailed information about a specific music resource. \end{DoxyCompactList}\item 
abstract long \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3da413b0be7943c4d21d913805245971}{get\+Internal\+Song\+Code}} (long song\+Code, String json\+Option)
\begin{DoxyCompactList}\small\item\em Creates an internal identifier for the chorus clip of a music resource. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_aad81df2f3c1c496ac953ffd82d36cb70}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_aad81df2f3c1c496ac953ffd82d36cb70}} 
static synchronized \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}} {\bfseries create} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_rtc_engine}{Rtc\+Engine}} rtc\+Engine)
\item 
static synchronized void \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}{destroy}} ()
\begin{DoxyCompactList}\small\item\em Destroys the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}} instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ac1f94c5e3adb1937873be7934422d730}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ac1f94c5e3adb1937873be7934422d730}} 
abstract void {\bfseries do\+Destroy} ()
\end{DoxyCompactItemize}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!destroy@{destroy}}
\index{destroy@{destroy}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{destroy()}{destroy()}}
{\footnotesize\ttfamily static synchronized void io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+destroy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Destroys the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}} instance. 

You must call this method before calling the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}{destroy()}}} method of {\ttfamily Rtc\+Engine}. \mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a1e0e0fc18a9af2ef926b63a90e4d92ae}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a1e0e0fc18a9af2ef926b63a90e4d92ae}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!initialize@{initialize}}
\index{initialize@{initialize}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{initialize()}{initialize()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+initialize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_content_center_configuration}{Music\+Content\+Center\+Configuration}}}]{configuration }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Initializes {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}}. 

You must call this method to initialize {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}} before calling any other methods in the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}} class.


\begin{DoxyParams}{Parameters}
{\em configuration} & The settings for {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center}{I\+Agora\+Music\+Content\+Center}}}. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_content_center_configuration}{Music\+Content\+Center\+Configuration}}} for details.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails. See {\ttfamily Error Codes} for details and troubleshooting suggestions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a2406492da6c0d37305078b8302becffe}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a2406492da6c0d37305078b8302becffe}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!renewToken@{renewToken}}
\index{renewToken@{renewToken}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{renewToken()}{renewToken()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+renew\+Token (\begin{DoxyParamCaption}\item[{String}]{token }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Renews the Token. 

When the Token used for authentication is about to expire or has already expired, you can call this method to pass in a newly generated Token.


\begin{DoxyParams}{Parameters}
{\em token} & The new Token.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Method call succeeds.
\item $<$ 0\+: Method call fails. See {\ttfamily Error Codes} for details and troubleshooting suggestions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_aa2cc22fcabb0c6c17eb3e9560f3de758}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_aa2cc22fcabb0c6c17eb3e9560f3de758}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!createMusicPlayer@{createMusicPlayer}}
\index{createMusicPlayer@{createMusicPlayer}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{createMusicPlayer()}{createMusicPlayer()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}} io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+create\+Music\+Player (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Creates a music player. 

If you need to play music resources from the music content center, you must call this method first to create a music player.

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item If the method call succeeds\+: returns an {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}}} object.
\item If the method call fails\+: returns a null pointer. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab2e9dd0e7daac8921f233275cf30a9ff}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab2e9dd0e7daac8921f233275cf30a9ff}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!destroyMusicPlayer@{destroyMusicPlayer}}
\index{destroyMusicPlayer@{destroyMusicPlayer}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{destroyMusicPlayer()}{destroyMusicPlayer()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+destroy\+Music\+Player (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}}}]{player }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Destroys the music player object. 

When you no longer need to use the music player, you can call this method to destroy the music player object. If you need to use the music player again after destruction, you must call {\ttfamily create\+Music\+Player} to recreate a music player object. Call timing\+: You can call this method either before or after joining a channel, but make sure to call it before the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}{destroy()}}} method of {\ttfamily Rtc\+Engine}.


\begin{DoxyParams}{Parameters}
{\em player} & The {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_player}{I\+Agora\+Music\+Player}}} object.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails. See {\ttfamily Error Codes} for details and troubleshooting tips. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a325d7e7d9171259c94530f9fa996dbb5}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a325d7e7d9171259c94530f9fa996dbb5}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!registerEventHandler@{registerEventHandler}}
\index{registerEventHandler@{registerEventHandler}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{registerEventHandler()}{registerEventHandler()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+register\+Event\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_music_content_center_event_handler}{I\+Music\+Content\+Center\+Event\+Handler}}}]{event\+Handler }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Registers the callback events for the music content center. 


\begin{DoxyParams}{Parameters}
{\em event\+Handler} & The callback events to be registered. See {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1musiccontentcenter_1_1_i_music_content_center_event_handler}{I\+Music\+Content\+Center\+Event\+Handler}}} for details.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails. See {\ttfamily Error Codes} for details and troubleshooting suggestions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_abdaf7e58261ec1537f27a6a5f798bee0}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_abdaf7e58261ec1537f27a6a5f798bee0}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!unregisterEventHandler@{unregisterEventHandler}}
\index{unregisterEventHandler@{unregisterEventHandler}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{unregisterEventHandler()}{unregisterEventHandler()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+unregister\+Event\+Handler (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Unregisters the event callback for the music content center. 

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails. See {\ttfamily Error Codes} for details and suggested solutions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a60fcd2708feec7e4cd7a3f0024ec73fb}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a60fcd2708feec7e4cd7a3f0024ec73fb}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!preload@{preload}}
\index{preload@{preload}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{preload()}{preload()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+preload (\begin{DoxyParamCaption}\item[{long}]{song\+Code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Preloads copyright music resources. 

You can call this method to preload the copyright music resources you want to play. After the method is successfully called, the S\+DK triggers the {\ttfamily on\+Pre\+Load\+Event} callback to report the event of preloading the copyright music resource. Before calling this method to preload copyright music resources, you need to call {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}{get\+Music\+Collection\+By\+Music\+Chart\+Id(int music\+Chart\+Id, int page, int page\+Size)}}} or {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}{search\+Music(\+String keyword, int page, int page\+Size)}}} to obtain the copyright music resources you want to play, and retrieve the music resource identifier ({\ttfamily song\+Code}) through the {\ttfamily on\+Music\+Collection\+Result} callback triggered by these methods.

\begin{DoxyNote}{Note}
To destroy the {\ttfamily Rtc\+Engine} object, make sure to call the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}{destroy()}}} method only after receiving the {\ttfamily on\+Pre\+Load\+Event} callback.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the copyright music resource.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id}, which is the unique identifier for this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7681c81a454bd8f5b95f6fe223ed6814}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7681c81a454bd8f5b95f6fe223ed6814}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!preload@{preload}}
\index{preload@{preload}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{preload()}{preload()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+preload (\begin{DoxyParamCaption}\item[{long}]{song\+Code,  }\item[{String}]{json\+Option }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Preloads music resources. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000009}{Deprecated}}]use \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a60fcd2708feec7e4cd7a3f0024ec73fb}{preload(long song\+Code)}} instead.\end{DoxyRefDesc}


You can call this method to preload the music resources you want to play. After this method is successfully called, the S\+DK triggers the {\ttfamily on\+Pre\+Load\+Event} callback to report the preload event. Before calling this method to preload music resources, you need to call {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}{get\+Music\+Collection\+By\+Music\+Chart\+Id(int music\+Chart\+Id, int page, int page\+Size)}}} or {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}{search\+Music(\+String keyword, int page, int page\+Size)}}} to retrieve the music resources you want to play, and obtain the resource identifier ({\ttfamily song\+Code}) from the {\ttfamily on\+Music\+Collection\+Result} callback triggered by those methods.

\begin{DoxyNote}{Note}
To destroy the {\ttfamily Rtc\+Engine} object, make sure to call the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a98732619b0f23959b93cc540f49aa4b4}{destroy()}}} method after receiving the {\ttfamily on\+Pre\+Load\+Event} callback.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource. \\
\hline
{\em json\+Option} & Extended J\+S\+ON field. Agora charges based on the application scenario you set in the {\ttfamily scene\+Type} field. Different scenarios are billed at different rates. Refer to the billing documentation for details.
\begin{DoxyItemize}
\item 1\+: Live streaming scenario\+: Karaoke and background music playback.
\item 2\+: Live streaming scenario\+: Background music playback.
\item 3\+: (Default) Voice chat scenario\+: Karaoke.
\item 4\+: Voice chat scenario\+: Background music playback.
\item 5\+: VR scenario\+: Karaoke and background music playback. If you need to switch to a different scenario, you must call this method again and pass the new {\ttfamily scene\+Type} value in this field. Example\+: {\ttfamily \{\char`\"{}scene\+Type\char`\"{}\+:1\}}
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails. See {\ttfamily Error Codes} for details and troubleshooting. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7d996a2fb448d87d07d597d17d097e71}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7d996a2fb448d87d07d597d17d097e71}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!isPreloaded@{isPreloaded}}
\index{isPreloaded@{isPreloaded}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{isPreloaded()}{isPreloaded()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+is\+Preloaded (\begin{DoxyParamCaption}\item[{long}]{song\+Code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Checks whether a music resource has been preloaded. 

This method is a synchronous call. To preload a new music resource, you can call {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a60fcd2708feec7e4cd7a3f0024ec73fb}{preload(long song\+Code)}}}.


\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource, used to specify a music resource.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call is successful, and the music resource has been preloaded.
\item $<$ 0\+: The method call fails. Refer to {\ttfamily Error Codes} for details and suggested solutions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7946c723e44aa1cb78b9c0e1d3bde4ba}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a7946c723e44aa1cb78b9c0e1d3bde4ba}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getMusicCharts@{getMusicCharts}}
\index{getMusicCharts@{getMusicCharts}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getMusicCharts()}{getMusicCharts()}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Music\+Charts (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves all music charts. 

When you call this method, the S\+DK triggers the {\ttfamily on\+Music\+Charts\+Result} callback to report detailed information about the music charts.

\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id}, which is the unique identifier for this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getMusicCollectionByMusicChartId@{getMusicCollectionByMusicChartId}}
\index{getMusicCollectionByMusicChartId@{getMusicCollectionByMusicChartId}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getMusicCollectionByMusicChartId()}{getMusicCollectionByMusicChartId()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Music\+Collection\+By\+Music\+Chart\+Id (\begin{DoxyParamCaption}\item[{int}]{music\+Chart\+Id,  }\item[{int}]{page,  }\item[{int}]{page\+Size }\end{DoxyParamCaption})}



Retrieves the list of music resources from a specified music chart by its ID. 

After a successful call to this method, the S\+DK triggers the {\ttfamily on\+Music\+Collection\+Result} callback to report detailed information about the music resources in the chart.


\begin{DoxyParams}{Parameters}
{\em music\+Chart\+Id} & The ID of the music chart, which you can obtain through the {\ttfamily on\+Music\+Charts\+Result} callback. You can also use the R\+E\+S\+Tful A\+PI to {\ttfamily get the full song list from the music library} or {\ttfamily get the incremental song list}. \\
\hline
{\em page} & The current page number, starting from 1 by default. \\
\hline
{\em page\+Size} & The total number of pages in the current list of music resources. The maximum value is 50.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id}, which uniquely identifies this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a35a693fb7d3722036216b944795612b1}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a35a693fb7d3722036216b944795612b1}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getMusicCollectionByMusicChartId@{getMusicCollectionByMusicChartId}}
\index{getMusicCollectionByMusicChartId@{getMusicCollectionByMusicChartId}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getMusicCollectionByMusicChartId()}{getMusicCollectionByMusicChartId()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Music\+Collection\+By\+Music\+Chart\+Id (\begin{DoxyParamCaption}\item[{int}]{music\+Chart\+Id,  }\item[{int}]{page,  }\item[{int}]{page\+Size,  }\item[{String}]{json\+Option }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves the list of music resources from a specified music chart by its ID. 

After a successful call to this method, the S\+DK triggers the {\ttfamily on\+Music\+Collection\+Result} callback to report detailed information about the music resources in the chart.


\begin{DoxyParams}{Parameters}
{\em music\+Chart\+Id} & The ID of the music chart, which you can obtain via the {\ttfamily on\+Music\+Charts\+Result} callback. You can also use the R\+E\+S\+Tful A\+PI to {\ttfamily get the full music library list} or {\ttfamily get the incremental music list}. \\
\hline
{\em page} & The current page number, starting from 1 by default. \\
\hline
{\em page\+Size} & The total number of pages for the music resource list. The maximum value is 50. \\
\hline
{\em json\+Option} & An optional J\+S\+ON extension field, default is N\+U\+LL. You can use this field to filter the music resources you need. Currently, it supports filtering for scorable music resources and chorus segments of music resources\+: {\begin{tabularx}{\linewidth}{|*{3}{>{\raggedright\arraybackslash}X|}}\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Key }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Example  }\\\cline{1-3}
pitch\+Type &Whether the music resource supports scoring\+: -\/ 1\+: Scorable music resources. -\/ 2\+: Non-\/scorable music resources. &\{\char`\"{}pitch\+Type\char`\"{}\+:1\}  \\\cline{1-3}
need\+High\+Part &Whether the chorus segment resource is needed\+: -\/ {\ttfamily true}\+: Chorus segment required. -\/ {\ttfamily false}\+: Chorus segment not required. &\{\char`\"{}need\+High\+Part\char`\"{}\+:true\}  \\\cline{1-3}
\end{tabularx}}
\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id}, which is the unique identifier for this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!searchMusic@{searchMusic}}
\index{searchMusic@{searchMusic}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{searchMusic()}{searchMusic()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+search\+Music (\begin{DoxyParamCaption}\item[{String}]{keyword,  }\item[{int}]{page,  }\item[{int}]{page\+Size }\end{DoxyParamCaption})}



Searches for music resources. 

After this method is successfully called, the S\+DK triggers the {\ttfamily on\+Music\+Collection\+Result} callback to report the retrieved list of music resources.


\begin{DoxyParams}{Parameters}
{\em keyword} & The search keyword. Supports searching by song title or artist name. \\
\hline
{\em page} & The target page number of the music resource list you want to retrieve. \\
\hline
{\em page\+Size} & The maximum number of music resources displayed per page. The maximum value is 50.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id} that uniquely identifies this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a8eab3f451b756670474727bcace7a94c}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a8eab3f451b756670474727bcace7a94c}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!searchMusic@{searchMusic}}
\index{searchMusic@{searchMusic}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{searchMusic()}{searchMusic()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+search\+Music (\begin{DoxyParamCaption}\item[{String}]{keyword,  }\item[{int}]{page,  }\item[{int}]{page\+Size,  }\item[{String}]{json\+Option }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Searches for music resources. 

After this method is successfully called, the S\+DK triggers the {\ttfamily on\+Music\+Collection\+Result} callback to report the retrieved list of music resources.


\begin{DoxyParams}{Parameters}
{\em keyword} & The search keyword. Supports searching by song title or artist name. \\
\hline
{\em page} & The target page number of the music resource list you want to retrieve. \\
\hline
{\em page\+Size} & The maximum number of music resources displayed per page. The maximum value is 50. \\
\hline
{\em json\+Option} & An optional J\+S\+ON extension field. Defaults to N\+U\+LL. You can use this field to filter the music resources you need. Currently supports filtering by whether the music resource supports scoring and whether it includes a chorus segment\+: {\begin{tabularx}{\linewidth}{|*{3}{>{\raggedright\arraybackslash}X|}}\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Key }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Example  }\\\cline{1-3}
pitch\+Type &Whether scoring is supported\+: -\/ 1\+: \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music}{Music}} resources that support scoring. -\/ 2\+: Those that do not. &\{\char`\"{}pitch\+Type\char`\"{}\+:1\}  \\\cline{1-3}
need\+High\+Part &Whether a chorus segment is needed\+: -\/ {\ttfamily true}\+: Chorus segment is required. -\/ {\ttfamily false}\+: Not required. &\{\char`\"{}need\+High\+Part\char`\"{}\+:true\}  \\\cline{1-3}
\end{tabularx}}
\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id} that uniquely identifies this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab9c47593e85c33337f60648fe21d3f6b}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ab9c47593e85c33337f60648fe21d3f6b}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getLyric@{getLyric}}
\index{getLyric@{getLyric}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getLyric()}{getLyric()}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Lyric (\begin{DoxyParamCaption}\item[{long}]{song\+Code,  }\item[{int}]{lyric\+Type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves the download U\+RL for the lyrics of a music resource. 

After this method is successfully called, the S\+DK triggers the {\ttfamily on\+Lyric\+Result} callback to report the download U\+RL of the lyrics.


\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource used to specify the music. \\
\hline
{\em lyric\+Type} & The type of lyrics\+:
\begin{DoxyItemize}
\item 0\+: xml format.
\item 1\+: lrc format.
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id} that uniquely identifies this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ac065d0ab6c262606a112eef256ef83b0}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_ac065d0ab6c262606a112eef256ef83b0}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!removeCache@{removeCache}}
\index{removeCache@{removeCache}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{removeCache()}{removeCache()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+remove\+Cache (\begin{DoxyParamCaption}\item[{long}]{song\+Code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Deletes a cached music resource. 

You can call this method to delete a cached music resource. To delete multiple music resources, you can call this method multiple times.

\begin{DoxyNote}{Note}
This method does not delete cached music resources that are currently playing.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource to be deleted.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds and the music resource is deleted.
\item $<$ 0\+: The method call fails. Refer to {\ttfamily Error Codes} for details and troubleshooting suggestions. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3ce3141a31a2919302ec837cc48d9218}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3ce3141a31a2919302ec837cc48d9218}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getCaches@{getCaches}}
\index{getCaches@{getCaches}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getCaches()}{getCaches()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_cache_info}{Music\+Cache\+Info}} \mbox{[}$\,$\mbox{]} io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Caches (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves information about cached music resources. 

Before calling this method, you need to pre-\/allocate a certain amount of memory to store information about the cached music resources. If you need to set the number of music resources that can be cached, you can configure it through the {\ttfamily configuration} parameter of {\ttfamily initialize}. When you no longer need the cached music resources, you should release the memory in a timely manner to avoid memory leaks.

\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item If the method call succeeds, returns an array containing {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_music_cache_info}{Music\+Cache\+Info}}} objects.
\item If the method call fails, returns N\+U\+LL. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a6d635d618817250159da6c3ffa168528}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a6d635d618817250159da6c3ffa168528}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getSongSimpleInfo@{getSongSimpleInfo}}
\index{getSongSimpleInfo@{getSongSimpleInfo}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getSongSimpleInfo()}{getSongSimpleInfo()}}
{\footnotesize\ttfamily abstract String io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Song\+Simple\+Info (\begin{DoxyParamCaption}\item[{long}]{song\+Code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves detailed information about a specific music resource. 

Before calling this method, you need to obtain the identifier of the corresponding music resource. You can do this by calling the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}{get\+Music\+Collection\+By\+Music\+Chart\+Id(int music\+Chart\+Id, int page, int page\+Size)}}} or {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}{search\+Music(\+String keyword, int page, int page\+Size)}}} method to retrieve music resources, and obtain the music resource identifier ({\ttfamily song\+Code}) through the triggered {\ttfamily on\+Music\+Collection\+Result} callback. After you call this method, the S\+DK triggers the {\ttfamily on\+Song\+Simple\+Info\+Result} callback to report the detailed information of the music resource.


\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource, used to specify the music resource.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A {\ttfamily request\+Id} that uniquely identifies this request. 
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3da413b0be7943c4d21d913805245971}\label{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a3da413b0be7943c4d21d913805245971}} 
\index{io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}!getInternalSongCode@{getInternalSongCode}}
\index{getInternalSongCode@{getInternalSongCode}!io.agora.musiccontentcenter.IAgoraMusicContentCenter@{io.agora.musiccontentcenter.IAgoraMusicContentCenter}}
\doxysubsubsection{\texorpdfstring{getInternalSongCode()}{getInternalSongCode()}}
{\footnotesize\ttfamily abstract long io.\+agora.\+musiccontentcenter.\+I\+Agora\+Music\+Content\+Center.\+get\+Internal\+Song\+Code (\begin{DoxyParamCaption}\item[{long}]{song\+Code,  }\item[{String}]{json\+Option }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Creates an internal identifier for the chorus clip of a music resource. 

Applicable scenarios\+: Before you play the chorus clip of a music resource, you need to call this method to create an internal identifier for the chorus clip using the {\ttfamily json\+Option} parameter and the {\ttfamily song\+Code} of the music resource. This identifier serves as the unique reference for the resource. Once you get this identifier, you need to pass it as the {\ttfamily song\+Code} parameter when calling related methods to open, preload, or remove the resource.


\begin{DoxyParams}{Parameters}
{\em song\+Code} & The identifier of the music resource. You can obtain this by calling {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_a696ed7ee269dd417fdbba6a6b946b7b7}{get\+Music\+Collection\+By\+Music\+Chart\+Id(int music\+Chart\+Id, int page, int page\+Size)}}} or {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1musiccontentcenter_1_1_i_agora_music_content_center_afd68aa8f17f2b921174f77e4773d0a88}{search\+Music(\+String keyword, int page, int page\+Size)}}}, and retrieve the {\ttfamily song\+Code} from the {\ttfamily on\+Music\+Collection\+Result} callback triggered by these methods. \\
\hline
{\em json\+Option} & Extended J\+S\+ON field, defaults to N\+U\+LL. Currently supports the following values\+: {\begin{tabularx}{\linewidth}{|*{3}{>{\raggedright\arraybackslash}X|}}\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Key }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Example  }\\\cline{1-3}
scene\+Type &Channel profile\+: -\/ 1\+: Live streaming scenario\+: karaoke and background music playback. -\/ 2\+: Live streaming scenario\+: background music playback. -\/ 3\+: (Default) Voice chat scenario\+: karaoke. -\/ 4\+: Voice chat scenario\+: background music playback. -\/ 5\+: VR scenario\+: karaoke and background music playback. Note\+: Agora charges based on the {\ttfamily scene\+Type} you provide. Different channel profiles have different pricing rates. Refer to the billing documentation for details. To switch to a different channel profile, you must call this method again with a new {\ttfamily scene\+Type} value. &\{\char`\"{}scene\+Type\char`\"{}\+:1\}  \\\cline{1-3}
high\+Part &Index of the chorus clip. You can obtain the index from the {\ttfamily on\+Music\+Collection\+Result} callback. The index starts from 0. &\{\char`\"{}format\char`\"{}\+: \{\char`\"{}highpart\char`\"{}\+: 0\}\}  \\\cline{1-3}
\end{tabularx}}
\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item If the method call succeeds, returns the created internal identifier of the music resource.
\item $<$ 0\+: The method call fails. Refer to {\ttfamily Error Codes} for details and troubleshooting advice. 
\end{DoxyItemize}
\end{DoxyReturn}
