Castlabs Player Android v4.2.49 with Nowtilus SSAI
Step by step guide for integrating the MediaMelon Castlabs Player SDK with Nowtilus SSAI to a Castlabs Player based sample application
STEP 0
Please find the Sample reference application in the Release Notes document. The demo application is available under mediamelon_demo.zip
https://mediamelon-builds.s3.amazonaws.com/MM-RELEASE-BUILDS/1922042005/CastlabsPlayer_Android/2022-11-23/demos.zip
STEP 1
Add the following lines to access the SDK
In the Sample Application the following imports are added in SimplePlaybackDemo.java
STEP 2
startMediaMelonSDK() API calls all MediaMelon SDK integration API's. To Integrate MediaMelon SDK please call startMediaMelonSDK(). And register Mediamelon SDK using your assigned customerID in StartMediaMelon API. Please refer code block below.
Parameters passed in Registration call
$PLAYERNAME
Player Name as in Castlabs Player
$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
3.1 Initialize the SDK.
3.2 Intialize SSAI tracking
3.3 Start the SDK
Add the below lines following the registration to enable the Nowtilus SSAI Ad Manager in startMediaMelonSDK() API. Please refer the code below.
NOTE - boolean enablePollingforSSAI
variable indicates whether the Mediamelon SDK needs to poll for the VAST URL or not. Please set it to true in case of Castlabs Player.
STEP 4
Subscribe to AD EVENTS in startMediaMelon() 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
List of AD EVENTS
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
Get Ad Related Information
You can use the below commands from inside any of the AD Events(listed above) that you subscribe to.
ssaiAdInfo.getTotalAds()
- returns aint
which signifies the number of Ads in the current Ad break.ssaiAdInfo.getClickTrackingURLs()
-returns the click tracking URLs as a List<String>.ssaiAdInfo.getClickThroughURLs()
-returns the clickthrough URLs as a List<String>.ssaiAdInfo.getAdSkipOffset()
- returns the AD offset inseconds.
ssaiAdInfo.getCompleteTrackers()
-
returns the AD Complete Tracking URLs as a List<String>.ssaiAdInfo.getMidpointTrackers()
-
returns the AD Midpoint Tracking URLs as a List<String>.ssaiAdInfo.getThirdQuartileTrackers()
-
returns the AD ThirdQuartile Tracking URLs as a List<String>.ssaiAdInfo.getFirstQuartileTrackers()
-
returns the AD FirstQuartile Tracking URLs as a List<String>.ssaiAdInfo.getImpressionTrackers()
-
returns the AD Impression URLs as a List<String>.ssaiAdInfo.getAdIndex()
-
returns the index of the current AD in the AD break.
Last updated