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.zipThis 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.aarThis 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
-
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.
-
Copy the
media3-prm-extension-<SW_VERSION>-sdk-integration.aarfile to thecommon/libsdirectory. NAGRA recommends you rename it asotvsdk.aar. -
Start Android Studio and 'Open an existing Android Studio project' by pointing at the top-level directory of the extracted package.
-
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.
-
-
Connect an Android device to your development machine via USB, and build and run the application.
Further information
-
For details on integrating the SDK with your application, see the full Media3 NAGRA PRM Extension Integration Guide .
-
See also the API reference guide provided in the Android SDK pack.