|
Media Player Kit v1.3.0 API Reference for Windows
|
Public Member Functions | |
| virtual | ~IMediaPlayerSourceObserver ()=default |
| virtual void | onPlayerSourceStateChanged (media::base::MEDIA_PLAYER_STATE state, media::base::MEDIA_PLAYER_ERROR ec)=0 |
| virtual void | onPositionChanged (int64_t position_ms)=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 | onPreloadEvent (const char *src, media::base::PLAYER_PRELOAD_EVENT event)=0 |
|
virtualdefault |
|
pure virtual |
Triggered when the player state changes.
| state | New player state |
| ec | Player error message |
|
pure virtual |
Reports current playback progress.
The callback occurs once every one second during the playback and reports current playback progress.
| position | Current playback progress (ms). |
|
pure virtual |
Reports the playback event.
| event | The playback event. See MEDIA_PLAYER_EVENT for details. |
|
pure virtual |
Reports the reception of the media metadata.
The callback occurs when the player receivers 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 |
Reports the playback duration that the buffered data can support.
In the process of playing online media resources, the mediaplayer kit triggers this callback every one second to report the playback duration that the currently buffered data can support.
PLAYER_EVENT_BUFFER_LOW(6).PLAYER_EVENT_BUFFER_RECOVER(7). | playCachedBuffer | The playback duration (ms) that the buffered data can support. |
|
pure virtual |
Triggered when the player addPreloadSrc.
| event |