3

So far I found only deprecated stuff:

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 is deprecated and CacheDataSourceFactory is unresolved reference

1 Answers1

1

Use CacheDataSource.Factory() instead of CacheDataSourceFactory and StandaloneDatabaseProvider instead of ExoDatabaseProvider.

sdex
  • 3,169
  • 15
  • 28