\hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler}{}\doxysection{io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler Class Reference}
\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler}\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_agora_face_position_info}{Agora\+Face\+Position\+Info}}
\begin{DoxyCompactList}\small\item\em The information of the detected human face. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_audio_volume_info}{Audio\+Volume\+Info}}
\begin{DoxyCompactList}\small\item\em The volume information of users. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_client_role}{Client\+Role}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_downlink_network_info}{Downlink\+Network\+Info}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_error_code}{Error\+Code}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_lastmile_probe_result}{Lastmile\+Probe\+Result}}
\begin{DoxyCompactList}\small\item\em Results of the uplink and downlink last-\/mile network tests. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_audio_stats}{Local\+Audio\+Stats}}
\begin{DoxyCompactList}\small\item\em Local audio statistics. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_video_stats}{Local\+Video\+Stats}}
\begin{DoxyCompactList}\small\item\em The statistics of the local video stream. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_multipath_stats}{Multipath\+Stats}}
\begin{DoxyCompactList}\small\item\em Aggregates statistics of each network path in multipath transmission. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_path_stats}{Path\+Stats}}
\begin{DoxyCompactList}\small\item\em Statistical information about a specific network path. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_quality}{Quality}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_audio_stats}{Remote\+Audio\+Stats}}
\begin{DoxyCompactList}\small\item\em Audio statistics of the remote user. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_video_stats}{Remote\+Video\+Stats}}
\begin{DoxyCompactList}\small\item\em Statistics of the remote video stream. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}}
\begin{DoxyCompactList}\small\item\em Statistics of a call session. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_uplink_network_info}{Uplink\+Network\+Info}}
\begin{DoxyCompactList}\small\item\em The uplink network information. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_user_offline_reason}{User\+Offline\+Reason}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_layout}{Video\+Layout}}
\begin{DoxyCompactList}\small\item\em Layout information of a specific sub-\/video stream within the mixed stream. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_layout_info}{Video\+Layout\+Info}}
\begin{DoxyCompactList}\small\item\em Detailed layout information of a mixed video stream. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_profile}{Video\+Profile}}
\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_rendering_tracing_info}{Video\+Rendering\+Tracing\+Info}}
\begin{DoxyCompactList}\small\item\em Indicators during video frame rendering progress. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_warn_code}{Warn\+Code}}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6944f0b187993f39cf1235cf3bbed949}{on\+Error}} (int err)
\begin{DoxyCompactList}\small\item\em Reports an error during S\+DK runtime. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a25a599788cbb7d9b97b9f67747c17243}{on\+Join\+Channel\+Success}} (String channel, int uid, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when a user joins a channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac60a05f915647a63769fce8ce7101b48}{on\+Rejoin\+Channel\+Success}} (String channel, int uid, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when a user rejoins the channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae8d95d70238163de3d89399bee8061a1}{on\+Leave\+Channel}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Occurs when a user leaves a channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a52d541757c833d035dcac245100d8217}{on\+Client\+Role\+Changed}} (int old\+Role, int new\+Role, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_client_role_options}{Client\+Role\+Options}} new\+Role\+Options)
\begin{DoxyCompactList}\small\item\em Occurs when the user role or the audience latency level changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8e24f084957a12a50aa2690ee4e69904}{on\+Client\+Role\+Change\+Failed}} (int reason, int current\+Role)
\begin{DoxyCompactList}\small\item\em Occurs when switching a user role fails. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8643b8a54c5aa30e22209a54274fbcf3}{on\+Local\+User\+Registered}} (int uid, String user\+Account)
\begin{DoxyCompactList}\small\item\em Occurs when the local user registers a user account. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a0cd49bb3b8733f04ecaacf1df091e07f}{on\+User\+Info\+Updated}} (int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_user_info}{User\+Info}} user\+Info)
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK gets the user ID and user account of the remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adcc5cddc796788d6fb300895f604e8a7}{on\+User\+State\+Changed}} (int uid, int state)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a848d29acef97523964bb27dd5b637162}{on\+User\+Joined}} (int uid, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) joins the channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a36dfe32e633612d8e74e1a32c504c817}{on\+User\+Offline}} (int uid, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acf3ab9feae0d9a6001da31e95363aa22}{on\+Connection\+State\+Changed}} (int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the network connection state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae295db0a95c7d6409b19b00dfef9ed20}{on\+Connection\+Interrupted}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the connection between the S\+DK and the server is interrupted. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3c40049545254582b454eea461b166f4}{on\+Connection\+Lost}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK cannot reconnect to Agora\textquotesingle{}s edge server 10 seconds after its connection to the server is interrupted. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3699579c7e341ea19e185b967748ddd4}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3699579c7e341ea19e185b967748ddd4}} 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3699579c7e341ea19e185b967748ddd4}{on\+Connection\+Banned}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the connection is banned by the Agora server. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad230797ab45c4307562e1b19519253b5}{on\+Token\+Privilege\+Will\+Expire}} (String token)
\begin{DoxyCompactList}\small\item\em Occurs when the token expires in 30 seconds. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2585f098b637d03ae3aca03daaca8eef}{on\+Request\+Token}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the token expires. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2ba550d177fe9550ac01a5f9349a75a5}{on\+License\+Validation\+Failure}} (int error)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6b9a1f4de49ef268b2be15b269ee7c47}{on\+Audio\+Volume\+Indication}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_audio_volume_info}{Audio\+Volume\+Info}}\mbox{[}$\,$\mbox{]} speakers, int total\+Volume)
\begin{DoxyCompactList}\small\item\em Reports the volume information of users. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a150869ac2672bc1af7ba9f8fc4d10570}{on\+Active\+Speaker}} (int uid)
\begin{DoxyCompactList}\small\item\em Occurs when the most active remote speaker is detected. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac14aad764dc710a05b6cad4c3838c706}{on\+Video\+Stopped}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the video stops playing. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a18073dc2bcd1e4a4df8f741014fc3106}{on\+First\+Local\+Video\+Frame}} (Constants.\+Video\+Source\+Type source, int width, int height, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the first local video frame is displayed on the local video view. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5cb5cf5ecef5eb955c65959620c843e3}{on\+First\+Local\+Video\+Frame\+Published}} (Constants.\+Video\+Source\+Type source, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the first video frame is published. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab63e6aa894c685a766fc6e81711c68e6}{on\+First\+Remote\+Video\+Decoded}} (int uid, int width, int height, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the first remote video frame is received and decoded. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a753cffdbf678f94a2b07495dd02cc4f2}{on\+First\+Remote\+Video\+Frame}} (int uid, int width, int height, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the renderer receives the first frame of the remote video. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2854027a99209da1cc0efa46c54211b4}{on\+User\+Mute\+Audio}} (int uid, boolean muted)
\begin{DoxyCompactList}\small\item\em Occurs when a remote user (in the communication profile) or a host (in the live streaming profile) stops/resumes sending the audio stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9b5ec64a801ee3442a0aeab35c5d059b}{on\+User\+Mute\+Video}} (int uid, boolean muted)
\begin{DoxyCompactList}\small\item\em Occurs when a remote user stops or resumes publishing the video stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aebce7065ea48abbdb6001fec7a00c1ac}{on\+User\+Enable\+Video}} (int uid, boolean enabled)
\begin{DoxyCompactList}\small\item\em Occurs when a remote user enables or disables the video module. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9e43e9e2b70a0d4b20a0e0313a734c90}{on\+User\+Enable\+Local\+Video}} (int uid, boolean enabled)
\begin{DoxyCompactList}\small\item\em Occurs when a specific remote user enables/disables the local video capturing function. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a729049a110c6a1b7e951c8a9a5cc32c9}{on\+Video\+Size\+Changed}} (Constants.\+Video\+Source\+Type source, int uid, int width, int height, int rotation)
\begin{DoxyCompactList}\small\item\em Occurs when the video size or rotation of a specified user changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8abb48195f676e5730339ed0ad0f8dc1}{on\+Remote\+Audio\+State\+Changed}} (int uid, int state, int reason, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the remote audio state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad6a5250389c780cb6e37b9534822a27b}{on\+Audio\+Publish\+State\+Changed}} (String channel, int old\+State, int new\+State, int elapse\+Since\+Last\+State)
\begin{DoxyCompactList}\small\item\em Occurs when the audio publishing state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_afaeef3162faac616eda2f18bfbd5f214}{on\+Video\+Publish\+State\+Changed}} (Constants.\+Video\+Source\+Type source, String channel, int old\+State, int new\+State, int elapse\+Since\+Last\+State)
\begin{DoxyCompactList}\small\item\em Occurs when the video publishing state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_af99f6ab9132fc82d8198fa325601dd9e}{on\+Audio\+Subscribe\+State\+Changed}} (String channel, int uid, int old\+State, int new\+State, int elapse\+Since\+Last\+State)
\begin{DoxyCompactList}\small\item\em Occurs when the audio subscribing state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a83dc1b71944119fd1f78055a9ca7f8ab}{on\+Video\+Subscribe\+State\+Changed}} (String channel, int uid, int old\+State, int new\+State, int elapse\+Since\+Last\+State)
\begin{DoxyCompactList}\small\item\em Occurs when the video subscribing state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5daae97f78becbf71dc3dbfd494f8419}{on\+Remote\+Video\+State\+Changed}} (int uid, int state, int reason, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the remote video stream state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3d4f978004d0666f26345810dcfe73ac}{on\+Channel\+Media\+Relay\+State\+Changed}} (int state, int code)
\begin{DoxyCompactList}\small\item\em Occurs when the state of the media stream relay changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac12497babde9ba725c873ba3b1fe76ab}{on\+First\+Local\+Audio\+Frame\+Published}} (int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the first audio frame is published. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5203b66a93abb63596c23764c587292a}{on\+First\+Remote\+Audio\+Frame}} (int uid, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK receives the first audio frame from a specific remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95ad49d36d9934ba78763fcb0ab2a91d}{on\+First\+Remote\+Audio\+Decoded}} (int uid, int elapsed)
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK decodes the first remote audio frame for playback. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a738e8d63f1960cc94943c5636eb43c63}{on\+Remote\+Subscribe\+Fallback\+To\+Audio\+Only}} (int uid, boolean is\+Fallback\+Or\+Recover)
\begin{DoxyCompactList}\small\item\em Occurs when the remote media stream falls back to the audio-\/only stream due to poor network conditions or switches back to the video stream after the network conditions improve. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9685280586a4fce917eac08257fdeaf9}{on\+Audio\+Route\+Changed}} (int routing)
\begin{DoxyCompactList}\small\item\em Occurs when the local audio route changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a23f6de603ad02640a06e7144a7fc6fe8}{on\+Camera\+Ready}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the camera turns on and is ready to capture the video. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a989f10ab210047ae44b9d21815b84cd5}{on\+Camera\+Focus\+Area\+Changed}} (Rect rect)
\begin{DoxyCompactList}\small\item\em Occurs when the camera focus area changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_abb9832896d40cee749866375c84e753b}{on\+Camera\+Exposure\+Area\+Changed}} (Rect rect)
\begin{DoxyCompactList}\small\item\em Occurs when the camera exposure area changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a58207f39af3210fb9bcada00b72bfaf6}{on\+Snapshot\+Taken}} (int uid, String file\+Path, int width, int height, int err\+Code)
\begin{DoxyCompactList}\small\item\em Reports the result of taking a video snapshot. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2fbb5c93c21e84859c348d85884adc26}{on\+Face\+Position\+Changed}} (int image\+Width, int image\+Height, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_agora_face_position_info}{Agora\+Face\+Position\+Info}}\mbox{[}$\,$\mbox{]} face\+Rect\+Arr)
\begin{DoxyCompactList}\small\item\em Reports the face detection result of the local user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab17fcf9e21edcff4a51ac1ff9e51279e}{on\+Audio\+Quality}} (int uid, int quality, short delay, short lost)
\begin{DoxyCompactList}\small\item\em Reports the statistics of the audio stream sent by each remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476a17632eab584aa291aa869663d13}{on\+Rtc\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the statistics about the current call. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8b68b163b0b6f8bdbf2f52e320a04739}{on\+Lastmile\+Quality}} (int quality)
\begin{DoxyCompactList}\small\item\em Reports the last-\/mile network quality of the local user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adc7bfb05ed741769a1436794926b1cf8}{on\+Lastmile\+Probe\+Result}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_lastmile_probe_result}{Lastmile\+Probe\+Result}} result)
\begin{DoxyCompactList}\small\item\em Reports the last mile network probe result. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acdf01fd3da944feb847585c406d3d263}{on\+Network\+Quality}} (int uid, int tx\+Quality, int rx\+Quality)
\begin{DoxyCompactList}\small\item\em Reports the last mile network quality of each user in the channel. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a736bf4d46d2cbd018ec30c06156a2c5d}{on\+Local\+Audio\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_audio_stats}{Local\+Audio\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the statistics of the local audio stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab5180ba91a1c81c5470e2ec1a7e18a01}{on\+Local\+Video\+Stats}} (Constants.\+Video\+Source\+Type source, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_video_stats}{Local\+Video\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the statistics of the local video stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aced11e711bdda1ea24415da27c5bc5fa}{on\+Remote\+Audio\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_audio_stats}{Remote\+Audio\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the transport-\/layer statistics of each remote audio stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7f00d7a396872dc02008ea5f7487917e}{on\+Remote\+Video\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_video_stats}{Remote\+Video\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the statistics of the video stream sent by each remote users. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9af3b09098b1034319184103157b90db}{on\+Local\+Video\+Stat}} (int sent\+Bitrate, int sent\+Frame\+Rate)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8a84e26cf72185b3c944b3a10983f600}{on\+Remote\+Video\+Stat}} (int uid, int delay, int received\+Bitrate, int received\+Frame\+Rate)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a112817ed260a30174329739382e75e66}{on\+Remote\+Audio\+Transport\+Stats}} (int uid, int delay, int lost, int rx\+K\+Bit\+Rate)
\begin{DoxyCompactList}\small\item\em Reports the transport-\/layer statistics of each remote audio stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a93e87d28a93737a7ff6c5287ff3c2a56}{on\+Remote\+Video\+Transport\+Stats}} (int uid, int delay, int lost, int rx\+K\+Bit\+Rate)
\begin{DoxyCompactList}\small\item\em Reports the transport-\/layer statistics of each remote video stream. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab432d1b5f1d8efb96a838f8f9388ff07}{on\+Audio\+Mixing\+State\+Changed}} (int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the playback state of the music file changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a74c7ede84d5fb4464687aaacc0cbf142}{on\+Audio\+Mixing\+Position\+Changed}} (long position)
\begin{DoxyCompactList}\small\item\em Reports the playback progress of a music file. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae51e2624b1c39496f387bcc288ae3f5b}{on\+Audio\+Mixing\+Finished}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the playback of the local music file finishes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aacf755d5776a6899d0f9f61e48378897}{on\+Audio\+Effect\+Finished}} (int sound\+Id)
\begin{DoxyCompactList}\small\item\em Occurs when the playback of the local music file finishes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aece9d87ad596720ba887e6e889f3d81c}{on\+Rhythm\+Player\+State\+Changed}} (int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the state of virtual metronome changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aef21689500cbc435f0ff98fc65670657}{on\+Local\+Audio\+State\+Changed}} (int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the local audio stream state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac5f1cba62b72b39211cffad4cc30fb32}{on\+Local\+Video\+State\+Changed}} (Constants.\+Video\+Source\+Type source, int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the local video stream state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a13ebed19c0ac1ba39eca8e67c174c6ed}{on\+Local\+Video\+Event}} (Constants.\+Video\+Source\+Type source, int event)
\begin{DoxyCompactList}\small\item\em Occurs when the local video event occurs. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a14851bc4c9119e73911c409ac693eea5}{on\+Rtmp\+Streaming\+State\+Changed}} (String url, int state, int reason)
\begin{DoxyCompactList}\small\item\em Occurs when the state of Media Push changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a60f5746ac4fb39f7239ce236b64e55b6}{on\+Rtmp\+Streaming\+Event}} (String url, int event)
\begin{DoxyCompactList}\small\item\em Reports events during the Media Push. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3261b6e73ef26cbba4b6ff68e754b091}{on\+Transcoding\+Updated}} ()
\begin{DoxyCompactList}\small\item\em Occurs when the publisher\textquotesingle{}s transcoding is updated. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6f827b82ff6ed61e855bf6315aa4395c}{on\+Stream\+Message}} (int uid, int stream\+Id, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Occurs when the local user receives the data stream from the remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7ec93fba444f408cd5148f8778bb6955}{on\+Stream\+Message\+Error}} (int uid, int stream\+Id, int error, int missed, int cached)
\begin{DoxyCompactList}\small\item\em Occurs when the local user does not receive the data stream from the remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a81d9835fa9823d2b415147de24366a67}{on\+Rdt\+Message}} (int uid, int type, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Occurs when the local user receives data via Reliable Data Transmission (R\+DT) from a remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aca5da4886c986146b8a017966b38b149}{on\+Rdt\+State\+Changed}} (int uid, int state)
\begin{DoxyCompactList}\small\item\em Occurs when the R\+DT tunnel state changed. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95aa89a54eccdd73423b8004e52d3aa4}{on\+Media\+Control\+Message}} (int uid, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Occurs when the local user receives media control message sent by a remote user. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acfaedf8c3c744f08f065f68b91017ff2}{on\+Media\+Engine\+Load\+Success}} ()
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a069220e819fca1b8157ffd05342b4e35}{on\+Media\+Engine\+Start\+Call\+Success}} ()
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a123fdecc812f7931578afd2f40d48d13}{on\+Network\+Type\+Changed}} (int type)
\begin{DoxyCompactList}\small\item\em Occurs when the local network type changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a4b89dcb8d0bea0fe1917a8936f2a44ce}{on\+Intra\+Request\+Received}} ()
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476220c1c741f765f83a71e4eeaa3ef}{on\+Uplink\+Network\+Info\+Updated}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_uplink_network_info}{Uplink\+Network\+Info}} info)
\begin{DoxyCompactList}\small\item\em Occurs when the uplink network information changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5d2b5d3a5d1bbbd40e0d71594cd06d51}{on\+Encryption\+Error}} (int error\+Type)
\begin{DoxyCompactList}\small\item\em Reports the built-\/in encryption errors. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a982fad5ffc32f1414c4a6df57a88a293}{on\+Permission\+Error}} (int permission)
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK cannot get the device permission. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a63c903e1835fb4623b53ce7e2f46a3f5}{on\+Permission\+Granted}} (int permission)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad802bd7311b1fd7b3f6cb853a567fd34}{on\+Upload\+Log\+Result}} (String request\+Id, boolean success, int reason)
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_afe10d489526d3a6a6fce9c4776b53d9e}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_afe10d489526d3a6a6fce9c4776b53d9e}} 
void {\bfseries on\+Content\+Inspect\+Result} (int result)
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a92c65f217aa90841fb4bd71bd8e998b7}{on\+Proxy\+Connected}} (String channel, int uid, int proxy\+Type, String local\+Proxy\+Ip, int elapsed)
\begin{DoxyCompactList}\small\item\em Reports the proxy connection state. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a33c557a7ed4542fc4561a9d570831073}{on\+Video\+Rendering\+Tracing\+Result}} (int uid, Constants.\+M\+E\+D\+I\+A\+\_\+\+T\+R\+A\+C\+E\+\_\+\+E\+V\+E\+NT current\+Event, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_rendering_tracing_info}{Video\+Rendering\+Tracing\+Info}} tracing\+Info)
\begin{DoxyCompactList}\small\item\em Video frame rendering event callback. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a1c8858d82c94cccbbd1ba6eb592e604e}{on\+Local\+Video\+Transcoder\+Error}} (Local\+Transcoder\+Configuration.\+Transcoding\+Video\+Stream stream, int error)
\begin{DoxyCompactList}\small\item\em Occurs when there\textquotesingle{}s an error during the local video mixing. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae2370da7ffa833dab6550e5ef5ac4f8f}{on\+Transcoded\+Stream\+Layout\+Info}} (int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_layout_info}{Video\+Layout\+Info}} info)
\begin{DoxyCompactList}\small\item\em Occurs when the local user receives a mixed video stream carrying layout information. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5642c37198789f09a0e82560cea482c8}{on\+Audio\+Metadata\+Received}} (int uid, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Occurs when the S\+DK receives audio metadata. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a489ba46bfb0abc486895eb5a35bc5109}{on\+Multipath\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_multipath_stats}{Multipath\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Reports the multipath transmission statistics. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a80abe10ad42047a039233fa35528d8e0}{on\+Renew\+Token\+Result}} (String token, Constants.\+Renew\+Token\+Error\+Code code)
\begin{DoxyCompactList}\small\item\em Callback for {\ttfamily renew\+Token} call result. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Callback methods.

The S\+DK uses the \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler}{I\+Rtc\+Engine\+Event\+Handler}} interface class to send callback event notifications to the application, and the application inherits the methods of this interface class to retrieve these event notifications. All methods in this interface class have their (empty) default implementations, and the application can inherit only some of the required events instead of all of them. In the callback methods, the application should avoid time-\/consuming tasks or call blocking A\+P\+Is (such as Send\+Message), otherwise, the S\+DK may not work properly.

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6944f0b187993f39cf1235cf3bbed949}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6944f0b187993f39cf1235cf3bbed949}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onError@{onError}}
\index{onError@{onError}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onError()}{onError()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Error (\begin{DoxyParamCaption}\item[{int}]{err }\end{DoxyParamCaption})}



Reports an error during S\+DK runtime. 

This callback indicates that an error (concerning network or media) occurs during S\+DK runtime. In most cases, the S\+DK cannot fix the issue and resume running. The S\+DK requires the app to take action or informs the user about the issue.


\begin{DoxyParams}{Parameters}
{\em err} & Error code. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a25a599788cbb7d9b97b9f67747c17243}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a25a599788cbb7d9b97b9f67747c17243}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onJoinChannelSuccess@{onJoinChannelSuccess}}
\index{onJoinChannelSuccess@{onJoinChannelSuccess}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onJoinChannelSuccess()}{onJoinChannelSuccess()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Join\+Channel\+Success (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{uid,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when a user joins a channel. 

This callback notifies the application that a user joins a specified channel. Call timing\+: The S\+DK triggers this callback when you call {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)}, {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} , {\ttfamily join\+Channel\+With\+User\+Account(String token, String channel\+Name, String user\+Account)}, {\ttfamily join\+Channel\+With\+User\+Account(String token, String channel\+Name, String user\+Account, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} , {\ttfamily join\+Channel\+Ex} or {\ttfamily join\+Channel\+With\+User\+Account\+Ex} to join a channel.


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em uid} & The ID of the user who joins the channel. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac60a05f915647a63769fce8ce7101b48}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac60a05f915647a63769fce8ce7101b48}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRejoinChannelSuccess@{onRejoinChannelSuccess}}
\index{onRejoinChannelSuccess@{onRejoinChannelSuccess}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRejoinChannelSuccess()}{onRejoinChannelSuccess()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rejoin\+Channel\+Success (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{uid,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when a user rejoins the channel. 

Call timing\+: When a user loses connection with the server because of network problems, the S\+DK automatically tries to reconnect and triggers this callback upon reconnection.


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em uid} & The ID of the user who rejoins the channel. \\
\hline
{\em elapsed} & Time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae8d95d70238163de3d89399bee8061a1}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae8d95d70238163de3d89399bee8061a1}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLeaveChannel@{onLeaveChannel}}
\index{onLeaveChannel@{onLeaveChannel}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLeaveChannel()}{onLeaveChannel()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Leave\+Channel (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}}}]{stats }\end{DoxyParamCaption})}



Occurs when a user leaves a channel. 

You can obtain information such as the total duration of a call, and the data traffic that the S\+DK transmits and receives. Call timing\+: The S\+DK triggers this callback after you call {\ttfamily leave\+Channel()}, {\ttfamily leave\+Channel(\+Leave\+Channel\+Options options)} , {\ttfamily leave\+Channel\+Ex(\+Rtc\+Connection connection)}, or {\ttfamily leave\+Channel\+Ex(\+Rtc\+Connection connection, Leave\+Channel\+Options options)} to leave a channel.


\begin{DoxyParams}{Parameters}
{\em stats} & Call statistics. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a52d541757c833d035dcac245100d8217}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a52d541757c833d035dcac245100d8217}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onClientRoleChanged@{onClientRoleChanged}}
\index{onClientRoleChanged@{onClientRoleChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onClientRoleChanged()}{onClientRoleChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Client\+Role\+Changed (\begin{DoxyParamCaption}\item[{int}]{old\+Role,  }\item[{int}]{new\+Role,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_client_role_options}{Client\+Role\+Options}}}]{new\+Role\+Options }\end{DoxyParamCaption})}



Occurs when the user role or the audience latency level changes. 

Call timing\+: This callback will be triggered in any of the following situations\+:
\begin{DoxyItemize}
\item Calling {\ttfamily set\+Client\+Role(int role)} or {\ttfamily set\+Client\+Role(int role, Client\+Role\+Options options)} to set the user role or audience latency level {\bfseries{after joining a channel}}
\item Calling {\ttfamily set\+Client\+Role(int role)} or {\ttfamily set\+Client\+Role(int role, Client\+Role\+Options options)} and set the user role to {\ttfamily A\+U\+D\+I\+E\+N\+CE} {\bfseries{before joining a channel}}.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
This callback will not be triggered when you call {\ttfamily set\+Client\+Role(int role)} or {\ttfamily set\+Client\+Role(int role, Client\+Role\+Options options)} and set the user role to {\ttfamily B\+R\+O\+A\+D\+C\+A\+S\+T\+ER} {\bfseries{before joining a channel}}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em old\+Role} & Role that the user switches from\+:
\begin{DoxyItemize}
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+ER (1)\+: Host.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+A\+U\+D\+I\+E\+N\+CE (2)\+: Audience. 
\end{DoxyItemize}\\
\hline
{\em new\+Role} & Role that the user switches to\+:
\begin{DoxyItemize}
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+ER (1)\+: Host.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+A\+U\+D\+I\+E\+N\+CE (2)\+: Audience. 
\end{DoxyItemize}\\
\hline
{\em new\+Role\+Options} & Since v4.\+1.\+0 Properties of the role that the user switches to. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_client_role_options}{Client\+Role\+Options}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8e24f084957a12a50aa2690ee4e69904}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8e24f084957a12a50aa2690ee4e69904}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onClientRoleChangeFailed@{onClientRoleChangeFailed}}
\index{onClientRoleChangeFailed@{onClientRoleChangeFailed}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onClientRoleChangeFailed()}{onClientRoleChangeFailed()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Client\+Role\+Change\+Failed (\begin{DoxyParamCaption}\item[{int}]{reason,  }\item[{int}]{current\+Role }\end{DoxyParamCaption})}



Occurs when switching a user role fails. 

This callback informs you about the reason for failing to switching and your current user role. Call timing\+: The S\+DK triggers this callback when the local user calls {\ttfamily set\+Client\+Role(int role)} or {\ttfamily set\+Client\+Role(int role, Client\+Role\+Options options)} after joining a channel to switch the user role but the switching fails.


\begin{DoxyParams}{Parameters}
{\em reason} & The reason for a user role switch failure.
\begin{DoxyItemize}
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+T\+O\+O\+\_\+\+M\+A\+N\+Y\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+E\+RS (1)\+: The number of hosts in the channel is already at the upper limit.\+Note\+: This enumerator is reported only when the support for 128 users is enabled. The maximum number of hosts is based on the actual number of hosts configured when you enable the 128-\/user feature.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+N\+O\+T\+\_\+\+A\+U\+T\+H\+O\+R\+I\+Z\+ED (2)\+: The request is rejected by the Agora server. Agora recommends you prompt the user to try to switch their user role again.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+R\+E\+Q\+U\+E\+S\+T\+\_\+\+T\+I\+M\+E\+\_\+\+O\+UT (3)\+: The request is timed out. Agora recommends you prompt the user to check the network connection and try to switch their user role again. Deprecated\+: This enumerator is deprecated since v4.\+4.\+0 and is not recommended for use.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+F\+A\+I\+L\+ED (4)\+: The S\+DK connection fails. You can troubleshoot the failure through the {\ttfamily reason} reported by {\ttfamily on\+Connection\+State\+Changed}. Deprecated\+: This enumerator is deprecated since v4.\+4.\+0 and is not recommended for use. 
\end{DoxyItemize}\\
\hline
{\em current\+Role} & Current user role.
\begin{DoxyItemize}
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+ER (1)\+: Host. A host can both send and receive streams.
\item C\+L\+I\+E\+N\+T\+\_\+\+R\+O\+L\+E\+\_\+\+A\+U\+D\+I\+E\+N\+CE (2)\+: Audience. An audience member can only receive streams. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8643b8a54c5aa30e22209a54274fbcf3}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8643b8a54c5aa30e22209a54274fbcf3}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalUserRegistered@{onLocalUserRegistered}}
\index{onLocalUserRegistered@{onLocalUserRegistered}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalUserRegistered()}{onLocalUserRegistered()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+User\+Registered (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{String}]{user\+Account }\end{DoxyParamCaption})}



Occurs when the local user registers a user account. 

\begin{DoxySince}{Since}
v2.\+8.\+0.
\end{DoxySince}
After the local user successfully calls {\ttfamily register\+Local\+User\+Account} to register the user account or calls {\ttfamily join\+Channel\+With\+User\+Account(String token, String channel\+Name, String user\+Account, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} to join a channel, the S\+DK triggers the callback and informs the local user\textquotesingle{}s U\+ID and User Account.


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the local user. \\
\hline
{\em user\+Account} & The user account of the local user. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a0cd49bb3b8733f04ecaacf1df091e07f}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a0cd49bb3b8733f04ecaacf1df091e07f}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserInfoUpdated@{onUserInfoUpdated}}
\index{onUserInfoUpdated@{onUserInfoUpdated}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserInfoUpdated()}{onUserInfoUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Info\+Updated (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_user_info}{User\+Info}}}]{user\+Info }\end{DoxyParamCaption})}



Occurs when the S\+DK gets the user ID and user account of the remote user. 

\begin{DoxySince}{Since}
v2.\+8.\+0.
\end{DoxySince}
After a remote user joins the channel, the S\+DK gets the U\+ID and user account of the remote user, caches them in a mapping table object, and triggers this callback on the local client.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em user\+Info} & The \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_user_info}{User\+Info}} object that contains the user ID and user account of the remote user. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_user_info}{User\+Info}}} for details. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adcc5cddc796788d6fb300895f604e8a7}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adcc5cddc796788d6fb300895f604e8a7}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserStateChanged@{onUserStateChanged}}
\index{onUserStateChanged@{onUserStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserStateChanged()}{onUserStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{state }\end{DoxyParamCaption})}

Occurs when the remote user state is updated. 
\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user. \\
\hline
{\em state} & State of the remote user\+: Just \& \#\+R\+E\+M\+O\+T\+E\+\_\+\+U\+S\+E\+R\+\_\+\+S\+T\+A\+TE
\begin{DoxyItemize}
\item {\ttfamily U\+S\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+U\+T\+E\+\_\+\+A\+U\+D\+IO(1 $<$$<$ 0)}\+: The remote user has muted the audio.
\item {\ttfamily U\+S\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+M\+U\+T\+E\+\_\+\+V\+I\+D\+EO(1 $<$$<$ 1)}\+: The remote user has muted the video.
\item {\ttfamily U\+S\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+A\+B\+L\+E\+\_\+\+V\+I\+D\+EO(1 $<$$<$ 4)}\+: The remote user has enabled the video, which includes video capturing and encoding.
\item {\ttfamily U\+S\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+A\+B\+L\+E\+\_\+\+L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+EO(1 $<$$<$ 8)}\+: The remote user has enabled the local video capturing. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a848d29acef97523964bb27dd5b637162}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a848d29acef97523964bb27dd5b637162}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserJoined@{onUserJoined}}
\index{onUserJoined@{onUserJoined}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserJoined()}{onUserJoined()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Joined (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) joins the channel. 


\begin{DoxyItemize}
\item In a communication channel, this callback indicates that a remote user joins the channel. The S\+DK also triggers this callback to report the existing users in the channel when a user joins the channel.
\item In a live-\/broadcast channel, this callback indicates that a host joins the channel. The S\+DK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of co-\/hosts to 32, with a maximum of 17 video hosts. Call timing\+: The S\+DK triggers this callback under one of the following circumstances\+:
\item A remote user/host joins the channel.
\item A remote user switches the user role to the host after joining the channel.
\item A remote user/host rejoins the channel after a network interruption.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the user or host who joins the channel. \\
\hline
{\em elapsed} & Time delay (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until this callback is triggered. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a36dfe32e633612d8e74e1a32c504c817}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a36dfe32e633612d8e74e1a32c504c817}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserOffline@{onUserOffline}}
\index{onUserOffline@{onUserOffline}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserOffline()}{onUserOffline()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Offline (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel. 

There are generally two reasons for users to become offline\+:
\begin{DoxyItemize}
\item Leave the channel\+: When a user/host leaves the channel, the user/host sends a goodbye message.
\item Drop offline\+: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the S\+DK assumes that the user/host drops offline. A poor network connection may lead to false detections. It is recommended to use the Agora R\+TM S\+DK for reliable offline detection. Call timing\+: This callback is triggered when a remote user (in the communication profile) or host (in the live streaming profile) leaves a channel.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the user who leaves the channel or goes offline. \\
\hline
{\em reason} & Reasons why a remote user (in the communication profile) or host (in the live streaming profile) goes offline\+:
\begin{DoxyItemize}
\item U\+S\+E\+R\+\_\+\+O\+F\+F\+L\+I\+N\+E\+\_\+\+Q\+U\+IT (0)\+: The user has quit the call. When the user leaves the channel, the user sends a goodbye message.
\item U\+S\+E\+R\+\_\+\+O\+F\+F\+L\+I\+N\+E\+\_\+\+D\+R\+O\+P\+P\+ED (1)\+: The S\+DK timed out and the user dropped offline because it has not received any data package within a certain period of time. A poor network connection may lead to false detection. It is recommended to use the Agora R\+TM S\+DK for reliable offline detection.
\item U\+S\+E\+R\+\_\+\+O\+F\+F\+L\+I\+N\+E\+\_\+\+B\+E\+C\+O\+M\+E\+\_\+\+A\+U\+D\+I\+E\+N\+CE (2)\+: The user switches the user role from a broadcaster to an audience. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acf3ab9feae0d9a6001da31e95363aa22}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acf3ab9feae0d9a6001da31e95363aa22}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onConnectionStateChanged@{onConnectionStateChanged}}
\index{onConnectionStateChanged@{onConnectionStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onConnectionStateChanged()}{onConnectionStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Connection\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the network connection state changes. 

\begin{DoxySince}{Since}
v2.\+3.\+2.
\end{DoxySince}
When the network connection state changes, the S\+DK triggers this callback and reports the current connection state and the reason for the change.


\begin{DoxyParams}{Parameters}
{\em state} & The current connection state.
\begin{DoxyItemize}
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T\+ED (1)\+: The S\+DK is disconnected from Agora\textquotesingle{}s edge server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG (2)\+: The S\+DK is connecting to Agora\textquotesingle{}s edge server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED (3)\+: The S\+DK is connected to Agora\textquotesingle{}s edge server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+C\+O\+N\+N\+E\+C\+T\+I\+NG (4)\+: The S\+DK tries to reconnect to the Agora edge server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (5)\+: The S\+DK fails to connect to Agora\textquotesingle{}s edge server. 
\end{DoxyItemize}\\
\hline
{\em reason} & -\/ C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG (0)\+: The S\+DK is connecting to Agora\textquotesingle{}s edge server.
\begin{DoxyItemize}
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+J\+O\+I\+N\+\_\+\+S\+U\+C\+C\+E\+SS (1)\+: The S\+DK has joined the channel successfully.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+I\+N\+T\+E\+R\+R\+U\+P\+T\+ED (2)\+: The connection between the S\+DK and Agora\textquotesingle{}s edge server is interrupted.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+B\+A\+N\+N\+E\+D\+\_\+\+B\+Y\+\_\+\+S\+E\+R\+V\+ER (3)\+: The connection is banned by the Agora server. For example, when a user is kicked out of the channel, this code will be returned.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+J\+O\+I\+N\+\_\+\+F\+A\+I\+L\+ED (4)\+: The S\+DK fails to join the channel. When the S\+DK fails to join the channel for more than 20 minutes, this code will be returned and the S\+DK stops reconnecting to the channel. You need to prompt the user to try to switch to another network and rejoin the channel.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+L\+E\+A\+V\+E\+\_\+\+C\+H\+A\+N\+N\+EL (5)\+: The S\+DK has left the channel.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+P\+P\+\_\+\+ID (6)\+: Invalid App ID. You need to rejoin the channel with a valid A\+PP ID and make sure the App ID you are using is consistent with the one generated in the Agora Console.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+C\+H\+A\+N\+N\+E\+L\+\_\+\+N\+A\+ME (7)\+: Invalid channel name. Rejoin the channel with a valid channel name. A valid channel name is a string of up to 64 bytes in length. Supported characters (89 characters in total)\+:
\begin{DoxyItemize}
\item All lowercase English letters\+: a to z.
\item All uppercase English letters\+: A to Z.
\item All numeric characters\+: 0 to 9.
\item \char`\"{}!\char`\"{}, \char`\"{}\#\char`\"{}, \char`\"{}\$\char`\"{}, \char`\"{}\%\char`\"{}, \char`\"{}\&\char`\"{}, \char`\"{}(\char`\"{}, \char`\"{})\char`\"{}, \char`\"{}+\char`\"{}, \char`\"{}-\/\char`\"{}, \char`\"{}\+:\char`\"{}, \char`\"{};\char`\"{}, \char`\"{}$<$\char`\"{}, \char`\"{}=\char`\"{}, \char`\"{}.\char`\"{}, \char`\"{}$>$\char`\"{}, \char`\"{}?\char`\"{}, \char`\"{}@\char`\"{}, \char`\"{}\mbox{[}\char`\"{}, \char`\"{}\mbox{]}\char`\"{}, \char`\"{}$^\wedge$\char`\"{}, \char`\"{}\+\_\+\char`\"{}, \char`\"{}\{\char`\"{}, \char`\"{}\}\char`\"{}, \char`\"{}$\vert$\char`\"{}, \char`\"{}$\sim$\char`\"{}, \char`\"{},\char`\"{}
\end{DoxyItemize}
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+T\+O\+K\+EN (8)\+: Invalid token. Possible reasons are as follows\+:
\begin{DoxyItemize}
\item The App Certificate for the project is enabled in Agora Console, but you do not pass in a token when joining a channel.
\item The uid specified when calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} to join the channel is inconsistent with the uid passed in when generating the token.
\item The generated token and the token used to join the channel are not consistent. Ensure the following\+:
\item When your project enables App Certificate, you need to pass in a token to join a channel.
\item The user ID specified when generating the token is consistent with the user ID used when joining the channel.
\item The generated token is the same as the token passed in to join the channel.
\end{DoxyItemize}
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+T\+O\+K\+E\+N\+\_\+\+E\+X\+P\+I\+R\+ED (9)\+: The token currently being used has expired. You need to generate a new token on your server and rejoin the channel with the new token.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+R\+E\+J\+E\+C\+T\+E\+D\+\_\+\+B\+Y\+\_\+\+S\+E\+R\+V\+ER (10)\+: The user is banned by the server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+S\+E\+T\+T\+I\+N\+G\+\_\+\+P\+R\+O\+X\+Y\+\_\+\+S\+E\+R\+V\+ER (11)\+: The S\+DK tries to reconnect after setting a proxy server.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+R\+E\+N\+E\+W\+\_\+\+T\+O\+K\+EN (12)\+: The connection state changed because the token is renewed.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+I\+P\+\_\+\+A\+D\+D\+R\+E\+S\+S\+\_\+\+C\+H\+A\+N\+G\+ED (13)\+: Client IP address changed. If you receive this code multiple times, You need to prompt the user to switch networks and try joining the channel again.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+K\+E\+E\+P\+\_\+\+A\+L\+I\+V\+E\+\_\+\+T\+I\+M\+E\+O\+UT (14)\+: Timeout for the keep-\/alive of the connection between the S\+DK and the Agora edge server. The S\+DK tries to reconnect to the server automatically.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+R\+E\+J\+O\+I\+N\+\_\+\+S\+U\+C\+C\+E\+SS (15)\+: The S\+DK has rejoined the channel successfully.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+L\+O\+ST (16)\+: The connection between the S\+DK and the server is lost.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+E\+C\+H\+O\+\_\+\+T\+E\+ST (17)\+: The connection state changes due to the echo test.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+C\+L\+I\+E\+N\+T\+\_\+\+I\+P\+\_\+\+A\+D\+D\+R\+E\+S\+S\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+B\+Y\+\_\+\+U\+S\+ER (18)\+: The local IP address was changed by the user.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+S\+A\+M\+E\+\_\+\+U\+I\+D\+\_\+\+L\+O\+G\+IN (19)\+: The user joined the same channel from different devices with the same U\+ID. C\+A\+U\+T\+I\+ON\+: Joining the same R\+TC channel with the same U\+ID is an undefined behavior. Agora does not guarantee that {\ttfamily reason} 19 is always triggered under the same circumstance.
\item C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+C\+H\+A\+N\+G\+E\+D\+\_\+\+T\+O\+O\+\_\+\+M\+A\+N\+Y\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+E\+RS (20)\+: The number of hosts in the channel has reached the upper limit. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae295db0a95c7d6409b19b00dfef9ed20}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae295db0a95c7d6409b19b00dfef9ed20}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onConnectionInterrupted@{onConnectionInterrupted}}
\index{onConnectionInterrupted@{onConnectionInterrupted}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onConnectionInterrupted()}{onConnectionInterrupted()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Connection\+Interrupted (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the connection between the S\+DK and the server is interrupted. 

The S\+DK triggers this callback when it loses connection with the server for more than four seconds after the connection is established. After triggering this callback, the S\+DK tries to reconnect to the server. You can use this callback to implement pop-\/up reminders. The differences between this callback and {\ttfamily on\+Connection\+Lost} are as follow\+:
\begin{DoxyItemize}
\item The S\+DK triggers the {\ttfamily on\+Connection\+Interrupted} callback when it loses connection with the server for more than four seconds after it successfully joins the channel.
\item The S\+DK triggers the {\ttfamily on\+Connection\+Lost} callback when it loses connection with the server for more than 10 seconds, whether or not it joins the channel. If the S\+DK fails to rejoin the channel 20 minutes after being disconnected from Agora\textquotesingle{}s edge server, the S\+DK stops rejoining the channel. 
\end{DoxyItemize}\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3c40049545254582b454eea461b166f4}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3c40049545254582b454eea461b166f4}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onConnectionLost@{onConnectionLost}}
\index{onConnectionLost@{onConnectionLost}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onConnectionLost()}{onConnectionLost()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Connection\+Lost (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the S\+DK cannot reconnect to Agora\textquotesingle{}s edge server 10 seconds after its connection to the server is interrupted. 

The S\+DK triggers this callback when it cannot connect to the server 10 seconds after calling the {\ttfamily join\+Channel(\+String token, String channel\+Id, int uid, Channel\+Media\+Options options)} method, regardless of whether it is in the channel. If the S\+DK fails to rejoin the channel 20 minutes after being disconnected from Agora\textquotesingle{}s edge server, the S\+DK stops rejoining the channel. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad230797ab45c4307562e1b19519253b5}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad230797ab45c4307562e1b19519253b5}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onTokenPrivilegeWillExpire@{onTokenPrivilegeWillExpire}}
\index{onTokenPrivilegeWillExpire@{onTokenPrivilegeWillExpire}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onTokenPrivilegeWillExpire()}{onTokenPrivilegeWillExpire()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Token\+Privilege\+Will\+Expire (\begin{DoxyParamCaption}\item[{String}]{token }\end{DoxyParamCaption})}



Occurs when the token expires in 30 seconds. 

When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways\+:
\begin{DoxyItemize}
\item In scenarios involving one channel\+:
\begin{DoxyItemize}
\item Call {\ttfamily renew\+Token} to pass in the new token.
\item Call {\ttfamily leave\+Channel(\+Leave\+Channel\+Options options)} to leave the current channel and then pass in the new token when you call {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} to join a channel.
\end{DoxyItemize}
\item In scenarios involving mutiple channels\+: Call {\ttfamily update\+Channel\+Media\+Options\+Ex} to pass in the new token. Call timing\+: The S\+DK triggers this callback 30 seconds before the token expires, reminding the app to update the token.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em token} & The token that is about to expire. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2585f098b637d03ae3aca03daaca8eef}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2585f098b637d03ae3aca03daaca8eef}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRequestToken@{onRequestToken}}
\index{onRequestToken@{onRequestToken}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRequestToken()}{onRequestToken()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Request\+Token (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the token expires. 

The S\+DK triggers this callback if the token expires. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways\+:
\begin{DoxyItemize}
\item In scenarios involving one channel\+:
\begin{DoxyItemize}
\item Call {\ttfamily renew\+Token} to pass in the new token.
\item Call {\ttfamily leave\+Channel(\+Leave\+Channel\+Options options)} to leave the current channel and then pass in the new token when you call {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} to join a channel.
\end{DoxyItemize}
\item In scenarios involving mutiple channels\+: Call {\ttfamily update\+Channel\+Media\+Options\+Ex} to pass in the new token. 
\end{DoxyItemize}\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2ba550d177fe9550ac01a5f9349a75a5}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2ba550d177fe9550ac01a5f9349a75a5}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLicenseValidationFailure@{onLicenseValidationFailure}}
\index{onLicenseValidationFailure@{onLicenseValidationFailure}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLicenseValidationFailure()}{onLicenseValidationFailure()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+License\+Validation\+Failure (\begin{DoxyParamCaption}\item[{int}]{error }\end{DoxyParamCaption})}

Occurs when connection license verification fails You can know the reason accordding to error code


\begin{DoxyParams}{Parameters}
{\em error} & license verify fail reason\+:
\begin{DoxyItemize}
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D(1)}\+: Invalid license.
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+E\+X\+P\+I\+R\+E(2)}\+: License expired.
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+M\+I\+N\+U\+T\+E\+S\+\_\+\+E\+X\+C\+E\+E\+D(3)}\+: Exceed license minutes limit.
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+L\+I\+M\+I\+T\+E\+D\+\_\+\+P\+E\+R\+I\+O\+D(4)}\+: License use in limited period.
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+D\+I\+F\+F\+\_\+\+D\+E\+V\+I\+C\+E\+S(5)}\+: Same license used in different devices at the same time.
\item {\ttfamily L\+I\+C\+E\+N\+S\+E\+\_\+\+E\+R\+R\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L(99)}\+: S\+DK internal error. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6b9a1f4de49ef268b2be15b269ee7c47}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6b9a1f4de49ef268b2be15b269ee7c47}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioVolumeIndication@{onAudioVolumeIndication}}
\index{onAudioVolumeIndication@{onAudioVolumeIndication}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioVolumeIndication()}{onAudioVolumeIndication()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Volume\+Indication (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_audio_volume_info}{Audio\+Volume\+Info}}\mbox{[}$\,$\mbox{]}}]{speakers,  }\item[{int}]{total\+Volume }\end{DoxyParamCaption})}



Reports the volume information of users. 

By default, this callback is disabled. You can enable it by calling {\ttfamily enable\+Audio\+Volume\+Indication}. Once this callback is enabled and users send streams in the channel, the S\+DK triggers the {\ttfamily on\+Audio\+Volume\+Indication} callback according to the time interval set in {\ttfamily enable\+Audio\+Volume\+Indication}. The S\+DK triggers two independent {\ttfamily on\+Audio\+Volume\+Indication} callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.

\begin{DoxyNote}{Note}
Once this callback is enabled, if the local user calls the {\ttfamily mute\+Local\+Audio\+Stream} method to mute, the S\+DK continues to report the volume indication of the local user. If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user\textquotesingle{}s information; if all remote users stop publishing audio streams for 20 seconds, the S\+DK stops triggering the callback for remote users.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em speakers} & The volume information of the users. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_audio_volume_info}{Audio\+Volume\+Info}}}. An empty {\ttfamily speakers} array in the callback indicates that no remote user is in the channel or is sending a stream. \\
\hline
{\em total\+Volume} & The volume of the speaker. The value range is \mbox{[}0,255\mbox{]}.
\begin{DoxyItemize}
\item In the callback for the local user, {\ttfamily total\+Volume} is the volume of the local user who sends a stream.
\item In the callback for remote users, {\ttfamily total\+Volume} is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest. If the user calls {\ttfamily start\+Audio\+Mixing(\+String file\+Path, boolean loopback, int cycle, int start\+Pos)} , then {\ttfamily total\+Volume} is the volume after audio mixing. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a150869ac2672bc1af7ba9f8fc4d10570}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a150869ac2672bc1af7ba9f8fc4d10570}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onActiveSpeaker@{onActiveSpeaker}}
\index{onActiveSpeaker@{onActiveSpeaker}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onActiveSpeaker()}{onActiveSpeaker()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Active\+Speaker (\begin{DoxyParamCaption}\item[{int}]{uid }\end{DoxyParamCaption})}



Occurs when the most active remote speaker is detected. 

After a successful call of {\ttfamily enable\+Audio\+Volume\+Indication}, the S\+DK continuously detects which remote user has the loudest volume. During the current period, the remote user whose volume is detected as the loudest for the most times, is the most active user. When the number of users is no less than two and an active remote speaker exists, the S\+DK triggers this callback and reports the {\ttfamily uid} of the most active remote speaker.
\begin{DoxyItemize}
\item If the most active remote speaker is always the same user, the S\+DK triggers the {\ttfamily on\+Active\+Speaker} callback only once.
\item If the most active remote speaker changes to another user, the S\+DK triggers this callback again and reports the {\ttfamily uid} of the new active remote speaker.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the most active speaker. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac14aad764dc710a05b6cad4c3838c706}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac14aad764dc710a05b6cad4c3838c706}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onVideoStopped@{onVideoStopped}}
\index{onVideoStopped@{onVideoStopped}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onVideoStopped()}{onVideoStopped()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Video\+Stopped (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the video stops playing. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000020}{Deprecated}}]Use \mbox{\hyperlink{}{on\+Local\+Video\+State\+Changed}} instead.\end{DoxyRefDesc}


The application can use this callback to change the configuration of the {\ttfamily view} (for example, displaying other pictures in the view) after the video stops playing. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a18073dc2bcd1e4a4df8f741014fc3106}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a18073dc2bcd1e4a4df8f741014fc3106}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstLocalVideoFrame@{onFirstLocalVideoFrame}}
\index{onFirstLocalVideoFrame@{onFirstLocalVideoFrame}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstLocalVideoFrame()}{onFirstLocalVideoFrame()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Local\+Video\+Frame (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{int}]{width,  }\item[{int}]{height,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the first local video frame is displayed on the local video view. 

The S\+DK triggers this callback when the first local video frame is displayed on the local video view.


\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em width} & The width (px) of the first local video frame. \\
\hline
{\em height} & The height (px) of the first local video frame. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(\+String token, String channel\+Id, int uid, Channel\+Media\+Options options)} to join the channel to when the S\+DK triggers this callback. If {\ttfamily start\+Preview()} / {\ttfamily start\+Preview(\mbox{\hyperlink{enumio_1_1agora_1_1rtc2_1_1_constants_1_1_video_source_type}{Constants.\+Video\+Source\+Type}} source\+Type)} is called before joining the channel, this parameter indicates the time elapsed from calling {\ttfamily start\+Preview()} or {\ttfamily start\+Preview(\mbox{\hyperlink{enumio_1_1agora_1_1rtc2_1_1_constants_1_1_video_source_type}{Constants.\+Video\+Source\+Type}} source\+Type)} to when this event occurred. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5cb5cf5ecef5eb955c65959620c843e3}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5cb5cf5ecef5eb955c65959620c843e3}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstLocalVideoFramePublished@{onFirstLocalVideoFramePublished}}
\index{onFirstLocalVideoFramePublished@{onFirstLocalVideoFramePublished}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstLocalVideoFramePublished()}{onFirstLocalVideoFramePublished()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Local\+Video\+Frame\+Published (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the first video frame is published. 

The S\+DK triggers this callback under one of the following circumstances\+:
\begin{DoxyItemize}
\item The local client enables the video module and calls {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} to join the channel successfully.
\item The local client calls {\ttfamily mute\+Local\+Video\+Stream} ({\ttfamily true}) and {\ttfamily mute\+Local\+Video\+Stream} ({\ttfamily false}) in sequence.
\item The local client calls {\ttfamily disable\+Video} and {\ttfamily enable\+Video} in sequence.
\item The local client calls {\ttfamily push\+External\+Video\+Frame\+By\+Id(\+Agora\+Video\+Frame frame, int video\+Track\+Id)} to successfully push the video frame to the S\+DK.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em elapsed} & Time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until this callback is triggered. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab63e6aa894c685a766fc6e81711c68e6}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab63e6aa894c685a766fc6e81711c68e6}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstRemoteVideoDecoded@{onFirstRemoteVideoDecoded}}
\index{onFirstRemoteVideoDecoded@{onFirstRemoteVideoDecoded}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstRemoteVideoDecoded()}{onFirstRemoteVideoDecoded()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Remote\+Video\+Decoded (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{width,  }\item[{int}]{height,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the first remote video frame is received and decoded. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000021}{Deprecated}}]This callback is deprecated. Use {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+R\+T\+I\+N\+G(1)} or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+E\+C\+O\+D\+I\+N\+G(2)} in the \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5daae97f78becbf71dc3dbfd494f8419}{on\+Remote\+Video\+State\+Changed}} callback instead.\end{DoxyRefDesc}


The S\+DK triggers this callback under one of the following circumstances\+:
\begin{DoxyItemize}
\item The remote user joins the channel and sends the video stream.
\item The remote user stops sending the video stream and re-\/sends it after 15 seconds. Reasons for such an interruption include\+:
\begin{DoxyItemize}
\item The remote user leaves the channel.
\item The remote user drops offline.
\item The remote user calls {\ttfamily disable\+Video} to disable video.
\end{DoxyItemize}
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user sending the video stream. \\
\hline
{\em width} & The width (px) of the video stream. \\
\hline
{\em height} & The height (px) of the video stream. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(\+String token, String channel\+Id, int uid, Channel\+Media\+Options options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a753cffdbf678f94a2b07495dd02cc4f2}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a753cffdbf678f94a2b07495dd02cc4f2}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstRemoteVideoFrame@{onFirstRemoteVideoFrame}}
\index{onFirstRemoteVideoFrame@{onFirstRemoteVideoFrame}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstRemoteVideoFrame()}{onFirstRemoteVideoFrame()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Remote\+Video\+Frame (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{width,  }\item[{int}]{height,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the renderer receives the first frame of the remote video. 

\begin{DoxyNote}{Note}
This callback is only triggered when the video frame is rendered by the S\+DK; it will not be triggered if the user employs custom video rendering.\+You need to implement this independently using methods outside the S\+DK.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user sending the video stream. \\
\hline
{\em width} & The width (px) of the video stream. \\
\hline
{\em height} & The height (px) of the video stream. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, String optional\+Info, int uid)} or {\ttfamily join\+Channel(\+String token, String channel\+Id, int uid, Channel\+Media\+Options options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2854027a99209da1cc0efa46c54211b4}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2854027a99209da1cc0efa46c54211b4}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserMuteAudio@{onUserMuteAudio}}
\index{onUserMuteAudio@{onUserMuteAudio}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserMuteAudio()}{onUserMuteAudio()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Mute\+Audio (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{boolean}]{muted }\end{DoxyParamCaption})}



Occurs when a remote user (in the communication profile) or a host (in the live streaming profile) stops/resumes sending the audio stream. 

The S\+DK triggers this callback when the remote user stops or resumes sending the audio stream by calling the {\ttfamily mute\+Local\+Audio\+Stream} method.

\begin{DoxyNote}{Note}
This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 32.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The user ID. \\
\hline
{\em muted} & Whether the remote user\textquotesingle{}s audio stream is muted\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: User\textquotesingle{}s audio stream is muted.
\item {\ttfamily false}\+: User\textquotesingle{}s audio stream is unmuted. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9b5ec64a801ee3442a0aeab35c5d059b}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9b5ec64a801ee3442a0aeab35c5d059b}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserMuteVideo@{onUserMuteVideo}}
\index{onUserMuteVideo@{onUserMuteVideo}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserMuteVideo()}{onUserMuteVideo()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Mute\+Video (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{boolean}]{muted }\end{DoxyParamCaption})}



Occurs when a remote user stops or resumes publishing the video stream. 

When a remote user calls {\ttfamily mute\+Local\+Video\+Stream} to stop or resume publishing the video stream, the S\+DK triggers this callback to report to the local user the state of the streams published by the remote user.

\begin{DoxyNote}{Note}
This callback can be inaccurate when the number of users (in the communication profile) or hosts (in the live streaming profile) in a channel exceeds 32.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em muted} & Whether the remote user stops publishing the video stream\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: The remote user stops publishing the video stream.
\item {\ttfamily false}\+: The remote user resumes publishing the video stream. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aebce7065ea48abbdb6001fec7a00c1ac}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aebce7065ea48abbdb6001fec7a00c1ac}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserEnableVideo@{onUserEnableVideo}}
\index{onUserEnableVideo@{onUserEnableVideo}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserEnableVideo()}{onUserEnableVideo()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Enable\+Video (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{boolean}]{enabled }\end{DoxyParamCaption})}



Occurs when a remote user enables or disables the video module. 

Once the video module is disabled, the user can only use a voice call. The user cannot send or receive any video. The S\+DK triggers this callback when a remote user enables or disables the video module by calling the {\ttfamily enable\+Video} or {\ttfamily disable\+Video} method.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em enabled} & -\/ {\ttfamily true}\+: The video module is enabled.
\begin{DoxyItemize}
\item {\ttfamily false}\+: The video module is disabled. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9e43e9e2b70a0d4b20a0e0313a734c90}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9e43e9e2b70a0d4b20a0e0313a734c90}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUserEnableLocalVideo@{onUserEnableLocalVideo}}
\index{onUserEnableLocalVideo@{onUserEnableLocalVideo}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUserEnableLocalVideo()}{onUserEnableLocalVideo()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+User\+Enable\+Local\+Video (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{boolean}]{enabled }\end{DoxyParamCaption})}



Occurs when a specific remote user enables/disables the local video capturing function. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000022}{Deprecated}}]This callback is deprecated and replaced by the \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5daae97f78becbf71dc3dbfd494f8419}{on\+Remote\+Video\+State\+Changed}} callback with the following parameters\+:
\begin{DoxyItemize}
\item {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+E\+D(0)} and {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+M\+U\+T\+E\+D(5)}.
\item {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+E\+C\+O\+D\+I\+N\+G(2)} and {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+U\+N\+M\+U\+T\+E\+D(6)}.
\end{DoxyItemize}\end{DoxyRefDesc}


The S\+DK triggers this callback when the remote user resumes or stops capturing the video stream by calling the {\ttfamily enable\+Local\+Video} method.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em enabled} & Whether the specified remote user enables/disables local video capturing\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: The video module is enabled. Other users in the channel can see the video of this remote user.
\item {\ttfamily false}\+: The video module is disabled. Other users in the channel can no longer receive the video stream from this remote user, while this remote user can still receive the video streams from other users. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a729049a110c6a1b7e951c8a9a5cc32c9}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a729049a110c6a1b7e951c8a9a5cc32c9}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onVideoSizeChanged@{onVideoSizeChanged}}
\index{onVideoSizeChanged@{onVideoSizeChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onVideoSizeChanged()}{onVideoSizeChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Video\+Size\+Changed (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{int}]{uid,  }\item[{int}]{width,  }\item[{int}]{height,  }\item[{int}]{rotation }\end{DoxyParamCaption})}



Occurs when the video size or rotation of a specified user changes. 


\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em uid} & The ID of the user whose video size or rotation changes. (The {\ttfamily uid} for the local user is 0. The video is the local user\textquotesingle{}s video preview). \\
\hline
{\em width} & The width (pixels) of the video stream. \\
\hline
{\em height} & The height (pixels) of the video stream. \\
\hline
{\em rotation} & The rotation information. The value range is \mbox{[}0,360). \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8abb48195f676e5730339ed0ad0f8dc1}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8abb48195f676e5730339ed0ad0f8dc1}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteAudioStateChanged@{onRemoteAudioStateChanged}}
\index{onRemoteAudioStateChanged@{onRemoteAudioStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteAudioStateChanged()}{onRemoteAudioStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Audio\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{state,  }\item[{int}]{reason,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the remote audio state changes. 

When the audio state of a remote user (in a voice/video call channel) or host (in a live streaming channel) changes, the S\+DK triggers this callback to report the current state of the remote audio stream.

\begin{DoxyNote}{Note}
This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 32.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user whose audio state changes. \\
\hline
{\em state} & Remote audio states.
\begin{DoxyItemize}
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+ED (0)\+: The remote audo is in the initial state. The S\+DK reports this state in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+U\+T\+ED}, {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+M\+U\+T\+ED}, or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+O\+F\+F\+L\+I\+NE}.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+R\+T\+I\+NG (1)\+: The first remote audio packet is received.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+E\+C\+O\+D\+I\+NG (2)\+: The remote audio stream is decoded and plays normally. The S\+DK reports this state in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY}, {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+U\+N\+M\+U\+T\+ED} or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+U\+N\+M\+U\+T\+ED}.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+R\+O\+Z\+EN (3)\+: The remote audio is frozen. The S\+DK reports this state in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+C\+O\+N\+G\+E\+S\+T\+I\+ON}.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (4)\+: The remote audio fails to start. The S\+DK reports this state in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+N\+AL}. 
\end{DoxyItemize}\\
\hline
{\em reason} & The reason of the remote audio state change.
\begin{DoxyItemize}
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+N\+AL (0)\+: The S\+DK reports this reason when the audio state changes.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+C\+O\+N\+G\+E\+S\+T\+I\+ON (1)\+: Network congestion.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY (2)\+: Network recovery.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+U\+T\+ED (3)\+: The local user stops receiving the remote audio stream or disables the audio module.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+U\+N\+M\+U\+T\+ED (4)\+: The local user resumes receiving the remote audio stream or enables the audio module.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+M\+U\+T\+ED (5)\+: The remote user stops sending the audio stream or disables the audio module.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+U\+N\+M\+U\+T\+ED (6)\+: The remote user resumes sending the audio stream or enables the audio module.
\item R\+E\+M\+O\+T\+E\+\_\+\+A\+U\+D\+I\+O\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+O\+F\+F\+L\+I\+NE (7)\+: The remote user leaves the channel. 
\end{DoxyItemize}\\
\hline
{\em elapsed} & Time elapsed (ms) from the local user calling the {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} method until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad6a5250389c780cb6e37b9534822a27b}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad6a5250389c780cb6e37b9534822a27b}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioPublishStateChanged@{onAudioPublishStateChanged}}
\index{onAudioPublishStateChanged@{onAudioPublishStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioPublishStateChanged()}{onAudioPublishStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Publish\+State\+Changed (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{old\+State,  }\item[{int}]{new\+State,  }\item[{int}]{elapse\+Since\+Last\+State }\end{DoxyParamCaption})}



Occurs when the audio publishing state changes. 


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em old\+State} & The previous publishing state. See {\ttfamily S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+TE}. \\
\hline
{\em new\+State} & The current publishing stat. See {\ttfamily S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+TE}. \\
\hline
{\em elapse\+Since\+Last\+State} & The time elapsed (ms) from the previous state to the current state. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_afaeef3162faac616eda2f18bfbd5f214}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_afaeef3162faac616eda2f18bfbd5f214}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onVideoPublishStateChanged@{onVideoPublishStateChanged}}
\index{onVideoPublishStateChanged@{onVideoPublishStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onVideoPublishStateChanged()}{onVideoPublishStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Video\+Publish\+State\+Changed (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{String}]{channel,  }\item[{int}]{old\+State,  }\item[{int}]{new\+State,  }\item[{int}]{elapse\+Since\+Last\+State }\end{DoxyParamCaption})}



Occurs when the video publishing state changes. 


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em old\+State} & The previous publishing state. See {\ttfamily S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+TE}. \\
\hline
{\em new\+State} & The current publishing stat. See {\ttfamily S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+TE}. \\
\hline
{\em elapse\+Since\+Last\+State} & The time elapsed (ms) from the previous state to the current state. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_af99f6ab9132fc82d8198fa325601dd9e}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_af99f6ab9132fc82d8198fa325601dd9e}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioSubscribeStateChanged@{onAudioSubscribeStateChanged}}
\index{onAudioSubscribeStateChanged@{onAudioSubscribeStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioSubscribeStateChanged()}{onAudioSubscribeStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Subscribe\+State\+Changed (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{uid,  }\item[{int}]{old\+State,  }\item[{int}]{new\+State,  }\item[{int}]{elapse\+Since\+Last\+State }\end{DoxyParamCaption})}



Occurs when the audio subscribing state changes. 


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em uid} & The user ID of the remote user. \\
\hline
{\em old\+State} & The previous subscription status.
\begin{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The initial subscribing state after joining the channel.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (1)\+: Fails to subscribe to the remote stream. Possible reasons\+:
\begin{DoxyItemize}
\item The remote user\+:
\begin{DoxyItemize}
\item Calls {\ttfamily mute\+Local\+Audio\+Stream} ({\ttfamily true}) to stop sending the local audio stream.
\item Calls {\ttfamily disable\+Audio} to disable the local audio module.
\item Calls {\ttfamily enable\+Local\+Audio} {\ttfamily false}) to disable the local audio capture.
\item The role of the remote user is audience.
\end{DoxyItemize}
\item The local user calls the following methods to stop receiving the remote audio streams\+:
\begin{DoxyItemize}
\item Sets {\ttfamily auto\+Subscribe\+Audio} to {\ttfamily false} when calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} or {\ttfamily update\+Channel\+Media\+Options}, which means not to automatically subscribe to any audio streams.
\item Sets {\ttfamily muted} to {\ttfamily true} when calling {\ttfamily mute\+Remote\+Audio\+Stream} or {\ttfamily mute\+All\+Remote\+Audio\+Streams}, which means stopping receiving the remote video streams.
\end{DoxyItemize}
\end{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+I\+NG (2)\+: Subscribing.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (3)\+: The remote stream is received, and the subscription is successful. 
\end{DoxyItemize}\\
\hline
{\em new\+State} & The current subscribing status.
\begin{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The initial subscribing state after joining the channel.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (1)\+: Fails to subscribe to the remote stream. Possible reasons\+:
\begin{DoxyItemize}
\item The remote user\+:
\begin{DoxyItemize}
\item Calls {\ttfamily mute\+Local\+Audio\+Stream} ({\ttfamily true}) to stop sending the local audio stream.
\item Calls {\ttfamily disable\+Audio} to disable the local audio module.
\item Calls {\ttfamily enable\+Local\+Audio} {\ttfamily false}) to disable the local audio capture.
\item The role of the remote user is audience.
\end{DoxyItemize}
\item The local user calls the following methods to stop receiving the remote audio streams\+:
\begin{DoxyItemize}
\item Sets {\ttfamily auto\+Subscribe\+Audio} to {\ttfamily false} when calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} or {\ttfamily update\+Channel\+Media\+Options}, which means not to automatically subscribe to any audio streams.
\item Sets {\ttfamily muted} to {\ttfamily true} when calling {\ttfamily mute\+Remote\+Audio\+Stream} or {\ttfamily mute\+All\+Remote\+Audio\+Streams}, which means stopping receiving the remote video streams.
\end{DoxyItemize}
\end{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+I\+NG (2)\+: Subscribing.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (3)\+: The remote stream is received, and the subscription is successful. 
\end{DoxyItemize}\\
\hline
{\em elapse\+Since\+Last\+State} & The time elapsed (ms) from the previous state to the current state. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a83dc1b71944119fd1f78055a9ca7f8ab}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a83dc1b71944119fd1f78055a9ca7f8ab}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onVideoSubscribeStateChanged@{onVideoSubscribeStateChanged}}
\index{onVideoSubscribeStateChanged@{onVideoSubscribeStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onVideoSubscribeStateChanged()}{onVideoSubscribeStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Video\+Subscribe\+State\+Changed (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{uid,  }\item[{int}]{old\+State,  }\item[{int}]{new\+State,  }\item[{int}]{elapse\+Since\+Last\+State }\end{DoxyParamCaption})}



Occurs when the video subscribing state changes. 


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em uid} & The user ID of the remote user. \\
\hline
{\em old\+State} & The previous subscription status.
\begin{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The initial subscribing state after joining the channel.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (1)\+: Fails to subscribe to the remote stream. Possible reasons\+:
\begin{DoxyItemize}
\item The remote user\+:
\begin{DoxyItemize}
\item Calls {\ttfamily mute\+Local\+Video\+Stream} ({\ttfamily true}) to stop sending the local video streams.
\item Calls {\ttfamily disable\+Video} to disable the local video module.
\item Calls {\ttfamily enable\+Local\+Video} ({\ttfamily false}) to disable the local video capture.
\item The role of the remote user is audience.
\end{DoxyItemize}
\item The local user calls the following methods to stop receiving the remote media stream\+:
\begin{DoxyItemize}
\item Sets {\ttfamily auto\+Subscribe\+Video} to {\ttfamily false} when calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} or {\ttfamily update\+Channel\+Media\+Options}, which means not to automatically subscribe to any video streams.
\item Sets {\ttfamily muted} to {\ttfamily true} when calling {\ttfamily mute\+Remote\+Video\+Stream} or {\ttfamily mute\+All\+Remote\+Video\+Streams}, which means stopping receiving the remote video streams.
\end{DoxyItemize}
\end{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+I\+NG (2)\+: Subscribing.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (3)\+: The remote stream is received, and the subscription is successful. 
\end{DoxyItemize}\\
\hline
{\em new\+State} & The current subscribing status.
\begin{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The initial subscribing state after joining the channel.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+N\+O\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (1)\+: Fails to subscribe to the remote stream. Possible reasons\+:
\begin{DoxyItemize}
\item The remote user\+:
\begin{DoxyItemize}
\item Calls {\ttfamily mute\+Local\+Video\+Stream} ({\ttfamily true}) to stop sending the local video streams.
\item Calls {\ttfamily disable\+Video} to disable the local video module.
\item Calls {\ttfamily enable\+Local\+Video} ({\ttfamily false}) to disable the local video capture.
\item The role of the remote user is audience.
\end{DoxyItemize}
\item The local user calls the following methods to stop receiving the remote media stream\+:
\begin{DoxyItemize}
\item Sets {\ttfamily auto\+Subscribe\+Video} to {\ttfamily false} when calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} or {\ttfamily update\+Channel\+Media\+Options}, which means not to automatically subscribe to any video streams.
\item Sets {\ttfamily muted} to {\ttfamily true} when calling {\ttfamily mute\+Remote\+Video\+Stream} or {\ttfamily mute\+All\+Remote\+Video\+Streams}, which means stopping receiving the remote video streams.
\end{DoxyItemize}
\end{DoxyItemize}
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+I\+NG (2)\+: Subscribing.
\item S\+U\+B\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+U\+B\+S\+C\+R\+I\+B\+ED (3)\+: The remote stream is received, and the subscription is successful. 
\end{DoxyItemize}\\
\hline
{\em elapse\+Since\+Last\+State} & The time elapsed (ms) from the previous state to the current state. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5daae97f78becbf71dc3dbfd494f8419}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5daae97f78becbf71dc3dbfd494f8419}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteVideoStateChanged@{onRemoteVideoStateChanged}}
\index{onRemoteVideoStateChanged@{onRemoteVideoStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteVideoStateChanged()}{onRemoteVideoStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Video\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{state,  }\item[{int}]{reason,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the remote video stream state changes. 

\begin{DoxyNote}{Note}
This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 32.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user whose video state changes. \\
\hline
{\em state} & The state of the remote video\+:
\begin{DoxyItemize}
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+ED (0)\+: The remote video is in the initial state. This state is reported in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+U\+T\+ED} (3), {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+M\+U\+T\+ED} (5), or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+O\+F\+F\+L\+I\+NE} (7).
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+A\+R\+T\+I\+NG (1)\+: The first remote video packet is received.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+E\+C\+O\+D\+I\+NG (2)\+: The remote video stream is decoded and plays normally. This state is reported in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY} (2), {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+U\+N\+M\+U\+T\+ED} (4), {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+U\+N\+M\+U\+T\+ED} (6), or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY} (9).
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+R\+O\+Z\+EN (3)\+: The remote video is frozen. This state is reported in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+C\+O\+N\+G\+E\+S\+T\+I\+ON} (1) or {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+A\+L\+L\+B\+A\+CK} (8).
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (4)\+: The remote video fails to start. The S\+DK reports this state in the case of {\ttfamily R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+N\+AL} (0). 
\end{DoxyItemize}\\
\hline
{\em reason} & The reason for the remote video state change\+:
\begin{DoxyItemize}
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+N\+AL (0)\+: Internal reasons.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+C\+O\+N\+G\+E\+S\+T\+I\+ON (1)\+: Network congestion.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+W\+O\+R\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY (2)\+: Network recovery.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+M\+U\+T\+ED (3)\+: The local user stops receiving the remote video stream or disables the video module.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+L\+O\+C\+A\+L\+\_\+\+U\+N\+M\+U\+T\+ED (4)\+: The local user resumes receiving the remote video stream or enables the video module.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+M\+U\+T\+ED (5)\+: The remote user stops sending the video stream or disables the video module.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+U\+N\+M\+U\+T\+ED (6)\+: The remote user resumes sending the video stream or enables the video module.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+M\+O\+T\+E\+\_\+\+O\+F\+F\+L\+I\+NE (7)\+: The remote user leaves the channel.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+A\+L\+L\+B\+A\+CK (8)\+: The remote media stream falls back to the audio-\/only stream due to poor network conditions.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+C\+O\+V\+E\+RY (9)\+: The remote media stream switches back to the video stream after the network conditions improve.
\item R\+E\+M\+O\+T\+E\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+O\+D\+E\+C\+\_\+\+N\+O\+T\+\_\+\+S\+U\+P\+P\+O\+RT (13)\+: The local video decoder does not support decoding the remote video stream. 
\end{DoxyItemize}\\
\hline
{\em elapsed} & Time elapsed (ms) from the local user calling the {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} method until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3d4f978004d0666f26345810dcfe73ac}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3d4f978004d0666f26345810dcfe73ac}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onChannelMediaRelayStateChanged@{onChannelMediaRelayStateChanged}}
\index{onChannelMediaRelayStateChanged@{onChannelMediaRelayStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onChannelMediaRelayStateChanged()}{onChannelMediaRelayStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Channel\+Media\+Relay\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{state,  }\item[{int}]{code }\end{DoxyParamCaption})}



Occurs when the state of the media stream relay changes. 

The S\+DK returns the state of the current media relay with any error message.


\begin{DoxyParams}{Parameters}
{\em state} & The state code\+:
\begin{DoxyItemize}
\item R\+E\+L\+A\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The S\+DK is initializing.
\item R\+E\+L\+A\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG (1)\+: The S\+DK tries to relay the media stream to the destination channel.
\item R\+E\+L\+A\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+U\+N\+N\+I\+NG (2)\+: The S\+DK successfully relays the media stream to the destination channel.
\item R\+E\+L\+A\+Y\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+U\+RE (3)\+: An error occurs. See {\ttfamily code} for the error code. 
\end{DoxyItemize}\\
\hline
{\em code} & The error code of the channel media relay.
\begin{DoxyItemize}
\item R\+E\+L\+A\+Y\+\_\+\+OK (0)\+: Everything is normal.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+E\+R\+R\+O\+R\+\_\+\+R\+E\+S\+P\+O\+N\+SE (1)\+: An error occurs in the server response.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+N\+O\+\_\+\+R\+E\+S\+P\+O\+N\+SE (2)\+: No server response. This error may be caused by poor network connections. If this error occurs when initiating a channel media relay, you can try again later; if this error occurs during channel media relay, you can call {\ttfamily leave\+Channel(\+Leave\+Channel\+Options options)} to leave the channel. This error can also occur if the channel media relay service is not enabled in the project. You can contact {\ttfamily technical support} to enable the service.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+\_\+\+R\+E\+S\+O\+U\+R\+C\+E\+\_\+\+A\+V\+A\+I\+L\+A\+B\+LE (3)\+: The S\+DK fails to access the service, probably due to limited resources of the server.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+J\+O\+I\+N\+\_\+\+S\+RC 4\+: The server fails to send the relay request.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+J\+O\+I\+N\+\_\+\+D\+E\+ST 5\+: The server fails to accept the relay request.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+C\+E\+I\+V\+E\+D\+\_\+\+F\+R\+O\+M\+\_\+\+S\+RC 6\+: The server fails to receive the media stream.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+N\+T\+\_\+\+T\+O\+\_\+\+D\+E\+ST 7\+: The server fails to send the media stream.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+L\+O\+ST (8)\+: The S\+DK disconnects from the server due to poor network connections. You can call {\ttfamily leave\+Channel(\+Leave\+Channel\+Options options)} to leave the channel.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L\+\_\+\+E\+R\+R\+OR (9)\+: An internal error occurs in the server.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+S\+R\+C\+\_\+\+T\+O\+K\+E\+N\+\_\+\+E\+X\+P\+I\+R\+ED (10)\+: The token of the source channel has expired.
\item R\+E\+L\+A\+Y\+\_\+\+E\+R\+R\+O\+R\+\_\+\+D\+E\+S\+T\+\_\+\+T\+O\+K\+E\+N\+\_\+\+E\+X\+P\+I\+R\+ED (11)\+: The token of the destination channel has expired. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac12497babde9ba725c873ba3b1fe76ab}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac12497babde9ba725c873ba3b1fe76ab}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstLocalAudioFramePublished@{onFirstLocalAudioFramePublished}}
\index{onFirstLocalAudioFramePublished@{onFirstLocalAudioFramePublished}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstLocalAudioFramePublished()}{onFirstLocalAudioFramePublished()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Local\+Audio\+Frame\+Published (\begin{DoxyParamCaption}\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the first audio frame is published. 

The S\+DK triggers this callback under one of the following circumstances\+:
\begin{DoxyItemize}
\item The local client enables the audio module and calls {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} successfully.
\item The local client calls {\ttfamily mute\+Local\+Audio\+Stream} ({\ttfamily true}) and {\ttfamily mute\+Local\+Audio\+Stream} ({\ttfamily false}) in sequence.
\item The local client calls {\ttfamily disable\+Audio} and {\ttfamily enable\+Audio} in sequence.
\item The local client calls {\ttfamily push\+External\+Audio\+Frame} to successfully push the audio frame to the S\+DK.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em elapsed} & Time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5203b66a93abb63596c23764c587292a}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5203b66a93abb63596c23764c587292a}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstRemoteAudioFrame@{onFirstRemoteAudioFrame}}
\index{onFirstRemoteAudioFrame@{onFirstRemoteAudioFrame}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstRemoteAudioFrame()}{onFirstRemoteAudioFrame()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Remote\+Audio\+Frame (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the S\+DK receives the first audio frame from a specific remote user. 


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95ad49d36d9934ba78763fcb0ab2a91d}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95ad49d36d9934ba78763fcb0ab2a91d}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFirstRemoteAudioDecoded@{onFirstRemoteAudioDecoded}}
\index{onFirstRemoteAudioDecoded@{onFirstRemoteAudioDecoded}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFirstRemoteAudioDecoded()}{onFirstRemoteAudioDecoded()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+First\+Remote\+Audio\+Decoded (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Occurs when the S\+DK decodes the first remote audio frame for playback. 

The S\+DK triggers this callback under one of the following circumstances\+:
\begin{DoxyItemize}
\item The remote user joins the channel and sends the audio stream for the first time.
\item The remote user\textquotesingle{}s audio is offline and then goes online to re-\/send audio. It means the local user cannot receive audio in 15 seconds. Reasons for such an interruption include\+:
\begin{DoxyItemize}
\item The remote user leaves channel.
\item The remote user drops offline.
\item The remote user calls {\ttfamily mute\+Local\+Audio\+Stream} to stop sending the audio stream.
\item The remote user calls {\ttfamily disable\+Audio} to disable audio.
\end{DoxyItemize}
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em elapsed} & The time elapsed (ms) from the local user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until the S\+DK triggers this callback. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a738e8d63f1960cc94943c5636eb43c63}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a738e8d63f1960cc94943c5636eb43c63}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteSubscribeFallbackToAudioOnly@{onRemoteSubscribeFallbackToAudioOnly}}
\index{onRemoteSubscribeFallbackToAudioOnly@{onRemoteSubscribeFallbackToAudioOnly}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteSubscribeFallbackToAudioOnly()}{onRemoteSubscribeFallbackToAudioOnly()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Subscribe\+Fallback\+To\+Audio\+Only (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{boolean}]{is\+Fallback\+Or\+Recover }\end{DoxyParamCaption})}



Occurs when the remote media stream falls back to the audio-\/only stream due to poor network conditions or switches back to the video stream after the network conditions improve. 

If you call {\ttfamily set\+Remote\+Subscribe\+Fallback\+Option(int option)} and set {\ttfamily option} to {\ttfamily S\+T\+R\+E\+A\+M\+\_\+\+F\+A\+L\+L\+B\+A\+C\+K\+\_\+\+O\+P\+T\+I\+O\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+O\+N\+LY}, the S\+DK triggers this callback in the following situations\+:
\begin{DoxyItemize}
\item The downstream network condition is poor, and the subscribed video stream is downgraded to audio-\/only stream.
\item The downstream network condition has improved, and the subscribed stream has been restored to video stream.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
Once the remote media stream switches to the low-\/quality video stream due to weak network conditions, you can monitor the stream switch between a high-\/quality and low-\/quality stream in the {\ttfamily on\+Remote\+Video\+Stats} callback.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user. \\
\hline
{\em is\+Fallback\+Or\+Recover} & -\/ {\ttfamily true}\+: The subscribed media stream falls back to audio-\/only due to poor network conditions.
\begin{DoxyItemize}
\item {\ttfamily false}\+: The subscribed media stream switches back to the video stream after the network conditions improve. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9685280586a4fce917eac08257fdeaf9}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9685280586a4fce917eac08257fdeaf9}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioRouteChanged@{onAudioRouteChanged}}
\index{onAudioRouteChanged@{onAudioRouteChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioRouteChanged()}{onAudioRouteChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Route\+Changed (\begin{DoxyParamCaption}\item[{int}]{routing }\end{DoxyParamCaption})}



Occurs when the local audio route changes. 


\begin{DoxyParams}{Parameters}
{\em routing} & The current audio routing.
\begin{DoxyItemize}
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+D\+E\+F\+A\+U\+LT (-\/1)\+: The default audio route.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+H\+E\+A\+D\+S\+ET (0)\+: The audio route is a headset with a microphone.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+E\+A\+R\+P\+I\+E\+CE (1)\+: The audio route is an earpiece.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+H\+E\+A\+D\+S\+E\+T\+N\+O\+M\+IC (2)\+: The audio route is a headset without a microphone.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+S\+P\+E\+A\+K\+E\+R\+P\+H\+O\+NE (3)\+: The audio route is the speaker that comes with the device.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+L\+O\+U\+D\+S\+P\+E\+A\+K\+ER (4)\+: (For future use) The audio route is an external speaker.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+B\+L\+U\+E\+T\+O\+O\+T\+H\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+H\+FP (5)\+: The audio route is a Bluetooth device using the H\+FP protocol.
\item A\+U\+D\+I\+O\+\_\+\+R\+O\+U\+T\+E\+\_\+\+B\+L\+U\+E\+T\+O\+O\+T\+H\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+A2\+DP (10)\+: The audio route is a Bluetooth device using the A2\+DP protocol. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a23f6de603ad02640a06e7144a7fc6fe8}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a23f6de603ad02640a06e7144a7fc6fe8}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onCameraReady@{onCameraReady}}
\index{onCameraReady@{onCameraReady}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onCameraReady()}{onCameraReady()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Camera\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the camera turns on and is ready to capture the video. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000023}{Deprecated}}]Use \mbox{\hyperlink{}{on\+Local\+Video\+State\+Changed}} instead.\end{DoxyRefDesc}


This callback indicates that the camera has been successfully turned on and you can start to capture video. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a989f10ab210047ae44b9d21815b84cd5}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a989f10ab210047ae44b9d21815b84cd5}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onCameraFocusAreaChanged@{onCameraFocusAreaChanged}}
\index{onCameraFocusAreaChanged@{onCameraFocusAreaChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onCameraFocusAreaChanged()}{onCameraFocusAreaChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Camera\+Focus\+Area\+Changed (\begin{DoxyParamCaption}\item[{Rect}]{rect }\end{DoxyParamCaption})}



Occurs when the camera focus area changes. 

The S\+DK triggers this callback when the local user changes the camera focus position by calling {\ttfamily set\+Camera\+Focus\+Position\+In\+Preview}.


\begin{DoxyParams}{Parameters}
{\em rect} & The focus rectangle in the local preview. See {\ttfamily Rect}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_abb9832896d40cee749866375c84e753b}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_abb9832896d40cee749866375c84e753b}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onCameraExposureAreaChanged@{onCameraExposureAreaChanged}}
\index{onCameraExposureAreaChanged@{onCameraExposureAreaChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onCameraExposureAreaChanged()}{onCameraExposureAreaChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Camera\+Exposure\+Area\+Changed (\begin{DoxyParamCaption}\item[{Rect}]{rect }\end{DoxyParamCaption})}



Occurs when the camera exposure area changes. 

The S\+DK triggers this callback when the local user changes the camera exposure position by calling {\ttfamily set\+Camera\+Exposure\+Position}.


\begin{DoxyParams}{Parameters}
{\em rect} & The focus rectangle in the local preview. See {\ttfamily Rect}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a58207f39af3210fb9bcada00b72bfaf6}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a58207f39af3210fb9bcada00b72bfaf6}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onSnapshotTaken@{onSnapshotTaken}}
\index{onSnapshotTaken@{onSnapshotTaken}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onSnapshotTaken()}{onSnapshotTaken()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Snapshot\+Taken (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{String}]{file\+Path,  }\item[{int}]{width,  }\item[{int}]{height,  }\item[{int}]{err\+Code }\end{DoxyParamCaption})}



Reports the result of taking a video snapshot. 

After a successful {\ttfamily take\+Snapshot(int uid, String file\+Path)} method call, the S\+DK triggers this callback to report whether the snapshot is successfully taken as well as the details for the snapshot taken.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID. One {\ttfamily uid} of 0 indicates the local user. \\
\hline
{\em file\+Path} & The local path of the snapshot. \\
\hline
{\em width} & The width (px) of the snapshot. \\
\hline
{\em height} & The height (px) of the snapshot. \\
\hline
{\em err\+Code} & The message that confirms success or gives the reason why the snapshot is not successfully taken\+:
\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure\+:
\begin{DoxyItemize}
\item -\/1\+: The S\+DK fails to write data to a file or encode a J\+P\+EG image.
\item -\/2\+: The S\+DK does not find the video stream of the specified user within one second after the {\ttfamily take\+Snapshot(int uid, String file\+Path)} method call succeeds. The possible reasons are\+: local capture stops, remote end stops publishing, or video data processing is blocked.
\item -\/3\+: Calling the {\ttfamily take\+Snapshot(int uid, String file\+Path)} method too frequently. 
\end{DoxyItemize}
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2fbb5c93c21e84859c348d85884adc26}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a2fbb5c93c21e84859c348d85884adc26}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onFacePositionChanged@{onFacePositionChanged}}
\index{onFacePositionChanged@{onFacePositionChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onFacePositionChanged()}{onFacePositionChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Face\+Position\+Changed (\begin{DoxyParamCaption}\item[{int}]{image\+Width,  }\item[{int}]{image\+Height,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_agora_face_position_info}{Agora\+Face\+Position\+Info}}\mbox{[}$\,$\mbox{]}}]{face\+Rect\+Arr }\end{DoxyParamCaption})}



Reports the face detection result of the local user. 

Once you enable face detection by calling {\ttfamily enable\+Face\+Detection} {\ttfamily (true)}, you can get the following information on the local user in real-\/time\+:
\begin{DoxyItemize}
\item The width and height of the local video.
\item The position of the human face in the local view.
\item The distance between the human face and the screen. This value is based on the fitting calculation of the local video size and the position of the human face.
\end{DoxyItemize}

\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item When it is detected that the face in front of the camera disappears, the callback will be triggered immediately. When no human face is detected, the frequency of this callback to be triggered wil be decreased to reduce power consumption on the local device.
\item The S\+DK stops triggering this callback when a human face is in close proximity to the screen.
\item On Android, the value of distance reported in this callback may be slightly different from the actual {\ttfamily distance}. Therefore, Agora does not recommend using it for accurate calculation.
\end{DoxyItemize}
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em image\+Width} & The width (px) of the video image captured by the local camera. \\
\hline
{\em image\+Height} & The height (px) of the video image captured by the local camera. \\
\hline
{\em face\+Rect\+Arr} & Information of the detected face. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_agora_face_position_info}{Agora\+Face\+Position\+Info}}}. The number of {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_agora_face_position_info}{Agora\+Face\+Position\+Info}}} array reported in this callback is based on the faces detected. The length of the array can be 0, which means that no human face is detected in front of the camera. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab17fcf9e21edcff4a51ac1ff9e51279e}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab17fcf9e21edcff4a51ac1ff9e51279e}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioQuality@{onAudioQuality}}
\index{onAudioQuality@{onAudioQuality}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioQuality()}{onAudioQuality()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Quality (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{quality,  }\item[{short}]{delay,  }\item[{short}]{lost }\end{DoxyParamCaption})}



Reports the statistics of the audio stream sent by each remote user. 

The S\+DK triggers this callback once every two seconds to report the audio quality of each remote user who is sending an audio stream. If a channel has multiple users sending audio streams, the S\+DK triggers this callback as many times.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID of the remote user sending the audio stream. \\
\hline
{\em quality} & Audio quality of the user.
\begin{DoxyItemize}
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+U\+N\+K\+N\+O\+WN (0)\+: The quality is unknown.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+E\+X\+C\+E\+L\+L\+E\+NT (1)\+: The quality is excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+G\+O\+OD (2)\+: The network quality seems excellent, but the bitrate can be slightly lower than excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+P\+O\+OR (3)\+: Users can feel the communication is slightly impaired.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+B\+AD (4)\+: Users cannot communicate smoothly.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+V\+B\+AD (5)\+: The quality is so bad that users can barely communicate.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+O\+WN (6)\+: The network is down, and users cannot communicate at all.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+E\+T\+E\+C\+T\+I\+NG (8)\+: The last-\/mile probe test is in progress. 
\end{DoxyItemize}\\
\hline
{\em delay} & The network delay (ms) from the sender to the receiver, including the delay caused by audio sampling pre-\/processing, network transmission, and network jitter buffering. \\
\hline
{\em lost} & The packet loss rate (\%) of the audio packet sent from the remote user to the receiver. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476a17632eab584aa291aa869663d13}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476a17632eab584aa291aa869663d13}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRtcStats@{onRtcStats}}
\index{onRtcStats@{onRtcStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRtcStats()}{onRtcStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rtc\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the statistics about the current call. 

Call timing\+: The S\+DK triggers this callback once every two seconds after the user joins the channel.


\begin{DoxyParams}{Parameters}
{\em stats} & Statistics of the R\+TC engine. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_rtc_stats}{Rtc\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8b68b163b0b6f8bdbf2f52e320a04739}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8b68b163b0b6f8bdbf2f52e320a04739}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLastmileQuality@{onLastmileQuality}}
\index{onLastmileQuality@{onLastmileQuality}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLastmileQuality()}{onLastmileQuality()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Lastmile\+Quality (\begin{DoxyParamCaption}\item[{int}]{quality }\end{DoxyParamCaption})}



Reports the last-\/mile network quality of the local user. 

This callback reports the last-\/mile network conditions of the local user before the user joins the channel. Last mile refers to the connection between the local device and Agora\textquotesingle{}s edge server. Before the user joins the channel, this callback is triggered by the S\+DK once {\ttfamily start\+Lastmile\+Probe\+Test} is called and reports the last-\/mile network conditions of the local user.


\begin{DoxyParams}{Parameters}
{\em quality} & The last-\/mile network quality.
\begin{DoxyItemize}
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+U\+N\+K\+N\+O\+WN (0)\+: The quality is unknown.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+E\+X\+C\+E\+L\+L\+E\+NT (1)\+: The quality is excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+G\+O\+OD (2)\+: The network quality seems excellent, but the bitrate can be slightly lower than excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+P\+O\+OR (3)\+: Users can feel the communication is slightly impaired.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+B\+AD (4)\+: Users cannot communicate smoothly.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+V\+B\+AD (5)\+: The quality is so bad that users can barely communicate.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+O\+WN (6)\+: The network is down, and users cannot communicate at all.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+E\+T\+E\+C\+T\+I\+NG (8)\+: The last-\/mile probe test is in progress. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adc7bfb05ed741769a1436794926b1cf8}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_adc7bfb05ed741769a1436794926b1cf8}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLastmileProbeResult@{onLastmileProbeResult}}
\index{onLastmileProbeResult@{onLastmileProbeResult}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLastmileProbeResult()}{onLastmileProbeResult()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Lastmile\+Probe\+Result (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_lastmile_probe_result}{Lastmile\+Probe\+Result}}}]{result }\end{DoxyParamCaption})}



Reports the last mile network probe result. 

The S\+DK triggers this callback within 30 seconds after the app calls {\ttfamily start\+Lastmile\+Probe\+Test}.


\begin{DoxyParams}{Parameters}
{\em result} & The uplink and downlink last-\/mile network probe test result. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_lastmile_probe_result}{Lastmile\+Probe\+Result}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acdf01fd3da944feb847585c406d3d263}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acdf01fd3da944feb847585c406d3d263}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onNetworkQuality@{onNetworkQuality}}
\index{onNetworkQuality@{onNetworkQuality}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onNetworkQuality()}{onNetworkQuality()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Network\+Quality (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{tx\+Quality,  }\item[{int}]{rx\+Quality }\end{DoxyParamCaption})}



Reports the last mile network quality of each user in the channel. 

This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora\textquotesingle{}s edge server. The S\+DK triggers this callback once every two seconds. If a channel includes multiple users, the S\+DK triggers this callback as many times. This callback provides feedback on network quality through sending and receiving broadcast packets within the channel. Excessive broadcast packets can lead to broadcast storms. To prevent broadcast storms from causing a large amount of data transmission within the channel, this callback supports feedback on the network quality of up to 4 remote hosts simultaneously by default.

\begin{DoxyNote}{Note}
{\ttfamily tx\+Quality} is {\ttfamily U\+N\+K\+N\+O\+WN} when the user is not sending a stream; {\ttfamily rx\+Quality} is {\ttfamily U\+N\+K\+N\+O\+WN} when the user is not receiving a stream.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The user ID. The network quality of the user with this user ID is reported. If the uid is 0, the local network quality is reported. \\
\hline
{\em tx\+Quality} & Uplink network quality rating of the user in terms of the transmission bit rate, packet loss rate, average R\+TT (Round-\/\+Trip Time) and jitter of the uplink network. This parameter is a quality rating helping you understand how well the current uplink network conditions can support the selected video encoder configuration. For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution of 640 × 480 and a frame rate of 15 fps in the L\+I\+V\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+I\+NG profile, but might be inadequate for resolutions higher than 1280 × 720.
\begin{DoxyItemize}
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+U\+N\+K\+N\+O\+WN (0)\+: The quality is unknown.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+E\+X\+C\+E\+L\+L\+E\+NT (1)\+: The quality is excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+G\+O\+OD (2)\+: The network quality seems excellent, but the bitrate can be slightly lower than excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+P\+O\+OR (3)\+: Users can feel the communication is slightly impaired.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+B\+AD (4)\+: Users cannot communicate smoothly.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+V\+B\+AD (5)\+: The quality is so bad that users can barely communicate.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+O\+WN (6)\+: The network is down, and users cannot communicate at all.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+E\+T\+E\+C\+T\+I\+NG (8)\+: The last-\/mile probe test is in progress. 
\end{DoxyItemize}\\
\hline
{\em rx\+Quality} & Downlink network quality rating of the user in terms of packet loss rate, average R\+TT, and jitter of the downlink network.
\begin{DoxyItemize}
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+U\+N\+K\+N\+O\+WN (0)\+: The quality is unknown.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+E\+X\+C\+E\+L\+L\+E\+NT (1)\+: The quality is excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+G\+O\+OD (2)\+: The network quality seems excellent, but the bitrate can be slightly lower than excellent.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+P\+O\+OR (3)\+: Users can feel the communication is slightly impaired.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+B\+AD (4)\+: Users cannot communicate smoothly.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+V\+B\+AD (5)\+: The quality is so bad that users can barely communicate.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+O\+WN (6)\+: The network is down, and users cannot communicate at all.
\item Q\+U\+A\+L\+I\+T\+Y\+\_\+\+D\+E\+T\+E\+C\+T\+I\+NG (8)\+: The last-\/mile probe test is in progress. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a736bf4d46d2cbd018ec30c06156a2c5d}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a736bf4d46d2cbd018ec30c06156a2c5d}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalAudioStats@{onLocalAudioStats}}
\index{onLocalAudioStats@{onLocalAudioStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalAudioStats()}{onLocalAudioStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Audio\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_audio_stats}{Local\+Audio\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the statistics of the local audio stream. 

The S\+DK triggers this callback once every two seconds.


\begin{DoxyParams}{Parameters}
{\em stats} & Local audio statistics. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_audio_stats}{Local\+Audio\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab5180ba91a1c81c5470e2ec1a7e18a01}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab5180ba91a1c81c5470e2ec1a7e18a01}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalVideoStats@{onLocalVideoStats}}
\index{onLocalVideoStats@{onLocalVideoStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalVideoStats()}{onLocalVideoStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Video\+Stats (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_video_stats}{Local\+Video\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the statistics of the local video stream. 

The S\+DK triggers this callback once every two seconds to report the statistics of the local video stream.


\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em stats} & The statistics of the local video stream. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_local_video_stats}{Local\+Video\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aced11e711bdda1ea24415da27c5bc5fa}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aced11e711bdda1ea24415da27c5bc5fa}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteAudioStats@{onRemoteAudioStats}}
\index{onRemoteAudioStats@{onRemoteAudioStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteAudioStats()}{onRemoteAudioStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Audio\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_audio_stats}{Remote\+Audio\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the transport-\/layer statistics of each remote audio stream. 

The S\+DK triggers this callback once every two seconds for each remote user who is sending audio streams. If a channel includes multiple remote users, the S\+DK triggers this callback as many times.


\begin{DoxyParams}{Parameters}
{\em stats} & The statistics of the received remote audio streams. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_audio_stats}{Remote\+Audio\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7f00d7a396872dc02008ea5f7487917e}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7f00d7a396872dc02008ea5f7487917e}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteVideoStats@{onRemoteVideoStats}}
\index{onRemoteVideoStats@{onRemoteVideoStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteVideoStats()}{onRemoteVideoStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Video\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_video_stats}{Remote\+Video\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the statistics of the video stream sent by each remote users. 

Reports the statistics of the video stream from the remote users. The S\+DK triggers this callback once every two seconds for each remote user. If a channel has multiple users/hosts sending video streams, the S\+DK triggers this callback as many times.


\begin{DoxyParams}{Parameters}
{\em stats} & Statistics of the remote video stream. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_remote_video_stats}{Remote\+Video\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9af3b09098b1034319184103157b90db}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a9af3b09098b1034319184103157b90db}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalVideoStat@{onLocalVideoStat}}
\index{onLocalVideoStat@{onLocalVideoStat}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalVideoStat()}{onLocalVideoStat()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Video\+Stat (\begin{DoxyParamCaption}\item[{int}]{sent\+Bitrate,  }\item[{int}]{sent\+Frame\+Rate }\end{DoxyParamCaption})}

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000024}{Deprecated}}]The statistics of the uploading local video streams once every two seconds. \end{DoxyRefDesc}

\begin{DoxyParams}{Parameters}
{\em sent\+Bitrate} & Data sending bitrate (kbit/s) since last count. \\
\hline
{\em sent\+Frame\+Rate} & Data sending frame rate (fps) since last count. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8a84e26cf72185b3c944b3a10983f600}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a8a84e26cf72185b3c944b3a10983f600}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteVideoStat@{onRemoteVideoStat}}
\index{onRemoteVideoStat@{onRemoteVideoStat}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteVideoStat()}{onRemoteVideoStat()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Video\+Stat (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{delay,  }\item[{int}]{received\+Bitrate,  }\item[{int}]{received\+Frame\+Rate }\end{DoxyParamCaption})}

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000025}{Deprecated}}]The statistics of receiving remote video streams once every two seconds.\end{DoxyRefDesc}



\begin{DoxyParams}{Parameters}
{\em uid} & User ID of the user whose video streams are received. \\
\hline
{\em delay} & Time delay (ms). \\
\hline
{\em received\+Bitrate} & Data receiving bitrate (kbit/s). \\
\hline
{\em received\+Frame\+Rate} & Data receiving frame rate (fps). \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a112817ed260a30174329739382e75e66}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a112817ed260a30174329739382e75e66}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteAudioTransportStats@{onRemoteAudioTransportStats}}
\index{onRemoteAudioTransportStats@{onRemoteAudioTransportStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteAudioTransportStats()}{onRemoteAudioTransportStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Audio\+Transport\+Stats (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{delay,  }\item[{int}]{lost,  }\item[{int}]{rx\+K\+Bit\+Rate }\end{DoxyParamCaption})}



Reports the transport-\/layer statistics of each remote audio stream. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000026}{Deprecated}}]Use \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aced11e711bdda1ea24415da27c5bc5fa}{on\+Remote\+Audio\+Stats}} instead.\end{DoxyRefDesc}


This callback reports the transport-\/layer statistics, such as the packet loss rate and network time delay after the local user receives an audio packet from a remote user. During a call, when the user receives the audio packet sent by the remote user, the callback is triggered every 2 seconds.


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user sending the audio streams. \\
\hline
{\em delay} & The network delay (ms) from the remote user to the receiver. \\
\hline
{\em lost} & The packet loss rate (\%) of the audio packet sent from the remote user to the receiver. \\
\hline
{\em rx\+K\+Bitrate} & The bitrate of the received audio (Kbps). \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a93e87d28a93737a7ff6c5287ff3c2a56}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a93e87d28a93737a7ff6c5287ff3c2a56}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRemoteVideoTransportStats@{onRemoteVideoTransportStats}}
\index{onRemoteVideoTransportStats@{onRemoteVideoTransportStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRemoteVideoTransportStats()}{onRemoteVideoTransportStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Remote\+Video\+Transport\+Stats (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{delay,  }\item[{int}]{lost,  }\item[{int}]{rx\+K\+Bit\+Rate }\end{DoxyParamCaption})}



Reports the transport-\/layer statistics of each remote video stream. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000027}{Deprecated}}]Use \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7f00d7a396872dc02008ea5f7487917e}{on\+Remote\+Video\+Stats}} instead.\end{DoxyRefDesc}


This callback reports the transport-\/layer statistics, such as the packet loss rate and network time delay after the local user receives a video packet from a remote user. During a call, when the user receives the video packet sent by the remote user/host, the callback is triggered every 2 seconds.


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user sending the video packets. \\
\hline
{\em delay} & The network delay (ms) from the sender to the receiver. \\
\hline
{\em lost} & The packet loss rate (\%) of the video packet sent from the remote user. \\
\hline
{\em rx\+K\+Bit\+Rate} & The bitrate of the received video (Kbps). \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab432d1b5f1d8efb96a838f8f9388ff07}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab432d1b5f1d8efb96a838f8f9388ff07}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioMixingStateChanged@{onAudioMixingStateChanged}}
\index{onAudioMixingStateChanged@{onAudioMixingStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioMixingStateChanged()}{onAudioMixingStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Mixing\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the playback state of the music file changes. 

This callback occurs when the playback state of the music file changes, and reports the current state and error code.


\begin{DoxyParams}{Parameters}
{\em state} & The playback state of the music file.
\begin{DoxyItemize}
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+S\+T\+A\+T\+E\+\_\+\+P\+L\+A\+Y\+I\+NG (710)\+: The music file is playing.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+S\+T\+A\+T\+E\+\_\+\+P\+A\+U\+S\+ED (711)\+: The music file pauses playing.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+ED (713)\+: The music file stops playing.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (714)\+: An exception occurs when playing the audio mixing file. The S\+DK returns the specific reason in the {\ttfamily reason\+Code} parameter. 
\end{DoxyItemize}\\
\hline
{\em reason} & Error code.
\begin{DoxyItemize}
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (0)\+: No error.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+N\+\_\+\+N\+O\+T\+\_\+\+O\+P\+EN (701)\+: The S\+DK cannot open the music file.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+T\+O\+O\+\_\+\+F\+R\+E\+Q\+U\+E\+N\+T\+\_\+\+C\+A\+LL (702)\+: The S\+DK opens the music file too frequently.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+R\+U\+P\+T\+E\+D\+\_\+\+E\+OF (703)\+: The music file playback is interrupted.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+O\+N\+E\+\_\+\+L\+O\+O\+P\+\_\+\+C\+O\+M\+P\+L\+E\+T\+ED (721)\+: The music file completes a loop playback.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+A\+L\+L\+\_\+\+L\+O\+O\+P\+S\+\_\+\+C\+O\+M\+P\+L\+E\+T\+ED (723)\+: The music file completes all loop playback.
\item A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+S\+T\+O\+P\+P\+E\+D\+\_\+\+B\+Y\+\_\+\+U\+S\+ER (724)\+: The music file pauses playing by calling {\ttfamily stop\+Audio\+Mixing}. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a74c7ede84d5fb4464687aaacc0cbf142}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a74c7ede84d5fb4464687aaacc0cbf142}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioMixingPositionChanged@{onAudioMixingPositionChanged}}
\index{onAudioMixingPositionChanged@{onAudioMixingPositionChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioMixingPositionChanged()}{onAudioMixingPositionChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Mixing\+Position\+Changed (\begin{DoxyParamCaption}\item[{long}]{position }\end{DoxyParamCaption})}



Reports the playback progress of a music file. 

After you called the {\ttfamily start\+Audio\+Mixing(String file\+Path, boolean loopback, int cycle, int start\+Pos)} method to play a music file, the S\+DK triggers this callback every two seconds to report the playback progress.


\begin{DoxyParams}{Parameters}
{\em position} & The playback progress (ms).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\begin{DoxyItemize}
\item 0\+: Success.
\item $<$ 0\+: Failure. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae51e2624b1c39496f387bcc288ae3f5b}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae51e2624b1c39496f387bcc288ae3f5b}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioMixingFinished@{onAudioMixingFinished}}
\index{onAudioMixingFinished@{onAudioMixingFinished}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioMixingFinished()}{onAudioMixingFinished()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Mixing\+Finished (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the playback of the local music file finishes. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000028}{Deprecated}}]Use \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ab432d1b5f1d8efb96a838f8f9388ff07}{on\+Audio\+Mixing\+State\+Changed}} instead.\end{DoxyRefDesc}


After you call {\ttfamily start\+Audio\+Mixing(\+String file\+Path, boolean loopback, int cycle, int start\+Pos)} to play a local music file, this callback occurs when the playback finishes. If the call of {\ttfamily start\+Audio\+Mixing(\+String file\+Path, boolean loopback, int cycle, int start\+Pos)} fails, the error code {\ttfamily W\+A\+R\+N\+\_\+\+A\+U\+D\+I\+O\+\_\+\+M\+I\+X\+I\+N\+G\+\_\+\+O\+P\+E\+N\+\_\+\+E\+R\+R\+OR} is returned. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aacf755d5776a6899d0f9f61e48378897}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aacf755d5776a6899d0f9f61e48378897}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioEffectFinished@{onAudioEffectFinished}}
\index{onAudioEffectFinished@{onAudioEffectFinished}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioEffectFinished()}{onAudioEffectFinished()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Effect\+Finished (\begin{DoxyParamCaption}\item[{int}]{sound\+Id }\end{DoxyParamCaption})}



Occurs when the playback of the local music file finishes. 

This callback occurs when the local audio effect file finishes playing.


\begin{DoxyParams}{Parameters}
{\em sound\+Id} & The ID of the audio effect. The unique ID of each audio effect file. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aece9d87ad596720ba887e6e889f3d81c}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aece9d87ad596720ba887e6e889f3d81c}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRhythmPlayerStateChanged@{onRhythmPlayerStateChanged}}
\index{onRhythmPlayerStateChanged@{onRhythmPlayerStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRhythmPlayerStateChanged()}{onRhythmPlayerStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rhythm\+Player\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the state of virtual metronome changes. 

When the state of the virtual metronome changes, the S\+DK triggers this callback to report the current state of the virtual metronome. This callback indicates the state of the local audio stream and enables you to troubleshoot issues when audio exceptions occur.


\begin{DoxyParams}{Parameters}
{\em state} & The current virtual metronome state.
\begin{DoxyItemize}
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (810)\+: The virtual metronome is not enabled or is already disabled.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+O\+P\+E\+N\+I\+NG (811)\+: Opening the beat files.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+E\+C\+O\+D\+I\+NG (812)\+: Decoding the beat files.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+P\+L\+A\+Y\+I\+NG (813)\+: The beat files are playing.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (814)\+: Failed to start virtual metronome. You can use the reported {\ttfamily error\+Code} to troubleshoot the cause of the error, or you can try to start the virtual metronome again. 
\end{DoxyItemize}\\
\hline
{\em reason} & Error codes and error messages for virtual metronome errors.
\begin{DoxyItemize}
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (0)\+: The beat files are played normally without errors.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+F\+A\+I\+L\+ED (1)\+: General error with no clear cause.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+N\+\_\+\+N\+O\+T\+\_\+\+O\+P\+EN (801)\+: There is an error when opening the beat files.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+N\+\_\+\+N\+O\+T\+\_\+\+P\+L\+AY (802)\+: There is an error when playing beat files.
\item R\+H\+Y\+T\+H\+M\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+F\+I\+L\+E\+\_\+\+O\+V\+E\+R\+\_\+\+D\+U\+R\+A\+T\+I\+O\+N\+\_\+\+L\+I\+M\+IT (803)\+: The duration of the beat audio file exceeds the limit. The maximum duration is 1.\+2 seconds. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aef21689500cbc435f0ff98fc65670657}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aef21689500cbc435f0ff98fc65670657}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalAudioStateChanged@{onLocalAudioStateChanged}}
\index{onLocalAudioStateChanged@{onLocalAudioStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalAudioStateChanged()}{onLocalAudioStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Audio\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the local audio stream state changes. 

When the state of the local audio stream changes (including the state of the audio capture and encoding), the S\+DK triggers this callback to report the current state. This callback indicates the state of the local audio stream, and allows you to troubleshoot issues when audio exceptions occur.

\begin{DoxyNote}{Note}
When the state is {\ttfamily L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED} (3), you can view the error information in the {\ttfamily error} parameter.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em state} & The state of the local audio.
\begin{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+ED (0)\+: The local video is in the initial state.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+C\+O\+R\+D\+I\+NG (1)\+: The local video capturing device starts successfully.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+C\+O\+D\+I\+NG (2)\+: The first video frame is successfully encoded.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (3)\+: Fails to start the local video. 
\end{DoxyItemize}\\
\hline
{\em reason} & Reasons for local audio state changes.
\begin{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (0)\+: The local video is normal.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (1)\+: No specified reason for the local audio failure. Remind your users to try to rejoin the channel.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+N\+O\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON (2)\+: No permission to use the local video capturing device. Remind your users to grant permission.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+B\+U\+SY (3)\+: The microphone is in use. Remind your users to check whether another application occupies the microphone. Local audio capture automatically resumes after the microphone is idle for about five seconds. You can also try to rejoin the channel after the microphone is idle.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+U\+RE (4)\+: The local video capture failed.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+E\+N\+C\+O\+D\+E\+\_\+\+F\+A\+I\+L\+U\+RE (5)\+: The local video encoding fails.
\item L\+O\+C\+A\+L\+\_\+\+A\+U\+D\+I\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+R\+U\+P\+T\+ED (8)\+: The local audio capture is interrupted by system calls, smart assistants, or alarm clocks. Prompt your users to end the phone call, smart assistants, or alarm clock if the local audio capture is required. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac5f1cba62b72b39211cffad4cc30fb32}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ac5f1cba62b72b39211cffad4cc30fb32}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalVideoStateChanged@{onLocalVideoStateChanged}}
\index{onLocalVideoStateChanged@{onLocalVideoStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalVideoStateChanged()}{onLocalVideoStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Video\+State\+Changed (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the local video stream state changes. 

When the status of the local video changes, the S\+DK triggers this callback to report the current local video state and the reason for the state change. Applicable scenarios\+: You can use this callback to stay updated on the state changes of the local video stream, and take corresponding measures based on the reasons for the state changes, to better manage and debug issues related to the video stream. Call timing\+: -\/ The S\+DK triggeres this callback under the following circumstances, with the {\ttfamily state} as L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED, and the {\ttfamily reason} as {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+U\+RE}\+:
\begin{DoxyItemize}
\item For Android 9 and later versions, after an app is in the background for a period, the system automatically revokes camera permissions.
\item For Android 6 and later versions, if the camera is held by a third-\/party app for a certain duration and then released, the S\+DK triggers this callback and reports the {\ttfamily on\+Local\+Video\+State\+Changed} ({\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+A\+P\+T\+U\+R\+I\+NG,L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK}) callback.
\item The camera starts normally, but does not output video frames for four consecutive seconds.
\end{DoxyItemize}

When the camera outputs captured video frames, if the S\+DK detects 15 consecutive duplicate video frames, it triggers this callback, with the {\ttfamily state} as {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+A\+P\+T\+U\+R\+I\+NG} and the {\ttfamily reason} as {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+U\+RE}.Note\+:
\begin{DoxyItemize}
\item Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps.
\item Normally, if there is an error in video capturing, the issue can be troubleshooted through the {\ttfamily reason} parameter in this callback. However, on some devices, when there is an issue with capturing (such as freezing), the Android system will not throw any error callbacks, so the S\+DK cannot report the reason for the change in local video status. In this case, you can determine if there is no video frame being captured by checking the following\+: this callback reports the {\ttfamily state} as {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+A\+P\+T\+U\+R\+I\+NG} or {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+C\+O\+D\+I\+NG}, and the {\ttfamily capture\+Frame\+Rate} in the {\ttfamily on\+Local\+Video\+Stats} callback is 0.
\end{DoxyItemize}

\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps.
\item Normally, if there is an error in video capturing, the issue can be troubleshooted through the {\ttfamily reason} parameter in this callback. However, on some devices, when there is an issue with capturing (such as freezing), the Android system will not throw any error callbacks, so the S\+DK cannot report the reason for the change in local video status. In this case, you can determine if there is no video frame being captured by checking the following\+: this callback reports the {\ttfamily state} as {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+A\+P\+T\+U\+R\+I\+NG} or {\ttfamily L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+C\+O\+D\+I\+NG}, and the {\ttfamily capture\+Frame\+Rate} in the {\ttfamily on\+Local\+Video\+Stats} callback is 0.
\end{DoxyItemize}
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em state} & -\/ L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+S\+T\+O\+P\+P\+ED (0)\+: The local video is in the initial state.
\begin{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+A\+P\+T\+U\+R\+I\+NG (1)\+: The local video capturing device starts successfully.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+E\+N\+C\+O\+D\+I\+NG (2)\+: The first video frame is successfully encoded.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+ED (3)\+: Fails to start the local video. 
\end{DoxyItemize}\\
\hline
{\em reason} & -\/ L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (0)\+: The local video is normal.
\begin{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (1)\+: No specified reason for the local video failure.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+B\+U\+SY (3)\+: The local video capturing device is in use. Prompt the user to check if the camera is being used by another app, or try to rejoin the channel.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+U\+RE (4)\+: The local video capture failed. Prompt the user to check whether the video capture device is working properly, whether the camera is used by another app, or try to rejoin the channel.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+O\+D\+E\+C\+\_\+\+N\+O\+T\+\_\+\+S\+U\+P\+P\+O\+RT (5)\+: The local video encoding fails.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND (8)\+: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+I\+N\+T\+E\+R\+R\+U\+PT (14)\+: Video capture is interrupted. Possible reasons include the following\+:
\begin{DoxyItemize}
\item The camera is being used by another app. Prompt the user to check if the camera is being used by another app.
\item The device is locked, or the current app has been switched to the background. You can use foreground services to notify the operating system and ensure that the app can still collect video when it switches to the background.
\end{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+D\+E\+V\+I\+C\+E\+\_\+\+F\+A\+T\+A\+L\+\_\+\+E\+R\+R\+OR (15)\+: The video capture device encounters an error. Prompt the user to close and restart the camera to restore functionality. If this operation does not solve the problem, check if the camera has a hardware failure.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+F\+A\+I\+L\+U\+RE (21)\+: The current window being captured has no data. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a13ebed19c0ac1ba39eca8e67c174c6ed}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a13ebed19c0ac1ba39eca8e67c174c6ed}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalVideoEvent@{onLocalVideoEvent}}
\index{onLocalVideoEvent@{onLocalVideoEvent}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalVideoEvent()}{onLocalVideoEvent()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Video\+Event (\begin{DoxyParamCaption}\item[{Constants.\+Video\+Source\+Type}]{source,  }\item[{int}]{event }\end{DoxyParamCaption})}



Occurs when the local video event occurs. 

This callback is triggered when a video event occurs. You can use this callback to get the reason for such an event.


\begin{DoxyParams}{Parameters}
{\em source} & The type of the video source. See {\ttfamily Video\+Source\+Type}. \\
\hline
{\em event} & The local video event type.
\begin{DoxyItemize}
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+E\+V\+E\+N\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+W\+I\+N\+D\+O\+W\+\_\+\+H\+I\+D\+D\+EN (1)\+: The screen capture window is hidden.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+E\+V\+E\+N\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+W\+I\+N\+D\+O\+W\+\_\+\+R\+E\+C\+O\+V\+E\+R\+\_\+\+F\+R\+O\+M\+\_\+\+H\+I\+D\+D\+EN (2)\+: The screen capture window is recovered from hidden.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+E\+V\+E\+N\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+S\+T\+O\+P\+P\+E\+D\+\_\+\+B\+Y\+\_\+\+U\+S\+ER (3)\+: The screen capture is stopped by user.
\item L\+O\+C\+A\+L\+\_\+\+V\+I\+D\+E\+O\+\_\+\+E\+V\+E\+N\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+R\+E\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L\+\_\+\+E\+R\+R\+OR (4)\+: An internal error occurs during the screen capture. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a14851bc4c9119e73911c409ac693eea5}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a14851bc4c9119e73911c409ac693eea5}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRtmpStreamingStateChanged@{onRtmpStreamingStateChanged}}
\index{onRtmpStreamingStateChanged@{onRtmpStreamingStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRtmpStreamingStateChanged()}{onRtmpStreamingStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rtmp\+Streaming\+State\+Changed (\begin{DoxyParamCaption}\item[{String}]{url,  }\item[{int}]{state,  }\item[{int}]{reason }\end{DoxyParamCaption})}



Occurs when the state of Media Push changes. 

When the state of Media Push changes, the S\+DK triggers this callback and reports the U\+RL address and the current state of the Media Push. This callback indicates the state of the Media Push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter.


\begin{DoxyParams}{Parameters}
{\em url} & The U\+RL address where the state of the Media Push changes. \\
\hline
{\em state} & The current state of the Media Push\+:
\begin{DoxyItemize}
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE (0)\+: The Media Push has not started or has ended.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG (1)\+: The streaming server and C\+DN server are being connected.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+U\+N\+N\+I\+NG (2)\+: The Media Push publishes. The S\+DK successfully publishes the R\+T\+MP or R\+T\+M\+PS streaming and returns this state.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+E\+C\+O\+V\+E\+R\+I\+NG (3)\+: The Media Push is recovering. When exceptions occur to the C\+DN, or the Media Push is interrupted, the S\+DK tries to resume the Media Push and returns this state.
\begin{DoxyItemize}
\item If the S\+DK successfully resumes the streaming, R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+R\+U\+N\+N\+I\+NG (2) returns.
\item If the streaming does not resume within 60 seconds or server errors occur, R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+U\+RE (4) returns. You can also reconnect to the server by calling the {\ttfamily start\+Rtmp\+Stream\+With\+Transcoding} / {\ttfamily start\+Rtmp\+Stream\+Without\+Transcoding} and {\ttfamily stop\+Rtmp\+Stream} methods.
\end{DoxyItemize}
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+F\+A\+I\+L\+U\+RE (4)\+: The Media push fails. See the err\+Code parameter for the detailed error information.\+You can also try to publish streams again.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T\+I\+NG (5)\+: The S\+DK is disconnecting from the Agora Media Push server and C\+DN server. When you call {\ttfamily stop\+Rtmp\+Stream} to stop the Media Push normally, the S\+DK reports the Media Push state as {\ttfamily R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T\+I\+NG} and {\ttfamily R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+S\+T\+A\+T\+E\+\_\+\+I\+D\+LE} in sequence. 
\end{DoxyItemize}\\
\hline
{\em reason} & Reasons for the changes in the Media Push status\+:
\begin{DoxyItemize}
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (0)\+: The Media Push publishes successfully.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT (1)\+: Invalid argument used. Check the parameter setting.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+E\+N\+C\+R\+Y\+P\+T\+E\+D\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+N\+O\+T\+\_\+\+A\+L\+L\+O\+W\+ED (2)\+: The Media Push is encrypted and cannot be published.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+O\+N\+\_\+\+T\+I\+M\+E\+O\+UT (3)\+: Timeout for the Media Push. You can try to push the stream again.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+E\+R\+R\+OR (4)\+: An error occurs in Agora streaming server. You can try to publish media streams again.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+T\+M\+P\+\_\+\+S\+E\+R\+V\+E\+R\+\_\+\+E\+R\+R\+OR (5)\+: An error occurs in the C\+DN server.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+T\+O\+O\+\_\+\+O\+F\+T\+EN (6)\+: A reserved parameter.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+R\+E\+A\+C\+H\+\_\+\+L\+I\+M\+IT (7)\+: The host publishes more than 10 U\+R\+Ls. You can stop publishing sreams to unnecessary U\+R\+Ls.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+T\+\_\+\+A\+U\+T\+H\+O\+R\+I\+Z\+ED (8)\+: The host manipulates other hosts\textquotesingle{} U\+R\+Ls. For example, the host updates or stops other hosts\textquotesingle{} streams. Check your app logic.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND (9)\+: Agora\textquotesingle{}s server fails to find the media stream of Media Push.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+N\+O\+T\+\_\+\+S\+U\+P\+P\+O\+R\+T\+ED (10)\+: The format of the media push U\+RL is not supported. Check whether the U\+RL format is correct.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+O\+T\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T\+ER (11)\+: The user role is not host, so the user cannot use the Media Push function. Check your application code logic.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+T\+R\+A\+N\+S\+C\+O\+D\+I\+N\+G\+\_\+\+N\+O\+\_\+\+M\+I\+X\+\_\+\+S\+T\+R\+E\+AM (13)\+: The {\ttfamily update\+Rtmp\+Transcoding} method is called to update the transcoding configuration in a scenario where there is Media Push without transcoding. Check your application code logic.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+N\+E\+T\+\_\+\+D\+O\+WN (14)\+: Errors occurred in the host\textquotesingle{}s network.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+P\+R\+I\+V\+I\+L\+E\+GE (16)\+: Your project does not have permission to use Media Push service.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+\_\+\+U\+N\+P\+U\+B\+L\+I\+S\+H\+\_\+\+R\+E\+A\+S\+O\+N\+\_\+\+OK (100)\+: The Media Push has been stopped normally. After you call {\ttfamily stop\+Rtmp\+Stream} to stop the Media Push, the S\+DK returns this value. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a60f5746ac4fb39f7239ce236b64e55b6}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a60f5746ac4fb39f7239ce236b64e55b6}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRtmpStreamingEvent@{onRtmpStreamingEvent}}
\index{onRtmpStreamingEvent@{onRtmpStreamingEvent}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRtmpStreamingEvent()}{onRtmpStreamingEvent()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rtmp\+Streaming\+Event (\begin{DoxyParamCaption}\item[{String}]{url,  }\item[{int}]{event }\end{DoxyParamCaption})}



Reports events during the Media Push. 

\begin{DoxySince}{Since}
v3.\+1.\+0.
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em url} & The U\+RL for Media Push. \\
\hline
{\em event} & The event code of Media Push.
\begin{DoxyItemize}
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+E\+V\+E\+N\+T\+\_\+\+F\+A\+I\+L\+E\+D\+\_\+\+L\+O\+A\+D\+\_\+\+I\+M\+A\+GE (1)\+: An error occurs when you add a background image or a watermark image in the Media Push.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+E\+V\+E\+N\+T\+\_\+\+U\+R\+L\+\_\+\+A\+L\+R\+E\+A\+D\+Y\+\_\+\+I\+N\+\_\+\+U\+SE (2)\+: The streaming U\+RL is already being used for Media Push. If you want to start new streaming, use a new streaming U\+RL.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+E\+V\+E\+N\+T\+\_\+\+A\+D\+V\+A\+N\+C\+E\+D\+\_\+\+F\+E\+A\+T\+U\+R\+E\+\_\+\+N\+O\+T\+\_\+\+S\+U\+P\+P\+O\+RT (3)\+: The feature is not supported.
\item R\+T\+M\+P\+\_\+\+S\+T\+R\+E\+A\+M\+I\+N\+G\+\_\+\+E\+V\+E\+N\+T\+\_\+\+R\+E\+Q\+U\+E\+S\+T\+\_\+\+T\+O\+O\+\_\+\+O\+F\+T\+EN (4)\+: Reserved. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3261b6e73ef26cbba4b6ff68e754b091}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a3261b6e73ef26cbba4b6ff68e754b091}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onTranscodingUpdated@{onTranscodingUpdated}}
\index{onTranscodingUpdated@{onTranscodingUpdated}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onTranscodingUpdated()}{onTranscodingUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Transcoding\+Updated (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Occurs when the publisher\textquotesingle{}s transcoding is updated. 

When the {\ttfamily Live\+Transcoding} class in the {\ttfamily start\+Rtmp\+Stream\+With\+Transcoding} method updates, the S\+DK triggers the {\ttfamily on\+Transcoding\+Updated} callback to report the update information.

\begin{DoxyNote}{Note}
If you call the {\ttfamily start\+Rtmp\+Stream\+With\+Transcoding} method to set the {\ttfamily Live\+Transcoding} class for the first time, the S\+DK does not trigger this callback. 
\end{DoxyNote}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6f827b82ff6ed61e855bf6315aa4395c}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6f827b82ff6ed61e855bf6315aa4395c}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onStreamMessage@{onStreamMessage}}
\index{onStreamMessage@{onStreamMessage}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onStreamMessage()}{onStreamMessage()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Stream\+Message (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{stream\+Id,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{data }\end{DoxyParamCaption})}



Occurs when the local user receives the data stream from the remote user. 

The S\+DK triggers this callback when the local user receives the stream message that the remote user sends by calling the {\ttfamily send\+Stream\+Message} method.

\begin{DoxyNote}{Note}
If you need a more comprehensive solution for low-\/latency, high-\/concurrency, and scalable real-\/time messaging and status synchronization, it is recommended to use {\ttfamily Signaling}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user sending the message. \\
\hline
{\em stream\+Id} & The stream ID of the received message. \\
\hline
{\em data} & The data received. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7ec93fba444f408cd5148f8778bb6955}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a7ec93fba444f408cd5148f8778bb6955}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onStreamMessageError@{onStreamMessageError}}
\index{onStreamMessageError@{onStreamMessageError}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onStreamMessageError()}{onStreamMessageError()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Stream\+Message\+Error (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{stream\+Id,  }\item[{int}]{error,  }\item[{int}]{missed,  }\item[{int}]{cached }\end{DoxyParamCaption})}



Occurs when the local user does not receive the data stream from the remote user. 

The S\+DK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the {\ttfamily send\+Stream\+Message} method.

\begin{DoxyNote}{Note}
If you need a more comprehensive solution for low-\/latency, high-\/concurrency, and scalable real-\/time messaging and status synchronization, it is recommended to use {\ttfamily Signaling}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em uid} & The ID of the remote user sending the message. \\
\hline
{\em stream\+Id} & The stream ID of the received message. \\
\hline
{\em error} & Error code. \\
\hline
{\em missed} & The number of lost messages. \\
\hline
{\em cached} & Number of incoming cached messages when the data stream is interrupted. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a81d9835fa9823d2b415147de24366a67}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a81d9835fa9823d2b415147de24366a67}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRdtMessage@{onRdtMessage}}
\index{onRdtMessage@{onRdtMessage}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRdtMessage()}{onRdtMessage()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rdt\+Message (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{type,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{data }\end{DoxyParamCaption})}



Occurs when the local user receives data via Reliable Data Transmission (R\+DT) from a remote user. 

@technical preview


\begin{DoxyParams}{Parameters}
{\em uid} & ID of the user who sends the data. \\
\hline
{\em type} & The R\+DT stream type \\
\hline
{\em data} & The data received. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aca5da4886c986146b8a017966b38b149}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_aca5da4886c986146b8a017966b38b149}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRdtStateChanged@{onRdtStateChanged}}
\index{onRdtStateChanged@{onRdtStateChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRdtStateChanged()}{onRdtStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Rdt\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{int}]{state }\end{DoxyParamCaption})}



Occurs when the R\+DT tunnel state changed. 

@technical preview


\begin{DoxyParams}{Parameters}
{\em uid} & ID of the user who sends the data. \\
\hline
{\em state} & The R\+DT tunnel state \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95aa89a54eccdd73423b8004e52d3aa4}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a95aa89a54eccdd73423b8004e52d3aa4}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onMediaControlMessage@{onMediaControlMessage}}
\index{onMediaControlMessage@{onMediaControlMessage}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onMediaControlMessage()}{onMediaControlMessage()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Media\+Control\+Message (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{data }\end{DoxyParamCaption})}



Occurs when the local user receives media control message sent by a remote user. 

@technical preview


\begin{DoxyParams}{Parameters}
{\em uid} & ID of the user who sends the data. \\
\hline
{\em data} & The data received. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acfaedf8c3c744f08f065f68b91017ff2}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_acfaedf8c3c744f08f065f68b91017ff2}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onMediaEngineLoadSuccess@{onMediaEngineLoadSuccess}}
\index{onMediaEngineLoadSuccess@{onMediaEngineLoadSuccess}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onMediaEngineLoadSuccess()}{onMediaEngineLoadSuccess()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Media\+Engine\+Load\+Success (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Occurs when the media engine is loaded. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a069220e819fca1b8157ffd05342b4e35}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a069220e819fca1b8157ffd05342b4e35}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onMediaEngineStartCallSuccess@{onMediaEngineStartCallSuccess}}
\index{onMediaEngineStartCallSuccess@{onMediaEngineStartCallSuccess}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onMediaEngineStartCallSuccess()}{onMediaEngineStartCallSuccess()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Media\+Engine\+Start\+Call\+Success (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Occurs when the media engine starts. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a123fdecc812f7931578afd2f40d48d13}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a123fdecc812f7931578afd2f40d48d13}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onNetworkTypeChanged@{onNetworkTypeChanged}}
\index{onNetworkTypeChanged@{onNetworkTypeChanged}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onNetworkTypeChanged()}{onNetworkTypeChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Network\+Type\+Changed (\begin{DoxyParamCaption}\item[{int}]{type }\end{DoxyParamCaption})}



Occurs when the local network type changes. 

This callback occurs when the connection state of the local user changes. You can get the connection state and reason for the state change in this callback. When the network connection is interrupted, this callback indicates whether the interruption is caused by a network type change or poor network conditions.


\begin{DoxyParams}{Parameters}
{\em type} & Network types\+:
\begin{DoxyItemize}
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+N\+K\+N\+O\+WN (-\/1)\+: The network type is unknown.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+D\+I\+S\+C\+O\+N\+N\+E\+C\+T\+ED (0)\+: The S\+DK disconnects from the network.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+L\+AN (1)\+: The network type is L\+AN.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+W\+I\+FI (2)\+: The network type is Wi-\/\+Fi (including hotspots).
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+M\+O\+B\+I\+L\+E\+\_\+2G (3) \+: The network type is mobile 2G.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+M\+O\+B\+I\+L\+E\+\_\+3G (4)\+: The network type is mobile 3G.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+M\+O\+B\+I\+L\+E\+\_\+4G (5)\+: The network type is mobile 4G.
\item N\+E\+T\+W\+O\+R\+K\+\_\+\+T\+Y\+P\+E\+\_\+\+M\+O\+B\+I\+L\+E\+\_\+5G (6)\+: The network type is mobile 5G. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a4b89dcb8d0bea0fe1917a8936f2a44ce}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a4b89dcb8d0bea0fe1917a8936f2a44ce}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onIntraRequestReceived@{onIntraRequestReceived}}
\index{onIntraRequestReceived@{onIntraRequestReceived}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onIntraRequestReceived()}{onIntraRequestReceived()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Intra\+Request\+Received (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Occurs when intra request from remote user is received.

This callback is triggered once remote user needs one Key frame. \mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476220c1c741f765f83a71e4eeaa3ef}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a6476220c1c741f765f83a71e4eeaa3ef}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUplinkNetworkInfoUpdated@{onUplinkNetworkInfoUpdated}}
\index{onUplinkNetworkInfoUpdated@{onUplinkNetworkInfoUpdated}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUplinkNetworkInfoUpdated()}{onUplinkNetworkInfoUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Uplink\+Network\+Info\+Updated (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_uplink_network_info}{Uplink\+Network\+Info}}}]{info }\end{DoxyParamCaption})}



Occurs when the uplink network information changes. 

The S\+DK triggers this callback when the uplink network information changes.

\begin{DoxyNote}{Note}
This callback only applies to scenarios where you push externally encoded video data in H.\+264 format to the S\+DK.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em info} & The uplink network information. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_uplink_network_info}{Uplink\+Network\+Info}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5d2b5d3a5d1bbbd40e0d71594cd06d51}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5d2b5d3a5d1bbbd40e0d71594cd06d51}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onEncryptionError@{onEncryptionError}}
\index{onEncryptionError@{onEncryptionError}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onEncryptionError()}{onEncryptionError()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Encryption\+Error (\begin{DoxyParamCaption}\item[{int}]{error\+Type }\end{DoxyParamCaption})}



Reports the built-\/in encryption errors. 

When encryption is enabled by calling {\ttfamily enable\+Encryption}, the S\+DK triggers this callback if an error occurs in encryption or decryption on the sender or the receiver side.


\begin{DoxyParams}{Parameters}
{\em error\+Type} & Error types.
\begin{DoxyItemize}
\item E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+E\+R\+R\+O\+R\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L\+\_\+\+F\+A\+I\+L\+U\+RE (0)\+: Internal reasons.
\item E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+E\+R\+R\+O\+R\+\_\+\+D\+E\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (1)\+: Media stream decryption error. Ensure that the receiver and the sender use the same encryption mode and key.
\item E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+E\+R\+R\+O\+R\+\_\+\+E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (2)\+: Media stream encryption error.
\item E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+E\+R\+R\+O\+R\+\_\+\+D\+A\+T\+A\+S\+T\+R\+E\+A\+M\+\_\+\+D\+E\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (3)\+: Data stream decryption error. Ensure that the receiver and the sender use the same encryption mode and key.
\item E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+E\+R\+R\+O\+R\+\_\+\+D\+A\+T\+A\+S\+T\+R\+E\+A\+M\+\_\+\+E\+N\+C\+R\+Y\+P\+T\+I\+O\+N\+\_\+\+F\+A\+I\+L\+U\+RE (4)\+: Data stream encryption error. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a982fad5ffc32f1414c4a6df57a88a293}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a982fad5ffc32f1414c4a6df57a88a293}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onPermissionError@{onPermissionError}}
\index{onPermissionError@{onPermissionError}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onPermissionError()}{onPermissionError()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Permission\+Error (\begin{DoxyParamCaption}\item[{int}]{permission }\end{DoxyParamCaption})}



Occurs when the S\+DK cannot get the device permission. 

When the S\+DK fails to get the device permission, the S\+DK triggers this callback to report which device permission cannot be got.


\begin{DoxyParams}{Parameters}
{\em permission} & The type of the device permission.
\begin{DoxyItemize}
\item R\+E\+C\+O\+R\+D\+\_\+\+A\+U\+D\+IO (0)\+: Permission for the audio capture device.
\item C\+A\+M\+E\+RA (1)\+: Permission for the camera.
\item S\+C\+R\+E\+E\+N\+\_\+\+C\+A\+P\+T\+U\+RE (2)\+: Permission for screen sharing. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a63c903e1835fb4623b53ce7e2f46a3f5}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a63c903e1835fb4623b53ce7e2f46a3f5}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onPermissionGranted@{onPermissionGranted}}
\index{onPermissionGranted@{onPermissionGranted}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onPermissionGranted()}{onPermissionGranted()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Permission\+Granted (\begin{DoxyParamCaption}\item[{int}]{permission }\end{DoxyParamCaption})}

Reports the permission granted. 
\begin{DoxyParams}{Parameters}
{\em permission} & of \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_constants_a5b2615c93a91e3206aea62ca7be38cc8}{Constants.\+R\+E\+C\+O\+R\+D\+\_\+\+A\+U\+D\+IO}}, \mbox{\hyperlink{}{Constants.\+C\+A\+M\+E\+RA}} and \{\mbox{\hyperlink{}{\} }}\\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad802bd7311b1fd7b3f6cb853a567fd34}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ad802bd7311b1fd7b3f6cb853a567fd34}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onUploadLogResult@{onUploadLogResult}}
\index{onUploadLogResult@{onUploadLogResult}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onUploadLogResult()}{onUploadLogResult()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Upload\+Log\+Result (\begin{DoxyParamCaption}\item[{String}]{request\+Id,  }\item[{boolean}]{success,  }\item[{int}]{reason }\end{DoxyParamCaption})}

Reports the user log upload result 
\begin{DoxyParams}{Parameters}
{\em request\+Id} & Request\+Id of the upload \\
\hline
{\em success} & Is upload success \\
\hline
{\em reason} & Reason of the upload, 0\+: OK, 1 Network Error, 2 Server Error. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a92c65f217aa90841fb4bd71bd8e998b7}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a92c65f217aa90841fb4bd71bd8e998b7}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onProxyConnected@{onProxyConnected}}
\index{onProxyConnected@{onProxyConnected}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onProxyConnected()}{onProxyConnected()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Proxy\+Connected (\begin{DoxyParamCaption}\item[{String}]{channel,  }\item[{int}]{uid,  }\item[{int}]{proxy\+Type,  }\item[{String}]{local\+Proxy\+Ip,  }\item[{int}]{elapsed }\end{DoxyParamCaption})}



Reports the proxy connection state. 

You can use this callback to listen for the state of the S\+DK connecting to a proxy. For example, when a user calls {\ttfamily set\+Cloud\+Proxy} and joins a channel successfully, the S\+DK triggers this callback to report the user ID, the proxy type connected, and the time elapsed fromthe user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until this callback is triggered.


\begin{DoxyParams}{Parameters}
{\em channel} & The channel name. \\
\hline
{\em uid} & The user ID. \\
\hline
{\em proxy\+Type} & The proxy type connected.
\begin{DoxyItemize}
\item P\+R\+O\+X\+Y\+\_\+\+T\+Y\+P\+E\+\_\+\+N\+O\+N\+E\+\_\+\+P\+R\+O\+XY (0)\+: Reserved for future use.
\item P\+R\+O\+X\+Y\+\_\+\+T\+Y\+P\+E\+\_\+\+U\+D\+P\+\_\+\+C\+L\+O\+U\+D\+\_\+\+P\+R\+O\+XY (1)\+: The cloud proxy for the U\+DP protocol, that is, the Force U\+DP cloud proxy mode. In this mode, the S\+DK always transmits data over U\+DP.
\item P\+R\+O\+X\+Y\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P\+\_\+\+C\+L\+O\+U\+D\+\_\+\+P\+R\+O\+XY (2)\+: The cloud proxy for the T\+CP (encryption) protocol, that is, the Force T\+CP cloud proxy mode. In this mode, the S\+DK always transmits data over T\+C\+P/\+T\+LS 443.
\item P\+R\+O\+X\+Y\+\_\+\+T\+Y\+P\+E\+\_\+\+L\+O\+C\+A\+L\+\_\+\+P\+R\+O\+XY (3)\+: Reserved for future use.
\item P\+R\+O\+X\+Y\+\_\+\+T\+Y\+P\+E\+\_\+\+T\+C\+P\+\_\+\+A\+U\+T\+O\+\_\+\+F\+A\+L\+L\+B\+A\+CK (4)\+: Automatic mode. In this mode, the S\+DK attempts a direct connection to S\+D-\/\+R\+T\+N™ and automatically switches to T\+C\+P/\+T\+LS 443 if the attempt fails. 
\end{DoxyItemize}\\
\hline
{\em local\+Proxy\+Ip} & Reserved for future use. \\
\hline
{\em elapsed} & The time elapsed (ms) from the user calling {\ttfamily join\+Channel(String token, String channel\+Id, int uid, \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_channel_media_options}{Channel\+Media\+Options}} options)} until this callback is triggered. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a33c557a7ed4542fc4561a9d570831073}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a33c557a7ed4542fc4561a9d570831073}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onVideoRenderingTracingResult@{onVideoRenderingTracingResult}}
\index{onVideoRenderingTracingResult@{onVideoRenderingTracingResult}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onVideoRenderingTracingResult()}{onVideoRenderingTracingResult()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Video\+Rendering\+Tracing\+Result (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{Constants.\+M\+E\+D\+I\+A\+\_\+\+T\+R\+A\+C\+E\+\_\+\+E\+V\+E\+NT}]{current\+Event,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_rendering_tracing_info}{Video\+Rendering\+Tracing\+Info}}}]{tracing\+Info }\end{DoxyParamCaption})}



Video frame rendering event callback. 

After calling the {\ttfamily start\+Media\+Rendering\+Tracing} method or joining a channel, the S\+DK triggers this callback to report the events of video frame rendering and the indicators during the rendering process. Developers can optimize the indicators to improve the efficiency of the first video frame rendering.


\begin{DoxyParams}{Parameters}
{\em uid} & The user ID. \\
\hline
{\em current\+Event} & The current video frame rendering event. See {\ttfamily M\+E\+D\+I\+A\+\_\+\+T\+R\+A\+C\+E\+\_\+\+E\+V\+E\+NT}. \\
\hline
{\em tracing\+Info} & The indicators during the video frame rendering process. Developers need to reduce the value of indicators as much as possible in order to improve the efficiency of the first video frame rendering. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_rendering_tracing_info}{Video\+Rendering\+Tracing\+Info}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a1c8858d82c94cccbbd1ba6eb592e604e}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a1c8858d82c94cccbbd1ba6eb592e604e}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onLocalVideoTranscoderError@{onLocalVideoTranscoderError}}
\index{onLocalVideoTranscoderError@{onLocalVideoTranscoderError}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onLocalVideoTranscoderError()}{onLocalVideoTranscoderError()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Local\+Video\+Transcoder\+Error (\begin{DoxyParamCaption}\item[{Local\+Transcoder\+Configuration.\+Transcoding\+Video\+Stream}]{stream,  }\item[{int}]{error }\end{DoxyParamCaption})}



Occurs when there\textquotesingle{}s an error during the local video mixing. 

When you fail to call {\ttfamily start\+Local\+Video\+Transcoder} or {\ttfamily update\+Local\+Transcoder\+Configuration}, the S\+DK triggers this callback to report the reason.


\begin{DoxyParams}{Parameters}
{\em stream} & The video streams that cannot be mixed during video mixing. See {\ttfamily Transcoding\+Video\+Stream}. \\
\hline
{\em error} & The reason for local video mixing error. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae2370da7ffa833dab6550e5ef5ac4f8f}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_ae2370da7ffa833dab6550e5ef5ac4f8f}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onTranscodedStreamLayoutInfo@{onTranscodedStreamLayoutInfo}}
\index{onTranscodedStreamLayoutInfo@{onTranscodedStreamLayoutInfo}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onTranscodedStreamLayoutInfo()}{onTranscodedStreamLayoutInfo()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Transcoded\+Stream\+Layout\+Info (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_layout_info}{Video\+Layout\+Info}}}]{info }\end{DoxyParamCaption})}



Occurs when the local user receives a mixed video stream carrying layout information. 

When the local user receives a mixed video stream sent by the video mixing server for the first time, or when there is a change in the layout information of the mixed stream, the S\+DK triggers this callback, reporting the layout information of each sub-\/video stream within the mixed video stream.


\begin{DoxyParams}{Parameters}
{\em uid} & User ID who published this mixed video stream. \\
\hline
{\em info} & Layout information of a specific sub-\/video stream within the mixed stream. See . {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_video_layout_info}{Video\+Layout\+Info}}} \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5642c37198789f09a0e82560cea482c8}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a5642c37198789f09a0e82560cea482c8}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onAudioMetadataReceived@{onAudioMetadataReceived}}
\index{onAudioMetadataReceived@{onAudioMetadataReceived}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onAudioMetadataReceived()}{onAudioMetadataReceived()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Audio\+Metadata\+Received (\begin{DoxyParamCaption}\item[{int}]{uid,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{data }\end{DoxyParamCaption})}



Occurs when the S\+DK receives audio metadata. 

\begin{DoxySince}{Since}
v4.\+3.\+1 
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em metadata} & The pointer of metadata \\
\hline
{\em length} & Size of metadata @technical preview \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a489ba46bfb0abc486895eb5a35bc5109}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a489ba46bfb0abc486895eb5a35bc5109}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onMultipathStats@{onMultipathStats}}
\index{onMultipathStats@{onMultipathStats}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onMultipathStats()}{onMultipathStats()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Multipath\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_multipath_stats}{Multipath\+Stats}}}]{stats }\end{DoxyParamCaption})}



Reports the multipath transmission statistics. 

\begin{DoxyPostcond}{Postcondition}
This callback is triggered after you set {\ttfamily enable\+Multipath} to {\ttfamily true} to enable multipath transmission.
\end{DoxyPostcond}
\begin{DoxySince}{Since}
4.\+6.\+0
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em stats} & The multipath statistics. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_1_1_multipath_stats}{Multipath\+Stats}}}. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a80abe10ad42047a039233fa35528d8e0}\label{classio_1_1agora_1_1rtc2_1_1_i_rtc_engine_event_handler_a80abe10ad42047a039233fa35528d8e0}} 
\index{io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}!onRenewTokenResult@{onRenewTokenResult}}
\index{onRenewTokenResult@{onRenewTokenResult}!io.agora.rtc2.IRtcEngineEventHandler@{io.agora.rtc2.IRtcEngineEventHandler}}
\doxysubsubsection{\texorpdfstring{onRenewTokenResult()}{onRenewTokenResult()}}
{\footnotesize\ttfamily void io.\+agora.\+rtc2.\+I\+Rtc\+Engine\+Event\+Handler.\+on\+Renew\+Token\+Result (\begin{DoxyParamCaption}\item[{String}]{token,  }\item[{Constants.\+Renew\+Token\+Error\+Code}]{code }\end{DoxyParamCaption})}



Callback for {\ttfamily renew\+Token} call result. 

\begin{DoxySince}{Since}
v4.\+6.\+0
\end{DoxySince}
This callback is triggered after the user calls the {\ttfamily renew\+Token} method to update the token, and is used to notify the app of the result.


\begin{DoxyParams}{Parameters}
{\em token} & Token used for authentication. \\
\hline
{\em code} & Error code. See {\ttfamily Renew\+Token\+Error\+Code}. \\
\hline
\end{DoxyParams}
