VO Player (Nowtilus SSAI)

Step by step guide for integrating the VO Player SDK with Nowtilus SSAI to a VO Player based Player Application

STEP 0

Please find the Sample reference application under

https://mediamelon-builds.s3.amazonaws.com/MM-RELEASE-BUILDS/SDK_RELEASES/Android/2023-05-11/voPlayer/VO-Player-SSAI-Release-(09.05.00).zip

STEP 1

Add the following lines to access the SDK

In the Sample Application this is added in CustomPlayerActivity.java

//MM1
import com.mediamelon.smartstreaming.MMPlayerState;
import com.mediamelon.smartstreaming.MMSmartStreamingNowtilusSSAIPlugin;
import com.mediamelon.smartstreaming.mmAd;
import com.mediamelon.smartstreaming.mmAdTimelineInfo;
import com.mediamelon.smartstreaming.MMSSAIEventsListeners;
import com.mediamelon.smartstreaming.MMSmartStreaming;
import com.mediamelon.smartstreaming.MMSmartStreamingVOAdaptor;
//MM1

STEP 2

startMediaMelonSDK() API calls all MediaMelon SDK Integration API's. To start MediaMelon SDK, please call startMediaMelonSDK() API.And register MediaMelon SDK using your assigned customerID in StartMediaMelonSDK() API. Please refer code block below.

Note:

Please provide the exact correct details in all fields like CUSTOMER_ID, ASSET_ID, ASSET_TITLE, VIDEO_ID, PLAYER_BRAND, PLAYER_MODEL, PLAYER_VERSION, PLAYER_NAME, DOMAIN_NAME, SUBSCRIBER_ID, SUBSCRIBER_TYPE & SUBSCRIBER_TAG. This data helps in debugging through MediaMelon SmartSight if anything goes wrong.

Parameters passed in Registration call

Variable
Description

$PLAYERNAME

Player Name as in ExoPlayer, KalturaPlayer etc.

$CUSTOMERID

String containing your MediaMelon-assigned Customer ID.

$SUBSCRIBERID

String containing your subscriber’s ID. If you do not use subscriber IDs, leave it as it is.

$DOMAINNAME

String containing your section of your subscriber or assets. (Optional)

$SUBSCRIBERTYPE

String containing the subscriber type (e.g. “Free”, “Paid”). If you do not use subscriber types, leave it as it is.

$SUBSCRIBERTAG

String containing an additional subscriber-specific information. This is sent in clear (not hashed) to SmartSight and it is advised to not send sensitive information in this field.

STEP 3

Add the below lines following the registration to enable the Nowtilus SSAI Ad Manager in startMediaMelonSDK() API.

NOTE - boolean enablePollingforSSAI variable indicates whether the Mediamelon SDK needs to poll for the VAST URL or not. Please set it to true if you want to opt for polling else set it to false.

For VOD Streams , set isLive Parameter false and stores AD information in vodResponseData and sends to NowtilusAdManager

Refer getURLDetails function in the sample application to get the mediaURL and AD Data from the curl request for both live and VoD streams. If the stream is VoD, set the isLive variable to false. If the stream is Live, set the isLive variable to true.

STEP 4

Subscribe to AD EVENTS in startMediaMelonSDK() API. Please refer code block below

STEP 5

ADD API for stopping MediaMelon SDK.To stop MediaMelon SDK please call stopMediaMelonSDK(). Please refer code block below

STEP 6 : To Stop the SSAI Ad Manager

Report the player state has ENDED, when the player was destroyed

ADD closeSSAIAdManager() API in onDestroy() listener in CustomPlayerActivity.java

List of AD EVENTS

Event Callback
Description

onAdImpression

Fired when an Ad Impression occurs

onAdStarted

Fired when Ad starts playing

onAdFirstQuartile

Fired when Ad playback reaches the First Quartile point

onAdMidpoint

Fired when Ad playback reaches the Midpoint

onAdThirdQuartile

Fired when Ad playback reaches the Third Quartile point

onAdProgress

Fired every second during Ad Playback, used to track Ad Playback progress

onAdComplete

Fired when Ad Playback completes

onCueTimelineAdded

Fired when an Ad break information gets added

onCueTimelineEnter

Fired when an Ad break ( which can contain multiple Ads) starts

onCueTimeLineExit

Fired when an Ad break ( which can contain multiple Ads) ends

You can use the below commands from inside any of the AD Events(listed above) that you subscribe to.

  1. ssaiAdInfo.getTotalAds()- returns a int which signifies the number of Ads in the current Ad break.

  2. ssaiAdInfo.getClickTrackingURLs()-returns the click tracking URLs as a List<String>.

  3. ssaiAdInfo.getClickThroughURLs() -returns the clickthrough URLs as a List<String>.

  4. ssaiAdInfo.getAdSkipOffset()- returns the AD offset in seconds.

  5. ssaiAdInfo.getCompleteTrackers() - returns the AD Complete Tracking URLs as a List<String>.

  6. ssaiAdInfo.getMidpointTrackers() - returns the AD Midpoint Tracking URLs as a List<String>.

  7. ssaiAdInfo.getThirdQuartileTrackers() - returns the AD ThirdQuartile Tracking URLs as a List<String>.

  8. ssaiAdInfo.getFirstQuartileTrackers() - returns the AD FirstQuartile Tracking URLs as a List<String>.

  9. ssaiAdInfo.getImpressionTrackers() - returns the AD Impression URLs as a List<String>.

  10. ssaiAdInfo.getAdIndex() - returns the index of the current AD in the AD break.

  11. ssaiAdInfo.getStartPos() - returns the start position of the Ad Break relative to the first manifest program time

  12. ssaiAdInfo.getEndPos() - returns the end position of the Ad Break relative to the first manifest program time

Last updated

Was this helpful?