Bitmovin SDK Integration Guide
This guide is for integrating the MediaMelon Player SDK for the javascript based Bitmovin Web Player v8
Step 1: Add the MediaMelonPlayer SDK
<script type="text/javascript" src="https://sdk.mediamelon.com/SDK_RELEASES/Javascript/bitmovin/2.5.0/mmsmartstreaming_bitmovinplayer.min.js"></script>npm i [email protected]
import {MMBitmovinSDKIntgr} from 'mediamelon-js-bitmovin-sdk'Step 2: Register and Initialize the MediaMelon Player SDK
<body>
<div id="video"></div>
<script>
const player = new bitmovin.player.Player(document.getElementById('video'), config);
const playerEvent = bitmovin.player.playerEvent;
var contentMetadata = {
"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",
"customTags": {
"key1": "VALUE_STRING1",
"key2": "VALUE_STRING2"
}
};
var mmBitmovinPlugin = new MMBitmovinSDKIntgr();
mmBitmovinPlugin.registerMMSmartStreaming("PLAYER_NAME", "CUSTOMER_ID", "SUBSCRIBER_ID", "DOMAIN_NAME", "SUBSCRIBER_TYPE", "SUBSCRIBER_TAG", <hashSubscriberId>);
mmBitmovinPlugin.reportPlayerInfo("PLAYER_BRAND", "PLAYER_MODEL", "PLAYER_VERSION");
mmBitmovinPlugin.reportBasePlayerInfo("BASE_PLAYER_NAME", "BASE_PLAYER_VERSION");
mmBitmovinPlugin.reportExperimentName("EXPERIMENT_NAME");
mmBitmovinPlugin.reportSubPropertyId("SUB_PROPERTY_ID");
mmBitmovinPlugin.reportAppInfo("APP_NAME", "APP_VERSION");
mmBitmovinPlugin.reportDeviceId("DEVICE_ID");
const streamURL = 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8';
var isLive = false;
mmBitmovinPlugin.reportViewSessionId("VIEW_SESSION_ID");
mmBitmovinPlugin.initialize(player, streamURL, contentMetadata, isLive, playerEvent);
player.load(source);
</script>
</body>Step 3: Errors and Warnings (Important):
Step 4: Report Additional Metadata Fields:
Step 4.1: Experiment Name:
Step 4.2: CDN:
Step 4.3: Custom Metadata:
Step 4.4: Stream Information:
Step 4.5: Player resolution:
Step 4.6: Report Stream Fallback Event
Step 5: Update Asset Information:
Step 6: Set Content Provider Details
Last updated