Package com.castlabs.android.player
Class HlsClearKeyCache
java.lang.Object
com.castlabs.android.player.HlsClearKeyCache
- Direct Known Subclasses:
MemoryHlsClearKeyCache
Cache for
Drm.Clearkey.
Can be gotten or PlayerController.setHlsKeyCache(HlsClearKeyCache) set}
in the PlayerController.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancontainsUri(Uri uri) Checks if a URI is present in the cache.abstract byte[]Returns the encryption key cached against the given URI.abstract byte[]Inserts an entry into the cache.abstract byte[]Removes a URI from the cache.
-
Constructor Details
-
HlsClearKeyCache
public HlsClearKeyCache()Default constructor for HlsClearKeyCache.
-
-
Method Details
-
get
Returns the encryption key cached against the given URI.- Parameters:
uri- The URI to look up in the cache- Returns:
- The cached encryption key, or null if the URI is not in the cache
-
put
Inserts an entry into the cache.- Parameters:
uri- The URI to cache the encryption key againstencryptionKey- The encryption key to cache- Returns:
- The previous encryption key associated with the URI, or null if there was none
- Throws:
NullPointerException- if uri or encryptionKey are null
-
containsUri
Checks if a URI is present in the cache.- Parameters:
uri- The URI to check- Returns:
- true if the URI is present in the cache, false otherwise
- Throws:
NullPointerException- if uri is null
-
remove
Removes a URI from the cache.- Parameters:
uri- The URI to remove from the cache- Returns:
- The encryption key that was associated with the URI, or null if the URI was not in the cache
- Throws:
NullPointerException- if uri is null
-