Skip to main content
Skip table of contents

Media3 NAGRA PRM Extension Example Code Quick Start

This guide describes how to use the Media3 Nagra PRM Extension SDK to view the example code and demonstrate its features.

Prerequisites

Make sure you have the latest https://developer.android.com/studio/install installed, including:

  • Android SDK – install the latest version from Android Studio when prompted.

  • Gradle – use the latest version as recommended by Android Studio.

  • JDK – use the version provided with Android Studio.

Download the Android SDK pack, which supplies all the files needed to launch the player and start streaming content.

  • media3-prm-extension-<SW_VERSION>-example-code.zip

    This contains several small sample application projects which demonstrate how to use simple and advanced features; for example, playing clear and encrypted streams.

  • media3-prm-extension-<SW_VERSION>-sdk-integration.aar

    This is the SDK binary file used for integration purposes.

    Note: if target running device doesn't have built in PRM decryption, the SDK file above would be named media3-prm-extension-<SW_VERSION>-sdk-prm-integration.aar.

You also need a device running Android 5.x (Lollipop) onwards.

The application must be run on an Android device enabled for debugging; the player cannot run on an Android Emulator.

Procedure

  1. Save the SDK pack to your desktop and unzip it. The extracted package contains a zipped set of example code. Extract the contents example-code.zip file to your desktop.

  2. Copy the media3-prm-extension-<SW_VERSION>-sdk-integration.aar file to the common/libs directory. NAGRA recommends you rename it as otvsdk.aar.

  3. Start Android Studio and 'Open an existing Android Studio project' by pointing at the top-level directory of the extracted package.

  4. In Android Studio, select the required project, for example:

    • basic-playback: demonstrates playback of a clear stream with no additional functionality.

    • connect-prm: demonstrates playback of NAGRA PRM-protected HLS streams on a compliant Android STB.

    • local-playback: demonstrates playback of an encrypted HLS stream from a local data source on a compliant Android STB.

  5. Connect an Android device to your development machine via USB, and build and run the application.

Further information

JavaScript errors detected

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

If this problem persists, please contact our support.