Offline Playback with DRM for the Player SDK for Android

In this topic, you will learn how to use the Brightcove Native Player SDK for Android to create apps that allow offline playback with DRM content protection.


The Native SDK for Android allows you to create mobile apps which include Offline playback of your video content, while keeping it secure with a Widevine Modular solution. The Native SDK simplifies your implementation for download management, offline catalog management, analytics, offline playback and DRM.

Supported versions

Offline DRM is supported on the following Android OS versions:

  • This beta release is supported on Android 5+
  • The GA release will be supported on Android 4.4+

Download the SDK

Get the latest version of the Brightcove Native SDK for Android, which includes code to implement offline playback with DRM.

Notes Samples
SDK Native SDK for Android v5.0.0 SDK Reference Release Notes Sample Application

or select this button:

Prepare videos

For videos that you want to be viewable offline, you need to use the CMS API to set the offline_enabled field to a value of true.

Here is an example using curl:

curl --header "Authorization: Bearer $oauth_token" --request PATCH --data '
{"offline_enabled" : true}
' account id/videos/your video id

Setting this field is similar to the steps found in the Setting 360-Video Properties with the CMS API document.

Known issues

The following known issues are related to offline playback with the Native SDK for Android.

Download Performance

It is recommended to test with shorter downloads, which will contain fewer segments. Our internal testing showed overall download performance can be slow because of the number of segments, Android download manager bugs, etc.

Long-form Video Downloads

Long-form video downloads (i.e. downloads of videos greater than 20 minutes in length) may overly stress the Android DownloadManager, and can cause the process to crash. While this issue has been observed in all versions of Android tested, it is more prevalent in earlier versions of the operating system.

Multiple Concurrent Downloads

Downloading multiple videos, regardless of the length of any individual video, is not yet supported. Allow users to download a video only after the previous one has been successfully completed.

Intermittent Audio Problems During Playback or Seeking

While playing downloaded content, intermittent audio dropouts may occur during playback, seeking and orientation changes of the device. This issue does not persist for more than a few seconds as the player recovers. When this happens, the following will be written to the logcat:

04-18 19:03:46.934 28764-28764/com.brightcove.player.test E/ExoPlayerVideoDisplayComponent: onAudioTrackUnderrun: bufferSize = 48000, bufferSizeMs = 250, elapsedSinceLastFeedMs = 1766

Audio problems did not occur when selecting another downloaded video or when going back to the original downloaded video.

Download File Management: Download Cancellation and Deletion

Canceling and deleting downloaded videos can sometimes fail to entirely clean up a download directory.

It is recommended that if a deleted video download is not entirely removed from the device, that it is possible to delete the remainder of the download through the Storage section of the Settings on the device.

For now, overriding the download directory is not supported.