Offline Playback with the Native Player SDKs

Product(s)
Video Cloud
Role(s)
Device SDK Developer
Task(s)
Develop with the Native SDKs
Topic(s)
Playback
SDK
Android

In this topic, you will learn how offline playback works with the Brightcove Native Player SDKs.

Offline Playback with the Brightcove Native Playback SDKs for iOS and Android allows publishers to reach their viewers in entirely new ways while ensuring their content remains secure. Our SDKs offer powerfully simple solutions for complex offline playback problems including download management, offline catalog management, analytics, DRM, and of course playback.

Using offline playback, users can download both DRM-protected and non-encrypted video content to their devices and watch it when they are not connected.

Supported device versions

The Brightcove Native Player SDKs support offline DRM with the following device OS versions:

  • iOS 10.0+, but 10.3+ is recommended
  • Android 5.0+

Content delivery

Streaming video takes advantage of Video Cloud's multi-bitrate streaming feature which detects bandwidth at the source and delivers the best quality for the device. The offline playback feature supports the following streaming types:

  • iOS: Apple HTTP Live Streaming (HLS)
  • Android: Dynamic Adaptive Streaming over HTTP (DASH)

Security

The protection of downloaded content is top-of-mind with our Offline DRM solution. The Brightcove Native Player SDKs provide the following functionality to ensure your content is stored safely on viewers devices:

  • Your content is protected by Widevine Modular on Android and FairPlay on iOS.
  • Video content can only be watched on the device and app that has downloaded the content.
  • Video content can only be watched until a specific date and time expiration.
  • Video URLs returned to the client will expire so that others can not use them.
  • When the app is deleted, all downloaded content is removed when using the default storage location.
  • Your app can delete locally stored content at any time.

Download management

The Brightcove Native Player SDKs handle the complexities of downloading content to a viewer's device, greatly simplifying the process for native applications.

  • Publishers can specify the maximum average bitrate for the downloaded video.
  • Captions can be downloaded and displayed while offline.
  • Multiple audio tracks are supported with the Native SDK for Android. For now, only single audio tracks are supported with the Native SDK for iOS.

The following functionality can be added to your apps to support download management:

Display content

Display a list of content available for streaming or download.

When you set a video's offline_enabled property to true using the CMS API, the Native SDKs will mark this video as downloadable.

Display content
Display content

Show download status

Display the current download along with its status.

Total estimated size, current download status and percent of downloading progress information will be returned by the SDKs.

Manage the download queue

Create and manage the download queue.

The Native SDKs will allow mutliple videos to be queued for downloads. For example, a user can download multiple episodes of a season and the Native SDKs will manage the process by providing download status for each asset.

Show local storage space

Inform the user when there is not enough local storage to complete downloading the current item and any items in the queue.

The SDKs provide the estimated size and progress so that you can determine if there is sufficient space for downloads.

Pause/resume/cancel download

Allow the user to pause, resume or cancel content download.

Download functionality will resume where it left off if the user pauses/resumes or if the download is interrupted. For example, it you lose Wi-Fi connection during download, it will resume where it left off when you are reconnected.

If you cancel a video download, then any progress made will be erased.

Local catalog management

The Brightcove Native Player SDKs simplify the process of managing downloaded local content.

The following functionality can be added to your apps to support local catalog management:

Show downloaded content

Show all of the downloaded episodes for each show/season.

The SDKs return metadata and playback details for all downloaded content. This metadata includes video title, description, thumbnails, available captions, available audio tracks, etc.

There are also new metadata properties specific to offline playback. These include the following:

  • Token identifier
  • License expiration date
  • Download start and end time
  • Downloaded thumbnail name along with its file URL
  • Downloaded poster name along with its file URL
  • Relative and derived file URL of the video bundle

You can then filter the results for your specific implementation.

Delete local content

Allow users to delete content from local storage.

The SDKs expose a method to delete a video along with its metadata and related assets.

Content playback

The Native SDKs allow you to play content in the following situations:

  • Play a video while it downloads.
  • Play a video after it has been downloaded. Downloaded content can be played back locally when the device is offline or online. The offline video can only be played from local storage.
  • If you choose to stream an online version of the video, you should retrieve a new video object from the Playback Service.

Analytics

Analytics introduced for measuring data related to the Offline flow include the following Download analytics:

  • Every download request - This includes rendition bitrate and rendition dimensions
  • Every download complete
  • Every download failure
  • Every download cancellation

For details about viewing these download metrics from the Analytics API, see the Dimension: video document.