-
public final class VideoMediaCacheOwns a SimpleCache that caches video bytes streamed through ExoPlayer.
SimpleCache requires one instance per directory per process. Use create to obtain an instance; the factory guarantees that subsequent calls for the same directory return the existing cache instead of attempting to construct a second SimpleCache, which would throw.
The cache layer is composed outside any CDN URL-rewriting layer (see VideoCacheDataSourceFactory), so entries are keyed by the raw
dataSpec.uri(= the unsignedattachment.assetUrlfrom theMediaItem). On a cache miss the customer's io.getstream.chat.android.client.cdn.CDN still runs and signs the URL just in time; on a cache hit the bytes are served from disk and no CDN call is made.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classVideoMediaCache.Companion
-
Field Summary
Fields Modifier and Type Field Description private final SimpleCachecache
-
Method Summary
Modifier and Type Method Description final SimpleCachegetCache()The underlying SimpleCache. -
-
Method Detail
-
getCache
final SimpleCache getCache()
The underlying SimpleCache. Exposed so VideoCacheDataSourceFactory can plug it into the Media3 androidx.media3.datasource.cache.CacheDataSource.Factory; not intended for direct use by callers outside the
cache.internalpackage.
-
-
-
-