Skip to main content
Skip table of contents

Playback of PlayReady encrypted content

To test this feature and view the example code, please see the Android SDK 5 Example Code Quick Start guide.

The CONNECT Player SDK provides tools to enable playback of PlayReady encrypted streams. Typically, PlayReady is supported on Android TV devices but not handheld Android devices.

As for Widevine, PlayReady protection is for DASH streams only. PlayReady does not yet support the following features :

  • Offline playback

  • Key-rotation and temporal licence pre-delivery.

  • Secure Session Management (SSM). The provided OTVSSMHttpMediaDrmCallback class currently only works with Widevine streams. However, you can implement session control according to the specifics of the Session Management server they use. See the customised-encrypted-playback example code for customising the DRM callback class.

Enabling PlayReady

Enabling playback of PlayReady-protected streams is very similar to enabling playback for Widevine protected streams. Follow the instructions for Widevine, and then modify the changes according to the instructions here. The changes required involve setting up the DRM callback class (usually OTVHttpMediaDrmCallback) slightly differently:

  • The HTTP headers (the key request properties) are different.

  • The DRM type needs to be set explicitly to PlayReady.

  1. Add the dependency:

    JAVA
    ocm.google.protobuf:protobuf-java
  2. Configure the DRM handler using the setKeyRequestProperty() method. The values below are typical for PlayReady systems. However, you are advised to consult the providers of the PlayReady licence server.

    JAVA
        drmCallback.setKeyRequestProperty("Accept",       "text/xml");
        drmCallback.setKeyRequestProperty("Content-Type", "text/xml");

    For NAGRA-provided licence servers, the Accept and Content-Type values must be set to text/xml. Binary and JSON format are not supported.

  3. Explicitly set the DRM type of the OTVMediaDrmCallback implementation (e.g. OTVHttpMediaDrmCallback) to PlayReady:

    JAVA
    drmCallback..setDrmType(OTVCommonMediaDrmCallback.OTV_DRMTYPE_PLAYREADY);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.