public class WidevineMediaDrmCallback extends BrightcoveMediaDrmCallback implements com.google.android.exoplayer2.drm.MediaDrmCallback
BrightcoveMediaDrmCallback
that use Widevine
to support playback of DRM protected content in ExoPlayer 2.BRIGHTCOVE_BASE_URL, DEFAULT_URL, defaultUrl, REQUEST_HEADERS
Constructor and Description |
---|
WidevineMediaDrmCallback(java.lang.String defaultUrl)
Constructs a new Widevine based Media DRM callback handler.
|
Modifier and Type | Method and Description |
---|---|
static WidevineMediaDrmCallback |
create(java.util.Map<java.lang.String,java.lang.Object> videoProperties,
java.util.Map<java.lang.String,java.lang.Object> sourceProperties)
Creates a new new Widevine based Media DRM callback handler using the given video and source properties.
|
protected byte[] |
executeKeyRequest(java.lang.String url,
byte[] data) |
byte[] |
executeKeyRequest(java.util.UUID uuid,
com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest request) |
protected byte[] |
executeProvisionRequest(java.lang.String url,
byte[] data) |
byte[] |
executeProvisionRequest(java.util.UUID uuid,
com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest request) |
addOptionalHeaders, getOptionalHeaders, setLicenseRequestHeaders, setOptionalHeaders, setVideoHeaders
public WidevineMediaDrmCallback(@Nullable java.lang.String defaultUrl)
defaultUrl
- the fully qualified URL to the DRM license service that will be used if
the request does include an URL.public static WidevineMediaDrmCallback create(@NonNull java.util.Map<java.lang.String,java.lang.Object> videoProperties, @NonNull java.util.Map<java.lang.String,java.lang.Object> sourceProperties)
videoProperties
- the video propertiessourceProperties
- the video source propertiespublic byte[] executeProvisionRequest(java.util.UUID uuid, @NonNull com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest request) throws java.io.IOException
executeProvisionRequest
in interface com.google.android.exoplayer2.drm.MediaDrmCallback
java.io.IOException
public byte[] executeKeyRequest(java.util.UUID uuid, com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest request) throws java.lang.Exception
executeKeyRequest
in interface com.google.android.exoplayer2.drm.MediaDrmCallback
java.lang.Exception
protected byte[] executeProvisionRequest(java.lang.String url, byte[] data) throws java.io.IOException
java.io.IOException
protected byte[] executeKeyRequest(java.lang.String url, byte[] data) throws java.io.IOException
java.io.IOException