Skip to main content
Skip table of contents

Unified API Example Code Quick Start

Use this guide to demonstrate Unified Player Interface (UPI) features and view the example code.

The Unified Player Interface (UPI) provides a different set of APIs, which are aligned with similar APIs on other CONNECT player platforms (Apple iOS/tvOS, Browsers, Connected TV, HbbTV, React Native). At the heart of this API is a player based on the IOTVUPIPlayer interface rather than the traditional OTVVideoView. See the nagra.otv.upi package API documentation.

For the development tools, current dependencies and minimum build configuration required, see (5.33.x) Prerequisites and dependencies

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

  • opy-sdk-android-5.35.x-example-code-upi.zip
    This package demonstrates how to work with the UPI interface.

  • opy-sdk-android-5.35.x-sdk-integration.aar
    The no-PRM version of the SDK binary file used for integration purposes.

You will also need a device running Android 5.x (Lollipop) onwards with debugging enabled; the player cannot run on an Android Studio simulator.

Procedure

  1. Extract the opy-sdk-android-5.35.x-example-code-upi.zip to your desktop.

  2. Go to opy-sdk-android-5.35.x-example-code-upi > common, and place the opy-sdk-android-5.35.x-sdk-integration.aar file in the libs folder.

  3. Open Android Studio, select Open an Existing Project and locate the opy-sdk-android-5.35.x-example-code-upi folder.

  4. When the project has built, select the required project from the dropdown menu (not the side file list); see the example projects below.

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

Click here to see the example projects available.

Playback

basic-playback-upi

Basic playback functionality with no encryption.

basic-playback-upi-kt

Basic playback functionality with no encryption, Kotlin version.

resolution-capping-upi

Playback of clear streams with resolution capping.

thumbnails-upi

Playback of clear streams with DASH-IF thumbnail previews.

track-selection-upi

Shows how to detect and select tracks in streams with subtitles, multi-audio and multi-video.

Encrypted playback

encrypted-playback-upi

Playback of Widevine-encrypted content.

ssm-encrypted-playback-upi

Playback of Widevine-encrypted streams with Secure Session Management.

Hardware support

connect-upi

Playback of CONNECT-encrypted DASH streams with NAGRA CONNECT.

JavaScript errors detected

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

If this problem persists, please contact our support.