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 of
BrightcoveMediaDrmCallback
that use Widevine
to support playback of DRM protected content in ExoPlayer 2.-
Field Summary
Modifier and TypeFieldDescriptionstatic final WidevineMediaDrmCallback
An empty instance of the WidevineMediaDrmCallback, to be returned if getInstance() is called and WidevineMediaDrmCallback is nullFields inherited from class com.brightcove.player.drm.BrightcoveMediaDrmCallback
BRIGHTCOVE_BASE_URL, DEFAULT_URL, defaultUrl, REQUEST_HEADERS
-
Constructor Summary
ConstructorDescriptionWidevineMediaDrmCallback
(String defaultUrl) Constructs a new Widevine based Media DRM callback handler. -
Method Summary
Modifier and TypeMethodDescriptionstatic WidevineMediaDrmCallback
Creates a new new Widevine based Media DRM callback handler using the given video and source properties.protected byte[]
executeKeyRequest
(String url, byte[] data) byte[]
executeKeyRequest
(UUID uuid, com.google.android.exoplayer2.drm.ExoMediaDrm.KeyRequest request) protected byte[]
executeProvisionRequest
(String url, byte[] data) byte[]
executeProvisionRequest
(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 Details
-
EMPTY
An empty instance of the WidevineMediaDrmCallback, to be returned if getInstance() is called and WidevineMediaDrmCallback is null
-
-
Constructor Details
-
WidevineMediaDrmCallback
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 Details
-
create
public static WidevineMediaDrmCallback create(@NonNull Map<String, Object> videoProperties, @NonNull Map<String, 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(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(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
- Throws:
IOException
-
executeKeyRequest
- Throws:
IOException
-