Migrating from the standalone Media SDK to Adobe Launch - Web (JS)
Feature differences
- Launch - Launch provides you with a UI that walks you through setting up, configuring, and deploying your web-based media tracking solutions. Launch improves upon Dynamic Tag Management (DTM).
- Media SDK - The Media SDK provides you with media tracking libraries designed for specific platforms (e.g.: Android, iOS, etc.). Adobe recommends Media SDK for tracking media usage in your Mobile Apps.
Configuration
Standalone Media SDK
In the standalone Media SDK, you configure the tracking configuration in the app
and pass it to the SDK when you create the tracker.
//Media Heartbeat initialization
var mediaConfig = new MediaHeartbeatConfig();
mediaConfig.trackingServer = "namespace.hb.omtrdc.net";
mediaConfig.playerName = "html5-player";
mediaConfig.channel = "sample-channel";
mediaConfig.ovp = "video-provider";
mediaConfig.appVersion = "v2.0.0"
mediaConfig.ssl = true;
mediaConfig.debugLogging = true;
In addition to the MediaHeartbeat configuration, the page must configure and pass
the AppMeasurement instance and VisitorAPI instance for media tracking in order
to work properly.
Launch Extension
-
In Experience Platform Launch, click the Extensions tab for your
web property. -
On the Catalog tab, locate the Adobe Media Analytics for Audio and
Video extension, and click Install. -
In the extension settings page, configure the tracking parameters.
The Media extension will use the configured parameters for tracking.
Launch User Guide - Install & configure the media extension
Tracker creation differences
Media SDK
- Add the Media Analytics library to your development project.
- Create a config object (
MediaHeartbeatConfig). - Implement the delegate protocol, exposing the
getQoSObject()andgetCurrentPlaybackTime()functions. - Create a Media Heartbeat instance (
MediaHeartbeat).
// Media Heartbeat initialization
var mediaConfig = new MediaHeartbeatConfig();
...
// Configuration settings
mediaConfig.trackingServer = Configuration.HEARTBEAT.TRACKING_SERVER;
...
// Implement Media Delegate (Quality of Service and Playhead)
var mediaDelegate = new MediaHeartbeatDelegate();
...
mediaDelegate.getQoSObject = function() {
return MediaHeartbeat.createQoSObject(<bitrate>, <startuptime>, <fps>, <droppedFrames>);
...
}
...
// Create your tracker
this.mediaHeartbeat = new MediaHeartbeat(mediaDelegate, mediaConfig, appMeasurement);
Launch
Launch offers two approaches to creating the tracking infrastructure. Both approaches use the Media Analytics Launch Extension:
-
Use the media tracking APIs from a web page.
In this scenario, the Media Analytics Extension exports the media tracking APIs to a configured variable in the global window object:
code language-none window["CONFIGURED_VARIABLE_NAME"].MediaHeartbeat.getInstance -
Use the media tracking APIs from another Launch extension.
In this scenario, you use the media tracking APIs exposed by the
get-instanceandmedia-heartbeatShared Modules.note note NOTE Shared Modules are not available for use in web pages. You can only use Shared Modules from another extension. Create a
MediaHeartbeatinstance using theget-instanceShared Module.
Pass a delegate object toget-instancethat exposesgetQoSObject()andgetCurrentPlaybackTime()functions.code language-none var getMediaHeartbeatInstance = turbine.getSharedModule('adobe-video-analytics', 'get-instance');Access
MediaHeartbeatconstants via themedia-heartbeatShared Module.