\hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{}\doxysection{io.\+agora.\+rtc2.\+I\+Media\+Recorder\+Callback Interface Reference}
\label{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}\index{io.agora.rtc2.IMediaRecorderCallback@{io.agora.rtc2.IMediaRecorderCallback}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a10d7e4bbb53400f8fbadcb5d9485de6b}{on\+Recorder\+State\+Changed}} (String channel\+Id, int uid, int state, int reason)
\begin{DoxyCompactList}\small\item\em Callback for changes in recording state. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a9b974422fdaa7069f878ea5369aab3c3}{on\+Recorder\+Info\+Updated}} (String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_recorder_info}{Recorder\+Info}} info)
\begin{DoxyCompactList}\small\item\em Recording information update callback. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}}} interface.

\begin{DoxySince}{Since}
v4.\+0.\+0 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a10d7e4bbb53400f8fbadcb5d9485de6b}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a10d7e4bbb53400f8fbadcb5d9485de6b}} 
\index{io.agora.rtc2.IMediaRecorderCallback@{io.agora.rtc2.IMediaRecorderCallback}!onRecorderStateChanged@{onRecorderStateChanged}}
\index{onRecorderStateChanged@{onRecorderStateChanged}!io.agora.rtc2.IMediaRecorderCallback@{io.agora.rtc2.IMediaRecorderCallback}}
\doxysubsubsection{\texorpdfstring{onRecorderStateChanged()}{onRecorderStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Media\+Recorder\+Callback.\+on\+Recorder\+State\+Changed (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{uid,  }\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Callback for changes in recording state. 

The S\+DK triggers this callback when the recording state of the audio and video stream changes. It reports the current state of the recording and the reason for the change.


\begin{DoxyParams}{Parameters}
{\em channel\+Id} & Name of the channel. \\
\hline
{\em uid} & User ID. \\
\hline
{\em state} & Current recording state\+:
\begin{DoxyItemize}
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+R\+R\+OR (-\/1)\+: An error occurred during recording of the audio and video stream.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+RT (2)\+: Recording of the audio and video stream starts.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+OP (3)\+: Recording of the audio and video stream stops. 
\end{DoxyItemize}\\
\hline
{\em reason} & Reason for the recording state change\+:
\begin{DoxyItemize}
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+NE (0)\+: Everything is working normally.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+W\+R\+I\+T\+E\+\_\+\+F\+A\+I\+L\+ED (1)\+: Failed to write the recording file.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+\_\+\+S\+T\+R\+E\+AM (2)\+: No available audio and video stream to record or the stream was interrupted for more than 5 seconds.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+O\+V\+E\+R\+\_\+\+M\+A\+X\+\_\+\+D\+U\+R\+A\+T\+I\+ON (3)\+: The recording duration exceeds the maximum limit.
\item R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+O\+N\+F\+I\+G\+\_\+\+C\+H\+A\+N\+G\+ED (4)\+: The recording configuration has changed. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a9b974422fdaa7069f878ea5369aab3c3}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback_a9b974422fdaa7069f878ea5369aab3c3}} 
\index{io.agora.rtc2.IMediaRecorderCallback@{io.agora.rtc2.IMediaRecorderCallback}!onRecorderInfoUpdated@{onRecorderInfoUpdated}}
\index{onRecorderInfoUpdated@{onRecorderInfoUpdated}!io.agora.rtc2.IMediaRecorderCallback@{io.agora.rtc2.IMediaRecorderCallback}}
\doxysubsubsection{\texorpdfstring{onRecorderInfoUpdated()}{onRecorderInfoUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Media\+Recorder\+Callback.\+on\+Recorder\+Info\+Updated (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{uid,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_recorder_info}{Recorder\+Info}}}]{info }\end{DoxyParamCaption})}



Recording information update callback. 

After you successfully register this callback and start audio and video stream recording, the S\+DK periodically triggers this callback based on the value of {\ttfamily recorder\+Info\+Update\+Interval} that you set in {\ttfamily Media\+Recorder\+Configuration}, reporting the current recording file\textquotesingle{}s name, duration, and size.


\begin{DoxyParams}{Parameters}
{\em channel\+Id} & The channel name. \\
\hline
{\em uid} & The user ID. \\
\hline
{\em info} & The recording file information. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_recorder_info}{Recorder\+Info}}} for details. \\
\hline
\end{DoxyParams}
