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

Release Notes

Step 1: Set up the build environment

The SDK files are added to the build environment and the required network permissions are enabled.

  1. Copy bitmovin-lib-release.aararrow-up-right provided with the release notes.

Step 1.1: Add Gradle Dependency:

Using AAR:

  1. dependencies {
      ...
      api files ('bitmovin-lib-release.aar')
    }

Using Maven:

  1. 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

circle-info

CUSTOMER_ID is your MediaMelon assigned Customer ID. If you do not know your Customer ID contact MediaMelon at [email protected].

circle-info

Please provide the hashSubscriberId value in setSubscriberInformation(), hashSubscriberId boolean variable indicates whether the SUBSCRIBER_ID to be hashed or not.

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 dashboardarrow-up-right 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:

  • onAdImpression

  • onAdStarted

  • onAdFirstQuartile

  • onAdMidpoint

  • onAdThirdQuartile

  • onAdComplete

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.

circle-info

Note: Call initializeHarmonicSSAIAdManager only once at the stream start.

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:

  1. This API must be called for updating asset info for the live streams only

  2. This API must be called after the Player has started the live-stream playback.

  3. The new Asset Info Object will override the previous values, hence set all the required fields every time before calling this API.

Release Notes

chevron-rightCurrent Releasehashtag

v1.3.5

  • Added API to report App Session ID.

  • Added API to report CDN.

  • Added events for AD-BUFFERING.

  • Fix for Ad playtime for session with no ads.

  • Updated folder structure


chevron-rightPrevious Releaseshashtag

v1.3.4

  • Added API to report Application Information

  • Added API to report Stream Information

v1.3.3

  • Number field in streaming_progress removed

Last updated