【发布时间】:2022-01-05 15:06:56
【问题描述】:
到目前为止,我只发现了不推荐使用的东西:
val evictor = LeastRecentlyUsedCacheEvictor((100 * 1024 * 1024).toLong())
val databaseProvider: DatabaseProvider = ExoDatabaseProvider(context)
val simpleCache = SimpleCache(File(context.cacheDir, "media"), evictor, databaseProvider)
val mediaSource = ProgressiveMediaSource.Factory(
simpleCache?.let {
CacheDataSourceFactory(
context,
100 * 1024 * 1024, 10 * 1024 * 1024, fileUrl, it
)
}
).createMediaSource(fileUrl)
player.prepare(mediaSource)
ExoDatabaseProvider 已弃用,CacheDataSourceFactory 是未解析的引用
【问题讨论】:
标签: android kotlin exoplayer exoplayer2.x