Abstract
Abstract
enableSets whether to delete cached media files automatically.
If you enable this function to remove cached media files automatically, when the cached media files exceed either the number or size limit you set, the SDK automatically deletes the least recently used cache file.
0: Success. < 0: Failure. See MediaPlayerReason.
Whether to enable the SDK to delete cached media files automatically: true : Delete cached media files automatically. false : (Default) Do not delete cached media files automatically.
Abstract
getGets the storage path of the cached media files.
If you have not called the setCacheDir method to set the storage path for the media files to be cached before calling this method, you get the default storage path used by the SDK.
The call succeeds, and the SDK returns the storage path of the cached media files. < 0: Failure. See MediaPlayerReason.
An input parameter; the maximum length of the cache file storage path string.
Abstract
getAbstract
getGets the maximum number of media files that can be cached.
By default, the maximum number of media files that can be cached is 1,000.
0: The call succeeds and returns the maximum number of media files that can be cached. < 0: Failure. See MediaPlayerReason.
Abstract
getGets the maximum size of the aggregate storage space for cached media files.
By default, the maximum size of the aggregate storage space for cached media files is 1 GB. You can call the setMaxCacheFileSize method to set the limit according to your scenarios.
0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files. < 0: Failure. See MediaPlayerReason.
Abstract
removeAbstract
removeAbstract
removeDeletes a cached media file that is the least recently used.
You can call this method to delete a cached media file when the storage space for the cached files is about to reach its limit. After you call this method, the SDK deletes the cached media file that is least used. The cached media file currently being played will not be deleted.
0: Success. < 0: Failure. See MediaPlayerReason.
Abstract
setSets the storage path for the media files that you want to cache.
Make sure IRtcEngine is initialized before you call this method.
0: Success. < 0: Failure. See MediaPlayerReason.
The absolute path of the media files to be cached. Ensure that the directory for the media files exists and is writable.
Abstract
setAbstract
setSets the maximum size of the aggregate storage space for cached media files.
0: Success. < 0: Failure. See MediaPlayerReason.
The maximum size (bytes) of the aggregate storage space for cached media files. The default value is 1 GB.
Generated using TypeDoc
This class provides methods to manage cached media files.