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 Details

    • EMPTY

      public static final WidevineMediaDrmCallback EMPTY
      An empty instance of the WidevineMediaDrmCallback, to be returned if getInstance() is called and WidevineMediaDrmCallback is null
  • Constructor Details

    • WidevineMediaDrmCallback

      public WidevineMediaDrmCallback(@Nullable 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 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 properties
      sourceProperties - 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 interface com.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 interface com.google.android.exoplayer2.drm.MediaDrmCallback
      Throws:
      com.google.android.exoplayer2.drm.MediaDrmCallbackException
    • executeProvisionRequest

      protected byte[] executeProvisionRequest(String url, byte[] data) throws IOException
      Throws:
      IOException
    • executeKeyRequest

      protected byte[] executeKeyRequest(String url, byte[] data) throws IOException
      Throws:
      IOException