Package com.vdocipher.aegis.player.cache
Class VdoPreCacheManager
-
- All Implemented Interfaces:
public final class VdoPreCacheManager
Manager class responsible for caching video data. This class uses a singleton pattern to manage video pre-caching.
-
-
Method Summary
Modifier and Type Method Description final Unit
cacheVideo(String mediaId)
Caches the video with the given media ID. final Unit
cacheVideo(String mediaId, String customPlayerId)
Caches the video with the given media ID and optional custom player ID. final Unit
cacheVideo(String mediaId, String customPlayerId, String languageCode)
Caches the video with the given media ID, custom player ID, and optional language code. final Unit
clearCache()
Clears the cached video data. final static VdoPreCacheManager
getInstance(Context context, Config config)
Returns the singleton instance of VdoPreCacheManager, configuring it if necessary. final static VdoPreCacheManager
getInstance(Context context)
Returns the singleton instance of VdoPreCacheManager with default configuration. -
-
Method Detail
-
cacheVideo
final Unit cacheVideo(String mediaId)
Caches the video with the given media ID.
- Parameters:
mediaId
- The ID of the media to cache.
-
cacheVideo
final Unit cacheVideo(String mediaId, String customPlayerId)
Caches the video with the given media ID and optional custom player ID.
- Parameters:
mediaId
- The ID of the media to cache.customPlayerId
- An optional custom player ID to use for caching.
-
cacheVideo
final Unit cacheVideo(String mediaId, String customPlayerId, String languageCode)
Caches the video with the given media ID, custom player ID, and optional language code.
- Parameters:
mediaId
- The ID of the media to cache.customPlayerId
- An optional custom player ID to use for caching.languageCode
- The language code to be used for playback (optional).
-
clearCache
final Unit clearCache()
Clears the cached video data.
-
getInstance
final static VdoPreCacheManager getInstance(Context context, Config config)
Returns the singleton instance of VdoPreCacheManager, configuring it if necessary.
- Parameters:
context
- The context used to initialize the manager.config
- Configuration for video pre-caching.- Returns:
The singleton instance of VdoPreCacheManager.
-
getInstance
final static VdoPreCacheManager getInstance(Context context)
Returns the singleton instance of VdoPreCacheManager with default configuration.
- Parameters:
context
- The context used to initialize the manager.- Returns:
The singleton instance of VdoPreCacheManager.
-
-
-
-