The key elements of the digital rights management (DRM) system include MediaPlayer methods, the DRM class, and the DRMHelper class.
MediaPlayer.getDRMManager();
The DRMHelper helper class, which is useful when implementing DRM workflows. You can see DRMHelper in the PMPDemoApp.
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);
/** * 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);