Viblast Android SDK supports PlayReady
, Widevine
, ClearKey
or Multi-DRM protected DASH streams.
To enable DRM
support, the Application must provide ViblastDrmCallback
object when the player is created. If the object is null
, the Viblast Player can not handle DRM
protected streams.
When the playback of protected stream starts:
- The Renderer detects the available
CDM
pssh boxes. - Then internally notifies the player that the stream is protected with a list of applied
CDMs
. - Viblast Player selects device supported
CDMs
from the list and invokesonDrmInfoNeed
of theViblastDrmCallback
object. - The Application chooses the desired CDM and returns it with the
ViblastDRMInfo
object as a result of the callback. - Viblast Player uses the result object
ViblastDrmInfo
in order to initialize theCDM
and to provision the key acquisition requests. - If the result is
null
then the player will inform the Renderer that theDRM
is not supported and the playback will not continue.
com.viblast.android.drm
Implementation of this interface is passed to the ViblastPlayer, allowing it to interact with the calling application to retrieve CDM
specific data.
ViblastDRMInfo onDrmInfoNeed(Set<UUID> cdmUUIDs);
- Returns a ViblastDRMInfo object containing the desired
CDM
initialization data. Might benull
if the application can not handle any of the passedCDMs
. - parameter cdmUUIDs - a set of
CDM
UUIDs supported by the device and applicable for the protected stream.
Provides the information needed for initialization and operation of the desired CDM
.
ViblastDrmInfo(UUID selectedCdmUUID, String licenseServerUrl)
throws IllegalArgumentException;
- Creates an object with the given
CDM
UUID and the DRM license serverurl
. - throws IllegalArgumentException if the selectedCdmUUID is null
String getLicenseServerUrl();
- Returns the license server
url
String getSelectedCdmUUID();
- Returns the
CDM
UUID
void addDrmKeyRequestProperty(String key, String value);
- Adds key request property. The key will be added as a header to the http requests performed by the underlying security module.
void removeDrmKeyRequestProperty(String key);
- Removes a key request property.
void removeAllDrmKeyRequestProperties(String key);
- Removes all keys request properties.
String getDrmKeyRequestProperty(String key);
- Returns the value of the given key. Might be null.
Map<String, String> getAllDrmKeyRequestProperties();
- Returns all added keys.