Lumen help
Note: This integration is deprecated and will be sunset. We strongly recommend using Mesh Delivery Android SDK 22.01 and above.
Mesh Delivery for Streaming can be easily integrated with VOPlayer into your Android and Android TV app, in just a few simple steps using our Legacy SDK for Android. In this guide, we will show you how to integrate legacy Mesh Delivery using VOPlayer on Android.
Dependencies
The easiest way to get the Lumen SDK is to add it as a Gradle dependency. We assume you are using Android Studio with the latest tools updates as recommended by Google. If not, write to us at cdnsupport@lumen.com.
Next, add the Mesh Delivery dependency to the build.gradle file of your app module.
Android version requirement
Mesh Delivery is validated on Android Lollipop, version 5.0 and above.
Mesh Delivery can still be included as a dependency for build targets Android kitKat 4.4 and lower, however the peer-to-peer module will be disabled at runtime. Google doesn't support Android 4.4 and lower anymore.
Java version requirement
The latest versions of our SDK use the lambda feature of Java 8, which is supported by all Android devices.
As mentioned in the official documentation, you must configure your project with the following snippet:
Integrate Lumen SDK
1. Set streamrootKey
Before doing anything, you must set the streamrootKey as a metadata in the application manifest.
streamrootKey: Refers to your Lumen unique identifier that you will find in the Account section of the Mesh Delivery Dashboard. If you don't have one, you can ask for a free trial on our website.
Note: It is also possible to pass your streamrootKey at Lumen Delivery Client instantiation and initialization.
2. Create a new Lumen Delivery Client instance
Now that you have set the streamrootKey, you are able to create the Lumen Delivery Client instances.
Other DNA options can be called in the builder. Please refer to dnaConfig overview for android to learn more about them.
Note: In a Live use case, to optimize the efficiency of our solution, you will need to customize the latency at player's level. This will impact the time we have to do any p2p exchange.
On the VO Player, you will be need to use the `latencyPerChunkCount` parameter passed in the class constructor. As this parameters is in "number of chunks", it depends on your packaging parameters. Your latency in seconds will then be `latencyPerChunkCount` multiplied by the duration of your chunks.
The minimum buffer level of the VO Player is 20 seconds, so we advise on putting at least a 30 seconds latency to have efficient results. The latency needs also to be lower than the playlist duration.
For VOD, put 0 there.
3. Give your player the new URL
Once you have a running instance of the SDK, you must retrieve the final URL and input it to your player instead of your original one. The SDK exposes a getManifestUrl() method that will do it as expected.
4. Implement the playerInteractor
This player interactor module is how our SDK gets accurate metrics regarding the client session. The SDK will need the following information to work optimally:
5. Implement the BandwidthMeter
The BandwidthMeter allows for estimating the bandwidth needed to download video chunks. The SDK will need:
Please refer to the example below.
Then call the bandwidthListener in the builder.
6. Integrate the QoS Module (optional)
This QoS module will link VOPlayer events to our SDK to get accurate metrics on the client session. If the QoS module is not implemented, a default module directly embedded in the SDK will be used instead.
The following is an example of the class to add to the app to do so.
You must then call the VOQosModule in the builder.
7. Stop the Mesh Delivery Client
Once the video is done playing, you must stop the SDK you created earlier. Calling the following method will finish the ongoing tasks and release the resources.
8. Network security configuration
Starting with Android 9 (API level 28), cleartext support is disabled by default.
As Streamroot SDK works as a local HTTP proxy, it is required to do one of the following
More info can be found in the Android documentation.
Explore CDN services