Class BrightcoveMediaDrmCallback

java.lang.Object
com.brightcove.player.drm.BrightcoveMediaDrmCallback
Direct Known Subclasses:
WidevineMediaDrmCallback

public class BrightcoveMediaDrmCallback extends Object
Provides a base implementation of Media DRM callback handler that can be used to concrete implementations specific to ExoPlayer/CDM.
  • Field Details

    • DEFAULT_URL

      public static final String DEFAULT_URL
      The name of the property in the video properties map that specified the default URL to the DRM license service that should be used if the request does not include an URL.
      See Also:
    • REQUEST_HEADERS

      protected static final Map<String,String> REQUEST_HEADERS
      A map of HTTP headers that should be added to the license request.
    • BRIGHTCOVE_BASE_URL

      protected static final String BRIGHTCOVE_BASE_URL
      The base URL to Brightcove DRM license service.
      See Also:
    • defaultUrl

      protected final String defaultUrl
      The fully qualified URL to the DRM license service that will be used if the request does include an URL.
  • Constructor Details

    • BrightcoveMediaDrmCallback

      protected BrightcoveMediaDrmCallback(@Nullable String defaultUrl)
  • Method Details

    • getOptionalHeaders

      @Nullable public Map<String,String> getOptionalHeaders()
      Gets the optional request headers that will be passed to the license key request.
      Returns:
      null or reference to an immutable map of request headers.
    • setOptionalHeaders

      public void setOptionalHeaders(@Nullable Map<String,String> optionalHeaders)
      Sets the optional request headers that must be passed to the license key request.
      Parameters:
      optionalHeaders - null or reference to an immutable map of request headers.
    • addOptionalHeaders

      public void addOptionalHeaders(@NonNull Map<String,String> optionalHeaders)
      Adds the optional request headers that must be passed to the license key request.
      Parameters:
      optionalHeaders - The map of headers to be added.
    • setVideoHeaders

      @Deprecated protected void setVideoHeaders(@NonNull Map<String,Object> videoProperties)
      Deprecated.
      Sets the Video widevine headers from the videoProperties if available, through the Video.Fields.WIDEVINE_HEADERS key.
      Parameters:
      videoProperties - the video properties.
      See Also:
    • setLicenseRequestHeaders

      protected void setLicenseRequestHeaders(@NonNull Map<String,Object> videoProperties)