Package com.brightcove.player.drm
Class WidevineMediaDrmCallback
- java.lang.Object
-
- com.brightcove.player.drm.BrightcoveMediaDrmCallback
-
- com.brightcove.player.drm.WidevineMediaDrmCallback
-
- All Implemented Interfaces:
com.google.android.exoplayer2.drm.MediaDrmCallback
public class WidevineMediaDrmCallback extends BrightcoveMediaDrmCallback implements com.google.android.exoplayer2.drm.MediaDrmCallback
Provides a concrete implementation ofBrightcoveMediaDrmCallback
that use Widevine to support playback of DRM protected content in ExoPlayer 2.
-
-
Field Summary
Fields Modifier and Type Field Description static WidevineMediaDrmCallback
EMPTY
An empty instance of the WidevineMediaDrmCallback, to be returned if getInstance() is called and WidevineMediaDrmCallback is null-
Fields inherited from class com.brightcove.player.drm.BrightcoveMediaDrmCallback
BRIGHTCOVE_BASE_URL, DEFAULT_URL, defaultUrl, REQUEST_HEADERS
-
-
Constructor Summary
Constructors Constructor Description WidevineMediaDrmCallback(java.lang.String defaultUrl)
Constructs a new Widevine based Media DRM callback handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class com.brightcove.player.drm.BrightcoveMediaDrmCallback
addOptionalHeaders, getOptionalHeaders, setLicenseRequestHeaders, setOptionalHeaders, setVideoHeaders
-
-
-
-
Field Detail
-
EMPTY
public static final WidevineMediaDrmCallback EMPTY
An empty instance of the WidevineMediaDrmCallback, to be returned if getInstance() is called and WidevineMediaDrmCallback is null
-
-
Constructor Detail
-
WidevineMediaDrmCallback
public WidevineMediaDrmCallback(@Nullable java.lang.String defaultUrl)
Constructs a new Widevine based Media DRM callback handler.- Parameters:
defaultUrl
- the fully qualified URL to the DRM license service that will be used if the request does include an URL.
-
-
Method Detail
-
create
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)
Creates a new new Widevine based Media DRM callback handler using the given video and source properties.- Parameters:
videoProperties
- the video propertiessourceProperties
- the video source properties- Returns:
- reference to the new Widevine based Media DRM callback handler
-
executeProvisionRequest
public byte[] executeProvisionRequest(java.util.UUID uuid, @NonNull com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest request) throws com.google.android.exoplayer2.drm.MediaDrmCallbackException
- Specified by:
executeProvisionRequest
in interfacecom.google.android.exoplayer2.drm.MediaDrmCallback
- Throws:
com.google.android.exoplayer2.drm.MediaDrmCallbackException
-
executeKeyRequest
public byte[] executeKeyRequest(java.util.UUID uuid, com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest request) throws com.google.android.exoplayer2.drm.MediaDrmCallbackException
- Specified by:
executeKeyRequest
in interfacecom.google.android.exoplayer2.drm.MediaDrmCallback
- Throws:
com.google.android.exoplayer2.drm.MediaDrmCallbackException
-
executeProvisionRequest
protected byte[] executeProvisionRequest(java.lang.String url, byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
executeKeyRequest
protected byte[] executeKeyRequest(java.lang.String url, byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
-