Interface IMediaPlayerCacheManager


public interface IMediaPlayerCacheManager
  • Method Details

    • removeAllCaches

      int removeAllCaches()
      Remove all media resource cache files.
      Returns:
      - 0: Success. - < 0: Failure.
    • removeOldCache

      int removeOldCache()
      Remove the latest media resource cache file.
      Returns:
      - 0: Success. - < 0: Failure.
    • removeCacheByUri

      int removeCacheByUri(String uri)
      Remove the cache file by uri, setting by MediaSource.
      Parameters:
      uri - URI,identify the uniqueness of the property, Set from `MeidaSource`
      Returns:
      - 0: Success. - < 0: Failure.
    • setCacheDir

      int setCacheDir(String path)
      Set cache file path that files will be saved to.
      Parameters:
      path - file path.
      Returns:
      - 0: Success. - < 0: Failure.
    • setMaxCacheFileCount

      int setMaxCacheFileCount(int count)
      Set the maximum number of cached files.
      Parameters:
      count - maximum number of cached files.
      Returns:
      - 0: Success. - < 0: Failure.
    • setMaxCacheFileSize

      int setMaxCacheFileSize(long cacheSize)
      Set the total size of the largest cache file.
      Parameters:
      cacheSize - total size of the largest cache file.
      Returns:
      - 0: Success. - < 0: Failure.
    • enableAutoRemoveCache

      int enableAutoRemoveCache(boolean enable)
      Set whether the player will clean up the cache in the order of resource usage.
      Parameters:
      enable - enable the player to automatically clear the cache.
      Returns:
      - 0: Success. - < 0: Failure.
    • getCacheDir

      String getCacheDir()
      Get the cache directory.
      Returns:
      - not null: Success. - null: Failure.
    • getMaxCacheFileCount

      int getMaxCacheFileCount()
      Get the maximum number of cached files.
      Returns:
      > 0: file count. - < 0: Failure.
    • getMaxCacheFileSize

      long getMaxCacheFileSize()
      Get the total size of the largest cache file
      Returns:
      > 0: file size. - < 0: Failure.
    • getCacheFileCount

      int getCacheFileCount()
      Get the number of all cache files.
      Returns:
      > 0: file count. - < 0: Failure.