CacheKeyAesCipherDataSourceFactory

constructor(cacheKeyFactory: CacheKeyFactory, secretKey: ByteArray, upstream: DataSource.Factory)

Parameters

cacheKeyFactory

An instance of CacheKeyFactory. Must be the same as the one used for caching or offlining this piece of content.

secretKey

A secretKey of ByteArray. Must be the same value for the same content when reading from a DataSource and writing to aandroidx.media3.datasource.DataSink.

upstream

An instance of DataSource.Factory. Should normally be any type of androidx.media3.datasource.cache.CacheDataSource.Factory, depending on if your content has been cached or offlined.