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:
-
Start with the Basic Sample App.
-
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)
-
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:
-
Start with the Basic Sample App.
-
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 tonil
. Here is an example:let playbackService = BCOVPlaybackService(accountId: kViewControllerAccountID, policyKey: nil)
-
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.