MediaMelon Android Bitmovin SDK Integration Document
This page describes the integration of the MediaMelon Player SDK with Bitmovin Player on the Android platform
Step 1: Set up the build environment
Step 2: Register and Initialise SDK
Step 3: Report Custom Metadata
Step 4: Report Stream Level Info
Step 5: Report Ended State
Step 6: Setup SSAI Ad Manager for Ad Callbacks
Step 7: Initialize Harmonic SSAI Ad Manager
Step 8: Update Asset Info dynamically
Step 1: Set up the build environment
The SDK files are added to the build environment and the required network permissions are enabled.
Copy
bitmovin-lib-release.aarprovided with the release notes.
Step 1.1: Add Gradle Dependency:
Using AAR:
dependencies { ... api files ('bitmovin-lib-release.aar') }
Using Maven:
Add the following library to
app/build.gradle:-
Step 1.2 Provide Permissions
Add network permissions to $MEDIA3PROJECT/demos/main/src/main/AndroidManifest.xml
Step 1.3: Import Packages
Step 2: Register and Initialise SDK
The player application must register the MediaMelon Player SDK and provide player information once when the application launches. Please note that values provided in this integration step persist across video sessions. This is typically done when the player itself is initialised.
Step 2.1: Set Asset Information
Step 2.2: Create Adaptor Instance
Step 2.3: Set Registration and Player Information
Step 2.4: Set Stream URL
Step 2.5: Report Base Player Information
Step 2.6: Report Application Information
Step 2.7: Report Content Metadata
Step 2.8: Report Experiment Name
Step 2.9: Report View Session Id
Step 2.10: Report Sub Property Id
Step 2.11: Report Player Resolution
Step 3: Report Custom Metadata
Check the custom tags configuration in your dashboard and report accordingly. If the custom tags are not configured, please configure and use them accordingly.
Step 4: Report Stream Level Information
Step 4.1: Report Stream Info
Report key stream attributes that describe the encoding and delivery method.
Step 4.2: Report CDN
Report the name or identifier of the Content Delivery Network (CDN) used for streaming. This helps track performance and quality across different CDNs.
Step 5: Report Ended State
Step 6: Setup SSAI Ad Manager for Ad Callbacks
To handle Harmonic SSAI events, create an object of MMHarmonicSSAIEventListeners in the required class and implement the methods you need. Once implemented, add the listener to mmSmartStreamingBitmovinAdaptor as shown below:
6.1 MMHarmonicSSAIEventListners callbacks:
The following callbacks are available within the MMHarmonicSSAIEventListeners interface:
onAdImpressiononAdStartedonAdFirstQuartileonAdMidpointonAdThirdQuartileonAdComplete
6.2 AdInfo Accessible Methods:
The AdInfo object provides several methods to access ad-related information:
getAdClient()getAdCurrentPlaybackTime()getAdDuration()getAdStartTime()getAdEndTime()getAdId()getAdServer()
Step 7: Initialize Harmonic SSAI Ad Manager
DASH
PMM_URL: Send the final redirected URL with the pmm ID.HLS
PMM_URL: Send the variant URL with the pmm ID.
Step 8: Update Asset Info dynamically
If Asset Information needs to be updated dynamically during the live session without re-initiating the player, then the "updateAssetInfo” API can be used to update the new AssetInfo.
Note:
This API must be called for updating asset info for the live streams only
This API must be called after the Player has started the live-stream playback.
The new Asset Info Object will override the previous values, hence set all the required fields every time before calling this API.
Release Notes
Last updated