\hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer}{}\doxysection{io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer Interface Reference}
\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer}\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a572fe1760046b9dd299bd28c73f40928}{on\+Player\+State\+Changed}} (Constants.\+Media\+Player\+State state, Constants.\+Media\+Player\+Reason reason)
\begin{DoxyCompactList}\small\item\em Triggered when the player state changes. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_acb4c4b8738411ebd959755369baabf8f}{on\+Position\+Changed}} (long position\+Ms, long timestamp\+Ms)
\begin{DoxyCompactList}\small\item\em Triggered when the player progress changes, once every 1 second. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a308c779d14be1516d0f135b615d0a6c0}{on\+Player\+Event}} (Constants.\+Media\+Player\+Event event\+Code, long elapsed\+Time, String message)
\begin{DoxyCompactList}\small\item\em Reports the playback event. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_ac23df946c337f3b1585977996146eba5}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_ac23df946c337f3b1585977996146eba5}} 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_ac23df946c337f3b1585977996146eba5}{on\+Meta\+Data}} (Constants.\+Media\+Player\+Metadata\+Type type, byte\mbox{[}$\,$\mbox{]} data)
\begin{DoxyCompactList}\small\item\em Triggered when information is obtained. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af9e4f6341c8c81c87ea1199a6cfecc15}{on\+Play\+Buffer\+Updated}} (long play\+Cached\+Buffer)
\begin{DoxyCompactList}\small\item\em Triggered current playback buffer, once every 1 second. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a3756c2515c9a5be0b32b96248d3a32d2}{on\+Preload\+Event}} (String src, Constants.\+Media\+Player\+Preload\+Event event)
\begin{DoxyCompactList}\small\item\em Triggered current playback buffer, once every 1 second. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a0da5fafac9bef28071e97a27a4905d10}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a0da5fafac9bef28071e97a27a4905d10}} 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a0da5fafac9bef28071e97a27a4905d10}{on\+Agora\+C\+D\+N\+Token\+Will\+Expire}} ()
\begin{DoxyCompactList}\small\item\em Agora\+C\+DN Token has expired and needs to be set up with renew\+Agora\+C\+D\+N\+Src\+Token. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a32c17b1de5ff92fbacb03aa500e3c13b}{on\+Player\+Src\+Info\+Changed}} (\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_src_info}{Src\+Info}} from, \mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_src_info}{Src\+Info}} to)
\begin{DoxyCompactList}\small\item\em Reports current playback source bitrate changed. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a13240f2c9eab25361c5733fb5a5b9c93}{on\+Player\+Info\+Updated}} (\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_player_updated_info}{Player\+Updated\+Info}} info)
\begin{DoxyCompactList}\small\item\em Triggered when media player information updated. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a06bea4d261f3ed7c13291de72ba4609c}{on\+Player\+Cache\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_cache_statistics}{Cache\+Statistics}} stats)
\begin{DoxyCompactList}\small\item\em Triggered every 1 second, reports the statistics of the files being cached. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af62255e22e951a10af34fead414e0a34}{on\+Player\+Playback\+Stats}} (\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_player_playback_stats}{Player\+Playback\+Stats}} stats)
\begin{DoxyCompactList}\small\item\em Triggered every 1 second, reports the statistics of the media stream being played. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a71038b35b1b11f43330cdc869caaff5e}{on\+Audio\+Volume\+Indication}} (int volume)
\begin{DoxyCompactList}\small\item\em Triggered every 200 millisecond ,update player current volume range \mbox{[}0,255\mbox{]}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a572fe1760046b9dd299bd28c73f40928}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a572fe1760046b9dd299bd28c73f40928}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerStateChanged@{onPlayerStateChanged}}
\index{onPlayerStateChanged@{onPlayerStateChanged}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerStateChanged()}{onPlayerStateChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+State\+Changed (\begin{DoxyParamCaption}\item[{Constants.\+Media\+Player\+State}]{state,  }\item[{Constants.\+Media\+Player\+Reason}]{reason }\end{DoxyParamCaption})}



Triggered when the player state changes. 


\begin{DoxyParams}{Parameters}
{\em state} & New player state \\
\hline
{\em reason} & Reason for state change \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_acb4c4b8738411ebd959755369baabf8f}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_acb4c4b8738411ebd959755369baabf8f}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPositionChanged@{onPositionChanged}}
\index{onPositionChanged@{onPositionChanged}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPositionChanged()}{onPositionChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Position\+Changed (\begin{DoxyParamCaption}\item[{long}]{position\+Ms,  }\item[{long}]{timestamp\+Ms }\end{DoxyParamCaption})}



Triggered when the player progress changes, once every 1 second. 


\begin{DoxyParams}{Parameters}
{\em position\+Ms} & Current playback progress, in miliseconds \\
\hline
{\em timestamp\+Ms} & Current N\+T\+P(\+Network Time Protocol) time, in miliseconds \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a308c779d14be1516d0f135b615d0a6c0}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a308c779d14be1516d0f135b615d0a6c0}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerEvent@{onPlayerEvent}}
\index{onPlayerEvent@{onPlayerEvent}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerEvent()}{onPlayerEvent()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+Event (\begin{DoxyParamCaption}\item[{Constants.\+Media\+Player\+Event}]{event\+Code,  }\item[{long}]{elapsed\+Time,  }\item[{String}]{message }\end{DoxyParamCaption})}



Reports the playback event. 


\begin{DoxyItemize}
\item After calling the {\ttfamily seek} method, the S\+DK triggers the callback to report the results of the seek operation.
\item After calling the {\ttfamily select\+Audio\+Track} method, the S\+DK triggers the callback to report that the audio track changes.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em event\+Code} & The playback event. See \mbox{\hyperlink{}{M\+E\+D\+I\+A\+\_\+\+P\+L\+A\+Y\+E\+R\+\_\+\+E\+V\+E\+NT}}. \\
\hline
{\em elapsed\+Time} & The playback elapsed time. \\
\hline
{\em message} & The playback message. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af9e4f6341c8c81c87ea1199a6cfecc15}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af9e4f6341c8c81c87ea1199a6cfecc15}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayBufferUpdated@{onPlayBufferUpdated}}
\index{onPlayBufferUpdated@{onPlayBufferUpdated}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayBufferUpdated()}{onPlayBufferUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Play\+Buffer\+Updated (\begin{DoxyParamCaption}\item[{long}]{play\+Cached\+Buffer }\end{DoxyParamCaption})}



Triggered current playback buffer, once every 1 second. 


\begin{DoxyParams}{Parameters}
{\em play\+Cached\+Buffer} & Current playback buffer, in seconds \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a3756c2515c9a5be0b32b96248d3a32d2}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a3756c2515c9a5be0b32b96248d3a32d2}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPreloadEvent@{onPreloadEvent}}
\index{onPreloadEvent@{onPreloadEvent}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPreloadEvent()}{onPreloadEvent()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Preload\+Event (\begin{DoxyParamCaption}\item[{String}]{src,  }\item[{Constants.\+Media\+Player\+Preload\+Event}]{event }\end{DoxyParamCaption})}



Triggered current playback buffer, once every 1 second. 


\begin{DoxyParams}{Parameters}
{\em src} & Current preload src \\
\hline
{\em event} & Triggered event happened \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a32c17b1de5ff92fbacb03aa500e3c13b}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a32c17b1de5ff92fbacb03aa500e3c13b}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerSrcInfoChanged@{onPlayerSrcInfoChanged}}
\index{onPlayerSrcInfoChanged@{onPlayerSrcInfoChanged}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerSrcInfoChanged()}{onPlayerSrcInfoChanged()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+Src\+Info\+Changed (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_src_info}{Src\+Info}}}]{from,  }\item[{\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_src_info}{Src\+Info}}}]{to }\end{DoxyParamCaption})}



Reports current playback source bitrate changed. 

Reports current playback source info changed.


\begin{DoxyParams}{Parameters}
{\em from} & Streaming media information before the change. \\
\hline
{\em to} & Streaming media information after the change. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a13240f2c9eab25361c5733fb5a5b9c93}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a13240f2c9eab25361c5733fb5a5b9c93}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerInfoUpdated@{onPlayerInfoUpdated}}
\index{onPlayerInfoUpdated@{onPlayerInfoUpdated}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerInfoUpdated()}{onPlayerInfoUpdated()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+Info\+Updated (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_player_updated_info}{Player\+Updated\+Info}}}]{info }\end{DoxyParamCaption})}



Triggered when media player information updated. 


\begin{DoxyParams}{Parameters}
{\em info} & Include information of media player. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a06bea4d261f3ed7c13291de72ba4609c}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a06bea4d261f3ed7c13291de72ba4609c}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerCacheStats@{onPlayerCacheStats}}
\index{onPlayerCacheStats@{onPlayerCacheStats}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerCacheStats()}{onPlayerCacheStats()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+Cache\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_cache_statistics}{Cache\+Statistics}}}]{stats }\end{DoxyParamCaption})}



Triggered every 1 second, reports the statistics of the files being cached. 


\begin{DoxyParams}{Parameters}
{\em stats} & Cached file statistics. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af62255e22e951a10af34fead414e0a34}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_af62255e22e951a10af34fead414e0a34}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onPlayerPlaybackStats@{onPlayerPlaybackStats}}
\index{onPlayerPlaybackStats@{onPlayerPlaybackStats}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onPlayerPlaybackStats()}{onPlayerPlaybackStats()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Player\+Playback\+Stats (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1mediaplayer_1_1data_1_1_player_playback_stats}{Player\+Playback\+Stats}}}]{stats }\end{DoxyParamCaption})}



Triggered every 1 second, reports the statistics of the media stream being played. 


\begin{DoxyParams}{Parameters}
{\em stats} & The statistics of the media stream. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a71038b35b1b11f43330cdc869caaff5e}\label{interfaceio_1_1agora_1_1mediaplayer_1_1_i_media_player_observer_a71038b35b1b11f43330cdc869caaff5e}} 
\index{io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}!onAudioVolumeIndication@{onAudioVolumeIndication}}
\index{onAudioVolumeIndication@{onAudioVolumeIndication}!io.agora.mediaplayer.IMediaPlayerObserver@{io.agora.mediaplayer.IMediaPlayerObserver}}
\doxysubsubsection{\texorpdfstring{onAudioVolumeIndication()}{onAudioVolumeIndication()}}
{\footnotesize\ttfamily void io.\+agora.\+mediaplayer.\+I\+Media\+Player\+Observer.\+on\+Audio\+Volume\+Indication (\begin{DoxyParamCaption}\item[{int}]{volume }\end{DoxyParamCaption})}



Triggered every 200 millisecond ,update player current volume range \mbox{[}0,255\mbox{]}. 


\begin{DoxyParams}{Parameters}
{\em volume} & volume of current player. \\
\hline
\end{DoxyParams}
