MediaMelon SDK integration with HLS js (v0.7.11) Web Player
This guide is for integrating the MediaMelon Player SDK with Nowtilus SSAI for the Javascript based HLS js Web
Step 1: Add the MediaMelon SDK
<script type="text/javascript" src="https://PATH_TO_MEDIAMELON_SDK/mmNowtilusSSAI_SDK.min.js"></script>
<script type="text/javascript" src="https://PATH_TO_MEDIAMELON_SDK/mmsmartstreaming_hlsjsplayer.js"></script>Step 2: Initialize the MediaMelon SDK for SSAI
var mmhlsjsPlugin = new HLSJSMMSSIntgr();
var NowtilusAdPlugin = new mmNowtilusSSAIPlugin(<PLAYER_OBJECT>);Step 3: Providing Macro Substitution Data and the Nowtilus Configuration
let macroJsonObject = {
"lt": 0,
"LIMITADTRACKING": 0,
"ADTYPE": "video",
"ifa": "681a8ba7-39f5-46d9-9a5a-c006b8fbb7d8",
"av": "1.12.3",
"bz": "video",
"ccb": "9281c15a",
"CACHEBUSTING": "9281c15a",
"ap": "1",
"seq": 1,
"trq": "1645614813154",
"TIMESTAMP": "2022-02-23T16:43:33.154+0530",
"br": "OPPO",
"lc": "eng_US",
"mn": "CPH2127",
"osv": "11",
"dt": "1",
"cmd": {
"md_dvb": "OPPO",
"md_dvm": "CPH2127",
"md_osv": "11",
"md_hr": "16",
"md_min": "43",
"md_nt": "1"
},
"os": 1,
"ai": "com.qa1.test",
"APPBUNDLE": "com.qa1.test",
"sh": "1440",
"sw": "720",
"ua": "Mozilla/5.0 (Linux; Android 11; CPH2127 Build/RKQ1.201217.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/98.0.4758.101 Mobile Safari/537.36",
"DEVICEUA": "Mozilla/5.0 (Linux; Android 11; CPH2127 Build/RKQ1.201217.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/98.0.4758.101 Mobile Safari/537.36",
"vr": "AN-1.12.4"
}
//set-up the Nowtilus Config
var nowtilusConfig = {
isLive : true, // true for Live, false for others
streamType: 'hls', // always hls
apiKey : "apiKey", // leave as it is if you dont use api-key
url : mediaURL, // the mediaURL/streamURL
context : 'web', // leave it as 'web'
ifa : 'ifa', // leave it as 'ifa'
enablePolling : false // set to true if you want polling for manifest/vast, else set it to false
};Step 4: Listen to Ad Callback Events for Disabling Player Controls
Step 5: Finish setting up the MediaMelon SDK
Get Ad Related Information
Property
Description
PreviousMediaMelon Player SDK with Nowtilus SSAI for JIO - WebNextMediaMelon SDK integration with VideoJS Web Player
Last updated