Custom Player Web SDK
This guide is for integrating the JavaScript-based MediaMelon Custom Player Web SDK
Step 1: Add the MediaMelon SDK Files
<script type="text/javascript" src="https://PATH_TO_MEDIAMELON_SDK/mmsmartstreamingsdk.min.js"></script>Step 2: Register and Initialize the MediaMelon Player SDK
var customPlugin = new mmCustomJSAdapter();
var mmVideoAssetInfo = {
"assetName": "ASSET_NAME",
"assetId": "ASSET_ID",
"videoId": "VIDEO_ID",
"contentType": "CONTENT_TYPE",
"genre": "GENRE",
"drmProtection": "DRM_PROTECTION",
"episodeNumber": "EPISODE_NUMBER",
"season": "SEASON",
"seriesTitle": "SERIES_TITLE",
"videoType": "VIDEO_TYPE",
"customTags": {
"key1": "VALUE_STRING1",
"key2": "VALUE_STRING2"
}
if(customPlugin.getRegistrationStatus() === false){
customPlugin.registerMMSmartStreaming("PLAYER_NAME", "CUSTOMER_ID", "SUBSCRIBER_ID", "DOMAIN_NAME", "SUBSCRIBER_TYPE" , "SUBSCRIBER_TAG");
customPlugin.reportPlayerInfo("PLAYER_BRAND", "PLAYER_MODEL", "PLAYER_VERSION");
}
customPlugin.reportAppInfo("APP_NAME", "APP_VERSION");
customPlugin.setDeviceInfo("DEVICE_ID", "DEVICE_MARKETING_NAME");
customPlugin.reportVideoQuality("VIDEO_QUALITY");
customPlugin.reportPresentationInfo(presentationType, presentationArray);
var isLive = false; //Set this to true for a live stream or false for a VOD stream
customPlugin.initialize(mmVideoAssetInfo, streamURL, totalDuration, isLive);Enum value
Description
Step 3: API to Report Video Progress
Step 4: APIs that can be Triggered when Required
Report State:
Enum Value
Description
Report Ad Data:
Enum
Description
Report Error:
Enum value
Description
Enum Value
Description
Report Volume:
Last updated