Package 

Class VideoMediaCache


  • 
    public final class VideoMediaCache
    
                        

    Owns 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 unsigned attachment.assetUrl from the MediaItem). 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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final SimpleCache cache
    • Method Summary

      Modifier and Type Method Description
      final SimpleCache getCache() The underlying SimpleCache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait