- Obtain valid configuration parametersThese parameters can be obtained from an Adobe representative after you set up your analytics account.
- Provide the following capabilities in your media player:
- An API to subscribe to player events- The Media SDK requires that you call a set of simple APIs when events occur in your player.
- An API that provides player information- This includes information about currently playing media, ads, chapter.
- Add your downloaded library to your project. Create local references to the classes for convenience.
- Expand theMediaSDK-js-v3*.zipfile that you downloaded.
- Verify that theMediaSDK.jsfile exists in thelibsdirectory.
- Create an instance ofAppMeasurementand configurevisitor.The Media SDK configuration requires an instance ofAppMeasurementwithvisitorconfigured.var appMeasurement = new AppMeasurement(“<rsid>”); appMeasurement.visitor = visitor; appMeasurement.trackingServer = “<visitor_namespace>.sc.omtrdc.net”;
- Configure Media SDKMedia SDK should be configured once per webpage and the configuration applies to all the tracker instances created.Media SDK (3.x) uses Media Collection API for tracking media which is different from the HB endpoint used in 2.x SDKs. Contact your Adobe representative to get more information.Here is a sampleMediaConfiginitialization:// Create MediaConfig object (same as above) var mediaConfig = new ADB.MediaConfig(); mediaConfig.trackingServer = Configuration.MEDIA_COLLECTION_ENDPOINT; mediaConfig.playerName = Configuration.PLAYER_NAME; mediaConfig.channel = Configuration.CHANNEL; mediaConfig.appVersion = Configuration.APP_VERSION; mediaConfig.debugLogging = false; mediaConfig.ssl = true; ADB.Media.configure(mediaConfig, appMeasurement);
- Create theMediaTrackerinstance.After configuring Media SDK, tracker instances for tracking media content can be created usinggetInstanceAPI.var tracker = ADB.Media.getInstance();Make sure that yourtrackerinstance is accessible and does not get deallocated until the end of the media session. This instance will be used for tracking all the following events for that session.