\hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder}{}\doxysection{io.\+agora.\+rtc2.\+Agora\+Media\+Recorder Class Reference}
\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder}\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_1_1_media_recorder_configuration}{Media\+Recorder\+Configuration}}
\begin{DoxyCompactList}\small\item\em Audio and video stream recording configuration. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_abe8ad8beb7bf716425ad2e5756e3089b}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_abe8ad8beb7bf716425ad2e5756e3089b}} 
{\bfseries Agora\+Media\+Recorder} (Rtc\+Engine\+Impl engine, @Non\+Null \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_recorder_stream_info}{Recorder\+Stream\+Info}} info)
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a795afd7a60325db7529d57f6f576d335}{set\+Media\+Recorder\+Observer}} (\mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}} callback)
\begin{DoxyCompactList}\small\item\em Registers an {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}}} observer. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6221b193ca349b3aff86edc74d3d95fb}{start\+Recording}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_1_1_media_recorder_configuration}{Media\+Recorder\+Configuration}} config)
\begin{DoxyCompactList}\small\item\em Starts recording audio and video streams. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a38cde6f8194e3f11fdd712fdafd135be}{stop\+Recording}} ()
\begin{DoxyCompactList}\small\item\em Stops recording audio and video streams. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_ad7b71b7649160495862b1beae411849c}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_ad7b71b7649160495862b1beae411849c}} 
void {\bfseries release} ()
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a524b8cce6a2bac13c7809453ddc617a3}{R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+R\+R\+OR}} = -\/1
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a61096e0fc90ea7e6a0d4d143aace4bf7}{R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+RT}} = 2
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a98f1706d1ea6b60f7c03dd65ea9aa00b}{R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+OP}} = 3
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a2dc02a01e9354f0ddba0060f9992857d}{R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+NE}} = 0
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a7d1e7ebafe354564c9e20d5889ced244}{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
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_adbae8c37f71b76359e8b476834cceb01}{R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+\_\+\+S\+T\+R\+E\+AM}} = 2
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1859b16ef17fec5815eb982e3fd57b04}{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
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a67f8644df0d507ddb287e3878cecc73e}{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
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6e110d62525ac8b01f9a01fe2eebb752}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+U\+D\+IO}} = 0x1
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1a30361aec61fc3070d1df58238dbd7f}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+I\+D\+EO}} = 0x2
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_af0a185b86df6eb4d3111b87604ccc1f1}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+O\+TH}} = \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6e110d62525ac8b01f9a01fe2eebb752}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+U\+D\+IO}} $\vert$ \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1a30361aec61fc3070d1df58238dbd7f}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+I\+D\+EO}}
\item 
static final int \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_aac18d6e91cc7be6acc3ddd8d4eb026f9}{C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+M\+P4}} = 1
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder}{Agora\+Media\+Recorder}}} class, for recording the audio and video on the client. {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder}{Agora\+Media\+Recorder}}} can record the following content\+:
\begin{DoxyItemize}
\item The audio captured by the local microphone and encoded in A\+AC format by the S\+DK.
\item The video captured by the local camera and encoded by the S\+DK.
\end{DoxyItemize}

\begin{DoxySince}{Since}
v3.\+5.\+2
\end{DoxySince}
\begin{DoxyNote}{Note}
In the {\ttfamily C\+O\+M\+M\+U\+N\+I\+C\+A\+T\+I\+ON} channel profile, this function is unavailable when there are users using versions of the S\+DK earlier than v3.\+0.\+0 in the channel. 
\end{DoxyNote}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a795afd7a60325db7529d57f6f576d335}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a795afd7a60325db7529d57f6f576d335}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!setMediaRecorderObserver@{setMediaRecorderObserver}}
\index{setMediaRecorderObserver@{setMediaRecorderObserver}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{setMediaRecorderObserver()}{setMediaRecorderObserver()}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+set\+Media\+Recorder\+Observer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}}}]{callback }\end{DoxyParamCaption})}



Registers an {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}}} observer. 

\begin{DoxySince}{Since}
v4.\+0.\+0
\end{DoxySince}
This method sets the callback for audio and video recording, so that the app can be notified of the recording status and information of the audio and video streams during the recording process. Before calling this method, make sure that\+:
\begin{DoxyItemize}
\item The {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_rtc_engine}{Rtc\+Engine}}} object has been created and initialized.
\item The audio and video recording object has been created via {\ttfamily create\+Media\+Recorder}.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em callback} & The callback for audio and video stream recording. See {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_media_recorder_callback}{I\+Media\+Recorder\+Callback}}} 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_1rtc2_1_1_agora_media_recorder_a6221b193ca349b3aff86edc74d3d95fb}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6221b193ca349b3aff86edc74d3d95fb}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!startRecording@{startRecording}}
\index{startRecording@{startRecording}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{startRecording()}{startRecording()}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+start\+Recording (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_1_1_media_recorder_configuration}{Media\+Recorder\+Configuration}}}]{config }\end{DoxyParamCaption})}



Starts recording audio and video streams. 

This method starts recording audio and video streams. The Agora S\+DK supports recording both local and remote users\textquotesingle{} audio and video streams simultaneously. Before starting the recording, make sure that\+:
\begin{DoxyItemize}
\item You have created a media recorder object using {\ttfamily create\+Media\+Recorder}.
\item You have registered a media recorder observer using {\ttfamily set\+Media\+Recorder\+Observer} to listen for recording-\/related callbacks.
\item You have joined a channel.
\end{DoxyItemize}

This method supports recording the following data\+:
\begin{DoxyItemize}
\item Audio captured by the microphone in A\+AC format.
\item Video captured by the camera in H.\+264 or H.\+265 format.
\end{DoxyItemize}

After recording starts, if the video resolution changes during the recording process, the S\+DK stops the recording. If the audio sample rate or number of channels changes, the S\+DK continues recording and generates a single M\+P4 file. A recording file is successfully generated only when recordable audio or video streams are detected. If no recordable stream is available, or if the audio or video stream is interrupted for more than 5 seconds during recording, the S\+DK stops the recording and triggers the {\ttfamily on\+Recorder\+State\+Changed} ({\ttfamily R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+R\+R\+OR, R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+\_\+\+S\+T\+R\+E\+AM}) callback.

\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item If you want to record the local audio and video streams, make sure the local user role is set to broadcaster before starting the recording.
\item If you want to record remote users\textquotesingle{} audio and video streams, make sure you have subscribed to the remote users\textquotesingle{} audio and video streams before starting the recording.
\end{DoxyItemize}
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em config} & The configuration for audio and video stream recording. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_1_1_media_recorder_configuration}{Media\+Recorder\+Configuration}}}.\\
\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.
\begin{DoxyItemize}
\item -\/2\+: Invalid parameter. Make sure that\+:
\begin{DoxyItemize}
\item The specified file path for saving the recording is correct and writable.
\item The specified recording file format is correct.
\item The maximum recording duration is set correctly.
\end{DoxyItemize}
\item -\/4\+: The current state of {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_rtc_engine}{Rtc\+Engine}}} does not support this operation. This may occur if recording is already in progress or if it stopped due to an error.
\item -\/7\+: The method is called before {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_rtc_engine}{Rtc\+Engine}}} is initialized. Make sure you have created the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder}{Agora\+Media\+Recorder}}} object before calling this method. 
\end{DoxyItemize}
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a38cde6f8194e3f11fdd712fdafd135be}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a38cde6f8194e3f11fdd712fdafd135be}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!stopRecording@{stopRecording}}
\index{stopRecording@{stopRecording}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{stopRecording()}{stopRecording()}}
{\footnotesize\ttfamily int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+stop\+Recording (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Stops recording audio and video streams. 

\begin{DoxyNote}{Note}
After calling {\ttfamily start\+Recording}, if you want to stop the recording, you must call this method; otherwise, the generated recording file may not play properly.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: The method call succeeds.
\item $<$ 0\+: The method call fails\+:
\begin{DoxyItemize}
\item -\/7\+: The method is called before the {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_rtc_engine}{Rtc\+Engine}}} is initialized. Make sure that the {\ttfamily Recorder} object has been created before calling this method. 
\end{DoxyItemize}
\end{DoxyItemize}
\end{DoxyReturn}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a524b8cce6a2bac13c7809453ddc617a3}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a524b8cce6a2bac13c7809453ddc617a3}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_STATE\_ERROR@{RECORDER\_STATE\_ERROR}}
\index{RECORDER\_STATE\_ERROR@{RECORDER\_STATE\_ERROR}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_STATE\_ERROR}{RECORDER\_STATE\_ERROR}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+R\+R\+OR = -\/1\hspace{0.3cm}{\ttfamily [static]}}

-\/1\+: An error occurs during the recording. See {\ttfamily error} message for the reason. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a61096e0fc90ea7e6a0d4d143aace4bf7}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a61096e0fc90ea7e6a0d4d143aace4bf7}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_STATE\_START@{RECORDER\_STATE\_START}}
\index{RECORDER\_STATE\_START@{RECORDER\_STATE\_START}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_STATE\_START}{RECORDER\_STATE\_START}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+RT = 2\hspace{0.3cm}{\ttfamily [static]}}

2\+: The audio and video recording is started. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a98f1706d1ea6b60f7c03dd65ea9aa00b}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a98f1706d1ea6b60f7c03dd65ea9aa00b}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_STATE\_STOP@{RECORDER\_STATE\_STOP}}
\index{RECORDER\_STATE\_STOP@{RECORDER\_STATE\_STOP}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_STATE\_STOP}{RECORDER\_STATE\_STOP}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+OP = 3\hspace{0.3cm}{\ttfamily [static]}}

3\+: The audio and video recording is stopped. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a2dc02a01e9354f0ddba0060f9992857d}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a2dc02a01e9354f0ddba0060f9992857d}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_REASON\_NONE@{RECORDER\_REASON\_NONE}}
\index{RECORDER\_REASON\_NONE@{RECORDER\_REASON\_NONE}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_REASON\_NONE}{RECORDER\_REASON\_NONE}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+NE = 0\hspace{0.3cm}{\ttfamily [static]}}

0\+: No error occurs. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a7d1e7ebafe354564c9e20d5889ced244}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a7d1e7ebafe354564c9e20d5889ced244}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_REASON\_WRITE\_FAILED@{RECORDER\_REASON\_WRITE\_FAILED}}
\index{RECORDER\_REASON\_WRITE\_FAILED@{RECORDER\_REASON\_WRITE\_FAILED}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_REASON\_WRITE\_FAILED}{RECORDER\_REASON\_WRITE\_FAILED}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+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\hspace{0.3cm}{\ttfamily [static]}}

1\+: The S\+DK fails to write the recorded data to a file. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_adbae8c37f71b76359e8b476834cceb01}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_adbae8c37f71b76359e8b476834cceb01}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_REASON\_NO\_STREAM@{RECORDER\_REASON\_NO\_STREAM}}
\index{RECORDER\_REASON\_NO\_STREAM@{RECORDER\_REASON\_NO\_STREAM}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_REASON\_NO\_STREAM}{RECORDER\_REASON\_NO\_STREAM}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+R\+E\+C\+O\+R\+D\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+\_\+\+S\+T\+R\+E\+AM = 2\hspace{0.3cm}{\ttfamily [static]}}

2\+: The S\+DK does not detect audio and video streams to be recorded, or audio and video streams are interrupted for more than five seconds during recording. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1859b16ef17fec5815eb982e3fd57b04}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1859b16ef17fec5815eb982e3fd57b04}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_REASON\_OVER\_MAX\_DURATION@{RECORDER\_REASON\_OVER\_MAX\_DURATION}}
\index{RECORDER\_REASON\_OVER\_MAX\_DURATION@{RECORDER\_REASON\_OVER\_MAX\_DURATION}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_REASON\_OVER\_MAX\_DURATION}{RECORDER\_REASON\_OVER\_MAX\_DURATION}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+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\hspace{0.3cm}{\ttfamily [static]}}

3\+: The recording duration exceeds the upper limit. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a67f8644df0d507ddb287e3878cecc73e}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a67f8644df0d507ddb287e3878cecc73e}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!RECORDER\_REASON\_CONFIG\_CHANGED@{RECORDER\_REASON\_CONFIG\_CHANGED}}
\index{RECORDER\_REASON\_CONFIG\_CHANGED@{RECORDER\_REASON\_CONFIG\_CHANGED}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{RECORDER\_REASON\_CONFIG\_CHANGED}{RECORDER\_REASON\_CONFIG\_CHANGED}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+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\hspace{0.3cm}{\ttfamily [static]}}

4\+: The recording configuration changes. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6e110d62525ac8b01f9a01fe2eebb752}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6e110d62525ac8b01f9a01fe2eebb752}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!STREAM\_TYPE\_AUDIO@{STREAM\_TYPE\_AUDIO}}
\index{STREAM\_TYPE\_AUDIO@{STREAM\_TYPE\_AUDIO}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{STREAM\_TYPE\_AUDIO}{STREAM\_TYPE\_AUDIO}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+U\+D\+IO = 0x1\hspace{0.3cm}{\ttfamily [static]}}

1\+: Record audio only. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1a30361aec61fc3070d1df58238dbd7f}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1a30361aec61fc3070d1df58238dbd7f}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!STREAM\_TYPE\_VIDEO@{STREAM\_TYPE\_VIDEO}}
\index{STREAM\_TYPE\_VIDEO@{STREAM\_TYPE\_VIDEO}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{STREAM\_TYPE\_VIDEO}{STREAM\_TYPE\_VIDEO}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+I\+D\+EO = 0x2\hspace{0.3cm}{\ttfamily [static]}}

2\+: Record video only. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_af0a185b86df6eb4d3111b87604ccc1f1}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_af0a185b86df6eb4d3111b87604ccc1f1}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!STREAM\_TYPE\_BOTH@{STREAM\_TYPE\_BOTH}}
\index{STREAM\_TYPE\_BOTH@{STREAM\_TYPE\_BOTH}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{STREAM\_TYPE\_BOTH}{STREAM\_TYPE\_BOTH}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+O\+TH = \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a6e110d62525ac8b01f9a01fe2eebb752}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+U\+D\+IO}} $\vert$ \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_a1a30361aec61fc3070d1df58238dbd7f}{S\+T\+R\+E\+A\+M\+\_\+\+T\+Y\+P\+E\+\_\+\+V\+I\+D\+EO}}\hspace{0.3cm}{\ttfamily [static]}}

3\+: Record both audio and video. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_aac18d6e91cc7be6acc3ddd8d4eb026f9}\label{classio_1_1agora_1_1rtc2_1_1_agora_media_recorder_aac18d6e91cc7be6acc3ddd8d4eb026f9}} 
\index{io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}!CONTAINER\_MP4@{CONTAINER\_MP4}}
\index{CONTAINER\_MP4@{CONTAINER\_MP4}!io.agora.rtc2.AgoraMediaRecorder@{io.agora.rtc2.AgoraMediaRecorder}}
\doxysubsubsection{\texorpdfstring{CONTAINER\_MP4}{CONTAINER\_MP4}}
{\footnotesize\ttfamily final int io.\+agora.\+rtc2.\+Agora\+Media\+Recorder.\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+M\+P4 = 1\hspace{0.3cm}{\ttfamily [static]}}

1\+: M\+P4 format. 