<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br />

Digital rights management depends upon the hardware that is being used and allows you to protect the digital media in your app. On Android 4.3+, DRM-protected playback is supported for any DRM scheme for which a modular DRM component exists on the device. All Android devices are required to support Widevine modular DRM (with L3 security, although many devices also support L1).

<br /> <hr />

## Requirements

  • Android 4.3+

  • DRM license server URL

<br /> <hr />

## Supported DRM provider

Google Widevine

ο»Ώ

Not all Android devices may have secure decoders for every video codec. You can use Android's <a href="https://developer.android.com/reference/android/media/MediaCodecList.html" target="_blank">MediaCodecList</a> class to find out if secure playback for a particular codec is supported on a device.

<br /> <hr />

## Configure the playback

Regardless of the DRM provider that you use, the following steps generally apply to enable the playback of DRM-protected content:

  1. Add a **Util.java** to your project. This utility is used by the `MediaDrmCallback` class to download data.

    ο»Ώ
  2. Add the appropriate DRM provider callback .java file to your project. Contact your DRM provider for its suggested `MediaDrmCallback` implementation for Android.<br /><br />For the following generic Widevine implementation example, assume that each new `PlaylistItem` requires a unique `contentId` and `provider`. This implementation enables you to specify these required values for every instance of `WidevineMediaDrmCallback`.

    ο»Ώ
  3. Set the video URL of your DRM-protected video to a `PlaylistItem` (`file`).

  4. Create a new instance of your `MediaDrmCallback` implementation and set it to the `PlaylistItem`.

    ο»Ώ

<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>