onPlayerCacheStats property

void Function(CacheStatistics stats)? onPlayerCacheStats
final

报告当前缓存中的媒体资源的相关信息。

调用 openWithMediaSource 方法且设置 enableCache 成员为 true 后,SDK 会在媒体文件打开后每秒触发一次该回调,报告当前缓存的媒体文件的统计数据。

  • stats 缓存中的媒体资源的相关信息,详见 CacheStatistics 。

Implementation

final void Function(CacheStatistics stats)? onPlayerCacheStats;