MediaMelon iOS Bitmovin Player SDK Integration Document

This guide provides detailed instructions on integrating the MediaMelon BiPlayer IMA/DAI SDK into an iOS/tvOS Media Player Application.

Step 1: Add SDK

Step 2: Register and Initialize MediaMelon SDK

Step 3: Additional Custom Metadata

Step 4: Stream Information

Step 5: Set up Harmonic SSAI Ad Tracking

Step 6: Cleaning up the SDK Session

Step 7: Disable SDK Manifest Fetch

Step 8: Update Content Metadata

Release Notes

Step 1: Add SDK

Add the Wrapper file and the framework to the application project

Step 1.1: Import Frameworks:

import BitmovinPlayer
import MediaMelonHarmonic

Step 2: Register and Initialize MediaMelon SDK

Step 2.1: Set SDK Registration Information:

circle-info

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

circle-info

hashSubscriberID: Set it to true to hash the subscriber ID, and to false to process the subscriber ID without hashing.

Step 2.2: Set Content Metadata:

Step 2.3: Report Application Information:

Step 2.4: Report Application Session ID:

Step 2.5: Report Experiment Name & Sub Property ID:

Step 2.6: Initialize Session with Content Metadata:

circle-info

isLive: Set this to true for a live stream or false for a VOD stream. If isLive is not set here, the SDK will handle it internally.

Step 3: Additional 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: Stream Information

Step 4.1: Report CDN Information:

Step 4.2: Report Stream Information:

Step 4.3: Update DRM Type:

Step 5: Set up Harmonic SSAI Ad Tracking

Step 5.1: Initialize Harmonic SSAI Ad Manager:

HLS PMM_URL: Send the variant URL with the pmm ID.

circle-info

Note: Call initializeHarmonicSSAIAdManager only once at the stream start.

Step 5.2: Set up Delegate for Ad Callbacks:

Add the MMSSAIManagerDelegate protocol to the required class. To confirm with MMSSAIManagerDelegate protocol implement the below method in the class.

chevron-rightMMHarmonicSSAIAdSatehashtag
  • adImpression

  • adStarted

  • adFirstQuartile

  • adMidpoint

  • adThirdQuartile

  • adPlaying

  • adCompleted

chevron-rightMMHarmonicSSAIAdInfo Methodshashtag
  • getAdClient()

  • getAdCurrentPlaybackTime()

  • getAdDuration()

  • getAdStartTime()

  • getAdEndTime()

  • getAdId()

  • getAdPosition()

  • getAdServer()

Step 6: Cleaning up the SDK Session

circle-info

We need to clean up the SDK session once the playback is completed. The SDK internally manages the cleanup for most of the cases. For example, when playback finishes or an error is notified.

However, in some error cases, like network reachability issues, the error notification is delayed. Before this error notification is available, the user may trigger another session. Therefore, it is advised to clean up the session once the playback finishes.

We recommend a cleanup at the following two places.

  • When the view controller hosting the post-roll ad terminates

  • When the player is restarted

Step 7: Disable SDK Manifest Fetch (Optional)

If your workflow restricts the manifest to be accessible from both the player and the MediaMelon Player SDK simultaneously, then you can disable the fetch of the manifest as shown below. When calling this method, it should be called before the initializeAssetForPlayer method.

Step 8: Update Content Metadata

During linear channel playback, if the content changes and a new session needs to be created for each piece of content, please use the updateAssetInfo method. This method can be used to create a new session while updating the asset information.

Release Notes:

chevron-rightCurrent Releasehashtag

v2.6.2

  • Added Ad Buffering tracking.

  • Added Seek Duration tracking.


chevron-rightPrevious Releaseshashtag

v2.6.1

  • Added Report CDN API for clients to provide CDN information to the SDK.

  • Added Report StreamInfo API for reporting stream format, media type, and source type.

  • Enabled the Report Player Information API for clients to pass player details to the SDK.

  • Updated the Base Player Information reporting API.

  • Added App Session ID API for client-provided session identification.

  • Added the Update DRM Type API.

  • Fixed an issue that caused duplicate rendition events to be reported by the SDK.

v2.5.0

  • Fixed a URL dependency issue in the wrapper file

  • Removed the number and value from the Streaming Progress and Playback Error events reported to the toolbox endpoint

Last updated