Agora C++ API Reference for All Platforms
|
Public Member Functions | |
virtual | ~IMediaPlayerSourceObserver () |
virtual void | onPlayerSourceStateChanged (media::base::MEDIA_PLAYER_STATE state, media::base::MEDIA_PLAYER_ERROR ec)=0 |
virtual void | onPositionChanged (int64_t position)=0 |
virtual void | onPlayerEvent (media::base::MEDIA_PLAYER_EVENT event)=0 |
virtual void | onMetaData (const void *data, int length)=0 |
virtual void | onPlayBufferUpdated (int64_t playCachedBuffer)=0 |
virtual void | onCompleted ()=0 |
This class class reports runtime events to the applications.
|
inlinevirtual |
|
pure virtual |
Reports the playback state change.
When the state of the playback changes, the SDK triggers this callback to report the new playback state and the reason or error for the change.
state | The new playback state after change. See MEDIA_PLAYER_STATE. |
ec | The player's error code. See MEDIA_PLAYER_ERROR. |
|
pure virtual |
Reports current playback progress.
The callback occurs once every one second during the playback and reports the current playback progress.
position | Current playback progress (second). |
|
pure virtual |
Reports the playback event.
seek
method, the SDK triggers the callback to report the results of the seek operation.selectAudioTrack
method, the SDK triggers the callback to report that the audio track changes.event | The playback event. See MEDIA_PLAYER_EVENT. |
|
pure virtual |
Occurs when the metadata is received.
The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
data | The detailed data of the media metadata. |
length | The data length (bytes). |
|
pure virtual |
Triggered when play buffer updated, once every 1 second.
int | cached buffer during playing, in milliseconds |
|
pure virtual |
Occurs when one playback of the media file is completed.