This guide lists the software components required by the player and how they should be integrated.
It is recommended that you first use the sample
basic-playbackapplication (see below) to confirm that playback works using the downloaded
The following documentation is provided:
Contains several small sample applications that demonstrate how to use both simple and advanced features, for example, playing clear streams and playing encrypted streams.
HTML documentation for the player Java API.
The player consists of the following software components:
This mandatory file is the Java library file for controlling the player. It should be placed in the
libs directory. For example, if you use it with the
basic-playback sample application, place it in the
../basic-playback/libs directory (which you need to create if it does not exist).
This mandatory file is an encrypted licence that controls which player features and platforms are enabled based on your licence agreement. The player will not work without it. There are two types of licence:
- Trial licence – a time-limited licence that can be downloaded to evaluate the player. It works with any application ID domain name.
- Purchased licence – the licence that is provided once you have purchased the product. It only works with the application ID domain name you provided at time of purchase.
It must be placed in the Android
raw directory. For example, if you use it with the
basic-playback sample application, place it the
../basic-playback/src/main/res/raw directory (which you need to create if it does not exist).
This optional file can be used to modify default playback behaviour based on device capabilities or device name (for further information see Player profiling).
The player is designed for use with Android 5.0 (Lollipop) API level 21 and above.
Build environment setup
- Android Studio – latest version
- 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.
Setting up Android Studio
- Launch Android Studio.
- Copy the basic playbacks application to a local directory.
- From the Welcome to Android Studio launch page, select Import Project, then select the basic playback sample application.
- If prompted, select Yes to install missing programs and sync.
- From the SDK Manager, select platform support from Android 5.0 (Lollipop) and later. Optionally, just select the platforms for the device(s) you will be developing/testing on.
Build and run the sample application using the trial licence
- With the basic playback project loaded, download the trial
opy_licencefile and place it in the
rawdirectory (as described above).
- Confirm that the
opy-sdk-android-SW_VERSION-production.jarfile is in the
libsdirectory (as described above).
- Modify the
build.gradlefile to point to the correct
.jarfilename. (For example,
compile files('libs/opy-sdk-android-SW_VERSION-production.jar')OR rename the
- With an Android device connected, from Android Studio run the basic playback project. > Note > > The application must run on a Android device and not on an Android Studio Simulator.
- Big Buck Bunny should be playing on the Android target device.
- You can check the SDK version by looking for "This player is powered by SDK version:" in Android Studio's logcat output OR by using the player API
Build and run the sample application using the purchased licence
The purchased licence will only work with the application ID domain name that you registered when you purchased it. To use the purchased licence with any sample application, you must change the sample application domain name.
For example, if your application domain name is
com.your_company.your_player, change the
applicationId value in
Basic playback->build.gradle from
Then follow the instructions in the trial licence example above.
- Only one instance of the player is supported at any given time.
- When switching streams, the player must be stopped (
NMPVideoView.StopPlayback()) before starting the new playback session.