Optional
onOptional
onOccurs when the media metadata is received.
The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
The detailed data of the media metadata.
The data length (bytes).
Optional
onReports the playback duration that the buffered data can support.
When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support. When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow (6). When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover (7).
The playback duration (ms) that the buffered data can support.
Optional
onReports the statistics of the media file being cached.
After you call the openWithMediaSource method and set enableCache as true, the SDK triggers this callback once per second to report the statistics of the media file being cached.
The statistics of the media file being cached. See CacheStatistics.
Optional
onReports the player events.
After calling the seek method, the SDK triggers the callback to report the results of the seek operation.
The player events. See MediaPlayerEvent.
The time (ms) when the event occurs.
Information about the event.
Optional
onOccurs when information related to the media player changes.
When the information about the media player changes, the SDK triggers this callback. You can use this callback for troubleshooting.
Information related to the media player. See PlayerUpdatedInfo.
Optional
onThe statistics of the media file being played.
The SDK triggers this callback once per second to report the statistics of the media file being played.
The statistics of the media file. See PlayerPlaybackStats.
Optional
onReports the changes of playback state.
When the state of the media player changes, the SDK triggers this callback to report the current playback state.
The playback state. See MediaPlayerState.
The reason for the changes in the media player status. See MediaPlayerReason.
Optional
onOptional
onReports the playback progress of the media file.
When playing media files, the SDK triggers this callback every two second to report current playback progress.
The playback position (ms) of media files.
Optional
onReports the events of preloaded media resources.
The URL of the media resource.
Events that occur when media resources are preloaded. See PlayerPreloadEvent.
Generated using TypeDoc
Provides callbacks for media players.