MediaMelon SDK integration with Castlabs js (v6.2)Web Player
Step 1: Add the MediaMelon Player SDK
Add the following lines to the web page after Castlabs files are loaded
Step 2: Register and Initialize the MediaMelon Player SDK
<customer_id> is your MediaMelon-assigned Customer ID. If you do not know your Customer ID contact MediaMelon at support@mediamelon.com
After the player instance has been created, create a new Plugin object, register, report player Info and then initialize the plugin as shown below:
Step 3: Providing Content Metadata, Custom Tags and the Nowtilus Configuration
You can also provide the Content Metadata and Custom Tags as shown below in html/js while setting source information. Please use the mmVideoAssetInfo
structure to provide this information.
Step 4: Registering for Ad events for disabling Player controls
You can add the code for Disabling player controls during the AD start event and Enable the player controls after the AD complete event.
Step 5: Finish setting up the MediaMelon SDK
Initialize the SSAI plugin, attach the SSAI plugin to the SSAI Ad Manager. Setup the SSAI Ad Manager with Media , VAST data and configuration parameters.
List of AD EVENTS
Get Ad Related Information
You can use the below commands from inside any of the AD Events(listed above) that you subscribe to ( here in the below commands "adInfo" refers to the Ad Object that you receive in the Ad Event Listeners )
adinfo
.totalAds
- returns aint
which signifies the number of Ads in the current Ad break.adinfo
.clickTrackingURLs
-returns the click tracking URLs as a list.adinfo
.clickThroughURLs
-returns the clickthrough URLs as a list.adinfo
.offset
- returns the AD offset inseconds.
adinfo
.completeURLs
-
returns the AD Complete Tracking URLs as a list.adinfo
.midpointURLs
-
returns the AD Midpoint Tracking URLs as a list.adinfo
.thirdQuartileURLs
-
returns the AD ThirdQuartile Tracking URLs as a list.adinfo
.firstQuartileURLs
-
returns the AD FirstQuartile Tracking URLs as a listadinfo
.impressionURLs
-
returns the AD Impression URLs as a listadInfo
.
startURLs
- returns the AD Start URLs as a listadinfo
.adIndex
-
returns the index of the current AD in the AD break.
Last updated