On top of the stats API exposed by the SDK, we created a view helper to help you integrate and understand Mesh Delivery faster. The DebugView will inform you about the different states of the SDK lifecycle and Lumen metrics.
This view also has a "P2P POLICY" and "STOP SDK" button.
See bellow for the "P2P POLICY" setting.
The "STOP SDK" button allows you to dynamically turn off the Mesh SDK and leaving only the proxy running.
The view looks like the following:
Adding a debugView
is really simple.
First, you will need to add the following dependency to the build.gradle
implementation 'io.streamroot.lumen.delivery.client:mesh-sdk-utils:22.03.0'
Then, you will need to update your layout to include the following snippet
<io.streamroot.lumen.delivery.client.utils.LumenStatsView
android:id="@+id/statsview_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Finally, you will need to retrieve your view by your preferred method and link it with a LumenDeliveryClient
instance
// Helper function to initializing the stats view
private fun initStatsView(dcStatsView: View) {
dcStatsView.apply {
// Instanciate a LumenStatsVie
val statsView = LumenStatsView(context)
lumenDeliveryClient?.addStateStatsListener(statsView)
// Display the stat view. Otherwise it is hidden by default
statsView.showStats()
addView(statsView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
}
}
dcStatsView = ...
initStatsView(dcStatsView)
What are the Scores?
Each block represents a CDN within a CDN List which can be selected within an Orchestrator Property. This block contains all the relevant information about that CDN and the different parameters measured from it. This information is necessary for the Orchestrator to make an informed decision about when to switch the CDN in order to select the best source for each video segment.
Parameter | Description | Unit |
---|---|---|
Cdn | Total amount of Bytes downloaded from the CDN. | MB |
Mesh | Total amount of Bytes downloaded from the Mesh network. | MB |
Upload | Total amount of Bytes uploaded to the Mesh network. | MB |
Offload | Global efficiency of Mesh delivery, the ratio of CDN vs Mesh. | |
Peers |
Number of connected peers with
|
|
PeerID |
Unique ID of the viewer used to identify each peer in the Mesh network. |
|
Content ID |
ID of the content currently been played back. Either the custom one defined with the content Id function or the default one based on the content URL. |
|
P2P Cache size |
Current amount of video data stored in the cache by the Mesh SDK / Total amount of data the Mesh SDK will ever take. |
MB |
Buffer health / Buffer target |
Current amount of video data in the player buffer / Buffer amount the player will try to reach (dynamically changed by the Mesh SDK) |
seconds |
Latency |
Delay between current position and the most recent video segment available in the playlist. |
|
Track |
Video track bitrate (corresponding video track ID for the Mesh SDK) |
Kbps |
Bandwidth | The estimated bandwidth of the CDN. | Mbps |
P2P Policy setting
This view allows you to check and dynamically change the P2P policie (Upload and Download) based on the current network type of the device.
The value can either be defined in the properties managed from you dashboard or changed using our client side APIs.