DRM interface overview

The key elements of the digital rights management (DRM) system include MediaPlayer methods, the DRM class, and the DRMHelper class.

  • A reference to the object that implements the DRM subsystem:
    MediaPlayer.getDRMManager();
  • The DRMHelper helper class, which is useful when implementing DRM workflows. You can see DRMHelper in the PMPDemoApp.

  • A DRMHelper metadata loader method, which loads DRM metadata when it is located in a separate URL from the media.
    public static void loadDRMMetadata(final DRMManager drmManager, 
       final String drmMetadataUrl, 
       final DRMLoadMetadataListener loadMetadataListener);
  • A DRMHelper method to check the metadata to determine whether authentication is needed.

    /**
    * Return whether authentication is needed for the provided
    * DRMMetadata.
    *
    * @param drmMetadata
    * The desired DRMMetadata on which to check whether auth is needed.
    * @return whether authentication is required for the provided metadata
    */
    public static boolean isAuthNeeded(DRMMetadata drmMetadata);
  • DRMHelper method to perform authentication.
    /**
    * Helper method to perform DRM authentication.
    *
    * @param drmManager
    * the DRMManager, used to perform the authentication.
    * @param drmMetadata
    * the DRMMetadata, containing the DRM specific information.
    * @param authenticationListener
    * the listener, on which the user can be notified about the
    * authentication process status.
    * @param authUser
    * the DRM username provider by the user.
    * @param authPass
    * the DRM password provided by the user.
    */
    public static void performDrmAuthentication(final DRMManager drmManager, 
    final DRMMetadata drmMetadata, 
    final String authUser, 
    final String authPass, 
    final DRMAuthenticationListener authenticationListener);
  • Events that notify your application about various DRM activities and status.