\hypertarget{classio_1_1agora_1_1rte_1_1_player_observer}{}\doxysection{io.\+agora.\+rte.\+Player\+Observer Class Reference}
\label{classio_1_1agora_1_1rte_1_1_player_observer}\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_a7be80b90ca0489ca04bf8a7dbd7702cd}\label{classio_1_1agora_1_1rte_1_1_player_observer_a7be80b90ca0489ca04bf8a7dbd7702cd}} 
long {\bfseries get\+Native\+Handle} ()
\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_a1423840afe85bf1ee3fae7f168fec6d2}{on\+State\+Changed}} (int old\+\_\+state, int new\+\_\+state, \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_error}{Error}} error)
\begin{DoxyCompactList}\small\item\em Callback for player state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_a9a50ad81ad2eb3d292347dd644d8f9bd}{on\+Position\+Changed}} (long curr\+\_\+time, long utc\+\_\+time)
\begin{DoxyCompactList}\small\item\em Reports the current playback progress of the media resource. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_af125fc35e9f3a533ef2bb5d927bd625d}{on\+Resolution\+Changed}} (int width, int height)
\begin{DoxyCompactList}\small\item\em Callback for video resolution change. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_ad483ea90351634426239ffccdbabe36d}{on\+Event}} (int event)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} event callback. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_a202ef7582b3895cce659e8c208997a17}{on\+Metadata}} (int type, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Callback for received media auxiliary information. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_af660c74cf1136d2ae309599251270565}{on\+Player\+Info\+Updated}} (\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_info}{Player\+Info}} info)
\begin{DoxyCompactList}\small\item\em Callback triggered when the player and media stream information changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_observer_adf3498cf1ae00a83a6b068fc2dbf3671}{on\+Audio\+Volume\+Indication}} (int volume)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} volume indication callback. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_aefc29d5353fd43829999f32ce734d1ac}\label{classio_1_1agora_1_1rte_1_1_player_observer_aefc29d5353fd43829999f32ce734d1ac}} 
void {\bfseries finalize} ()
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_observer}{Observer}}, an interface for receiving player event callbacks. \begin{DoxySince}{Since}
v4.\+4.\+0 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_a1423840afe85bf1ee3fae7f168fec6d2}\label{classio_1_1agora_1_1rte_1_1_player_observer_a1423840afe85bf1ee3fae7f168fec6d2}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onStateChanged@{onStateChanged}}
\index{onStateChanged@{onStateChanged}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onStateChanged()}{onStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+State\+Changed (\begin{DoxyParamCaption}\item[{int}]{old\+\_\+state,  }\item[{int}]{new\+\_\+state,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_error}{Error}}}]{error }\end{DoxyParamCaption})}



Callback for player state changes. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
If you need to monitor changes in the player state, you must first call {\ttfamily register\+Observer} to register the player observer object. Call timing\+: This callback is triggered by the S\+DK when the player state changes, reporting the current and previous states.


\begin{DoxyParams}{Parameters}
{\em old\+\_\+state} & The player state before the change. See {\ttfamily Player\+State} for details. \\
\hline
{\em new\+\_\+state} & The current player state. See {\ttfamily Player\+State} for details. If the current state is {\ttfamily F\+A\+I\+L\+ED}, you can get detailed error information through the {\ttfamily error} parameter. \\
\hline
{\em error} & The state or error information. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_error}{Error}}} for details. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_a9a50ad81ad2eb3d292347dd644d8f9bd}\label{classio_1_1agora_1_1rte_1_1_player_observer_a9a50ad81ad2eb3d292347dd644d8f9bd}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onPositionChanged@{onPositionChanged}}
\index{onPositionChanged@{onPositionChanged}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPositionChanged()}{onPositionChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Position\+Changed (\begin{DoxyParamCaption}\item[{long}]{curr\+\_\+time,  }\item[{long}]{utc\+\_\+time }\end{DoxyParamCaption})}



Reports the current playback progress of the media resource. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
Call timing\+: This callback is triggered once every second during the playback of the media resource.


\begin{DoxyParams}{Parameters}
{\em curr\+\_\+time} & The current playback progress in milliseconds. \\
\hline
{\em utc\+\_\+time} & The current N\+TP (Network Time Protocol) time in milliseconds. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_af125fc35e9f3a533ef2bb5d927bd625d}\label{classio_1_1agora_1_1rte_1_1_player_observer_af125fc35e9f3a533ef2bb5d927bd625d}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onResolutionChanged@{onResolutionChanged}}
\index{onResolutionChanged@{onResolutionChanged}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onResolutionChanged()}{onResolutionChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Resolution\+Changed (\begin{DoxyParamCaption}\item[{int}]{width,  }\item[{int}]{height }\end{DoxyParamCaption})}



Callback for video resolution change. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
If you need to monitor changes in the video resolution of the stream played by the player, you must first call {\ttfamily register\+Observer} to register a player observer object. ~\newline
 Call timing\+: This callback is triggered by the S\+DK when the resolution of the video stream changes, reporting the current width and height of the video.


\begin{DoxyParams}{Parameters}
{\em width} & Width of the video frame (px). \\
\hline
{\em height} & Height of the video frame (px). \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_ad483ea90351634426239ffccdbabe36d}\label{classio_1_1agora_1_1rte_1_1_player_observer_ad483ea90351634426239ffccdbabe36d}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onEvent@{onEvent}}
\index{onEvent@{onEvent}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onEvent()}{onEvent()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Event (\begin{DoxyParamCaption}\item[{int}]{event }\end{DoxyParamCaption})}



\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} event callback. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
If you need to monitor player events, you must first call {\ttfamily register\+Observer} to register the player observer object. Call timing\+: The S\+DK triggers this callback when a player event changes.


\begin{DoxyParams}{Parameters}
{\em event} & \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} event. See {\ttfamily Player\+Event} for details. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_a202ef7582b3895cce659e8c208997a17}\label{classio_1_1agora_1_1rte_1_1_player_observer_a202ef7582b3895cce659e8c208997a17}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onMetadata@{onMetadata}}
\index{onMetadata@{onMetadata}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onMetadata()}{onMetadata()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Metadata (\begin{DoxyParamCaption}\item[{int}]{type,  }\item[{byte\mbox{[}$\,$\mbox{]}}]{data }\end{DoxyParamCaption})}



Callback for received media auxiliary information. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
If you need to obtain auxiliary information from the media stream, you must first call {\ttfamily register\+Observer} to register a player observer object. Call timing\+: This callback is triggered after the S\+DK parses the auxiliary information of the media stream being played by the player, reporting the data type and its specific content.


\begin{DoxyParams}{Parameters}
{\em type} & Type of auxiliary information\+:
\begin{DoxyItemize}
\item 0\+: S\+EI (Supplemental Enhancement Information) type. 
\end{DoxyItemize}\\
\hline
{\em data} & Parsed auxiliary information. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_af660c74cf1136d2ae309599251270565}\label{classio_1_1agora_1_1rte_1_1_player_observer_af660c74cf1136d2ae309599251270565}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onPlayerInfoUpdated@{onPlayerInfoUpdated}}
\index{onPlayerInfoUpdated@{onPlayerInfoUpdated}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerInfoUpdated()}{onPlayerInfoUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Player\+Info\+Updated (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_info}{Player\+Info}}}]{info }\end{DoxyParamCaption})}



Callback triggered when the player and media stream information changes. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
If you need to obtain information about the player and media stream, you must first call {\ttfamily register\+Observer} to register a player observer object. You can also retrieve the information directly using the {\ttfamily get\+Info} method. Call timing\+: This callback is triggered by the S\+DK when the player and media stream information changes.


\begin{DoxyParams}{Parameters}
{\em info} & Information about the player and media stream. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player_info}{Player\+Info}}} for details. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classio_1_1agora_1_1rte_1_1_player_observer_adf3498cf1ae00a83a6b068fc2dbf3671}\label{classio_1_1agora_1_1rte_1_1_player_observer_adf3498cf1ae00a83a6b068fc2dbf3671}} 
\index{io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}!onAudioVolumeIndication@{onAudioVolumeIndication}}
\index{onAudioVolumeIndication@{onAudioVolumeIndication}!io.agora.rte.PlayerObserver@{io.agora.rte.PlayerObserver}}
\doxysubsubsection{\texorpdfstring{onAudioVolumeIndication()}{onAudioVolumeIndication()}}
{\footnotesize\ttfamily void io.\+agora.\+rte.\+Player\+Observer.\+on\+Audio\+Volume\+Indication (\begin{DoxyParamCaption}\item[{int}]{volume }\end{DoxyParamCaption})}



\mbox{\hyperlink{classio_1_1agora_1_1rte_1_1_player}{Player}} volume indication callback. 

\begin{DoxySince}{Since}
v4.\+4.\+0
\end{DoxySince}
Call timing\+: The S\+DK triggers this callback when the player\textquotesingle{}s volume changes.


\begin{DoxyParams}{Parameters}
{\em volume} & The current volume of the player, with a value range of \mbox{[}0,225\mbox{]}. \\
\hline
\end{DoxyParams}
