This guide enables you to demonstrate CONNECT Player features and view the Kotlin version of the example code.
Make sure you have the latest Android Studio 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, which supplies all the files needed to launch the player and start streaming content.
This package demonstrates how to implement the same features in the Kotlin language.
The SDK binary file used for integration purposes.
PRM version of the SDK binary file used for integration purposes.
The PRM Operational Vault file opvault.json. is provided separately.
A device running Android 5.x (Lollipop) onwards with debugging enabled; the player cannot run on an Android Studio simulator.
Some features may have additional dependencies and libraries; see the README.md and build.gradle files in the relevant example code packages.
Extract the opy-sdk-android-5.18.x.x-example-code-kotlin.zip file to your desktop.
Go to opy-sdk-android-5.18.x.x-example-code-kotlin > common, and place the opy-sdk-android-5.18.x.x-sdk-integration.aar or opy-sdk-android-5.18.x.x-sdk-prm-integration.aar file in the libs folder.
- Open Android Studio, select Open an Existing Project and locate the opy-sdk-android-5.18.x.x-example-code-kotlin folder.
For PRM playback, expand src > main > res and create a new directory raw; add your opvault.json file to this folder. The existing one will not work with your PRM server.; see the PRM Example Code Quick Start guide.
- When the project has built, select the required project from the dropdown menu (not the side file list); see the example projects below.
Connect an Android device to your development machine via USB and run the application.
- basic-playback-kt - Demonstrates playback of a clear stream with no additional functionality.
- resolution-capping-kt - Playback of clear streams with resolution capping.
- track-selection-kt - Playback of clear streams with multi-audio.
- offline-kt - Offline playback of Widevine encrypted content.
- offline-hls-kt - Offline playback of HLS streams.
- offline-service-kt - Downloading as a service for DASH streams.
- offline-service-prm-kt - Downloading as a service for DASH and HLS streams.