Using Playback Rights with the Native SDKs

In this topic, you will learn how to use Brightcove's Playback Rights with the Brightcove Native SDKs.

Introduction

By default, the Native SDKs talk to the Brightcove Playback API to retrieve your video and playlist content. A new system to manage playback rights and restrictions sits in front of the Playback API and provides playback authorization using DRM licenses.

If you are not familiar with this feature, see the Overview: Playback Rights Management Service document.

Make requests using Playback Rights:

Android implementation

To make Playback API requests which check for Playback rights and restrictions, follow these steps:

  1. Start with the Basic Sample App.

  2. By default, the Native SDK for Android makes a request to the Playback API if it has a policy key. To utilize Playback rights, do not send the policy key with your request.

    Create an instance of com.brightcove.player.edge.Catalog, without supplying a policy key. Here is an example:

    Catalog catalog = new Catalog.Builder(eventEmitter, accountId).build();

    If you are following the Brightcove sample app, it gets the account id as shown here:

    getString(R.string.account)

  3. For user-level restrictions, you need to create a JWT token and pass it with the catalog request.

    To create your JWT token, follow the steps in the Define user-level restrictions section of the Implementing Playback Rights Management Service document.

    To pass your token with the catalog request, follow the steps in the Android Implementation section of the Using Playback Authorization DRM with the Native SDKs document.

iOS implementation

To make Playback API requests which check for Playback rights and restrictions, follow these steps:

  1. Start with the Basic Sample App.

  2. By default, the Native SDK for iOS makes a request to the Playback API if it has a policy key. To utilize Playback rights, do not send the policy key with your request.

    Create an instance of BCOVPlaybackService, setting the policy key to nil. Here is an example:

    let playbackService = BCOVPlaybackService(accountId: kViewControllerAccountID, policyKey: nil)
  3. For user-level restrictions, you need to create a JWT token and pass it with the catalog request.

    To create your JWT token, follow the steps in the Define user-level restrictions section of the Implementing Playback Rights Management Service document.

    To pass your token with the catalog request, follow the steps in the iOS Implementation section of the Using Playback Authorization DRM with the Native SDKs document.