Edit in GitHubLog an issue

Migrating to Adobe Streaming Media for Edge Network extension

Configuration Changes

Media

NameKeyValueRequired
Collection API Server
"media.trackingServer"
String
Yes
Channel
"media.channel"
String
No
Player Name
"media.playerName"
String
No
Application Version
"media.appVersion"
String
No

Media for Edge Network

NameKeyValueRequired
Channel
"edgeMedia.channel"
String
Yes
Player Name
"edgeMedia.playerName"
String
Yes
Application Version
"edgeMedia.appVersion"
String
No

Dependency Changes

MediaEdgeMedia
Core
Core
Analytics
Edge
Identity
EdgeIdentity
Media
EdgeMedia

Refer to the guide on how to configure and setup Media for Edge Network to learn more.

Install extensions

Download extension with dependencies using Maven & Gradle

Copied to your clipboard
- implementation 'com.adobe.marketing.mobile:core:2.+'
- implementation 'com.adobe.marketing.mobile:identity:2.+'
- implementation 'com.adobe.marketing.mobile:analytics:2.+'
- implementation 'com.adobe.marketing.mobile:media:3.+'
+ implementation platform('com.adobe.marketing.mobile:sdk-bom:2.+')
+ implementation 'com.adobe.marketing.mobile:core'
+ implementation 'com.adobe.marketing.mobile:edge'
+ implementation 'com.adobe.marketing.mobile:edgeidentity'
+ implementation 'com.adobe.marketing.mobile:edgemedia'

Import & Register extensions

  1. Import extensions
Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore;
- import com.adobe.marketing.mobile.Identity;
- import com.adobe.marketing.mobile.Analytics;
- import com.adobe.marketing.mobile.Media;
+ import com.adobe.marketing.mobile.Edge;
+ import com.adobe.marketing.mobile.edge.identity.Identity;
+ import com.adobe.marketing.mobile.edge.media.Media;
  1. Register extensions
Copied to your clipboard
public class MainApp extends Application {
private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);
- List<Class<? extends Extension>> extensions = Arrays.asList(
- Media.EXTENSION, Analytics.EXTENSION, Identity.EXTENSION);
+ List<Class<? extends Extension>> extensions = Arrays.asList(
+ Media.EXTENSION, Edge.EXTENSION, Identity.EXTENSION);
MobileCore.registerExtensions(extensions, o -> {
Log.d(LOG_TAG, "AEP Mobile SDK is initialized");
});
}
}

Public API changes

All numeric parameters of the public APIs have been updated to type Integer.

package name

The Media for Edge Network extension uses the same class names as the Media Analytics extension. The Java package, however, is changed to com.adobe.marketing.mobile.edge.media.

Copied to your clipboard
- import com.adobe.marketing.mobile.Media;
- import com.adobe.marketing.mobile.MediaConstants;
- import com.adobe.marketing.mobile.MediaTracker;
+ import com.adobe.marketing.mobile.edge.media.Media;
+ import com.adobe.marketing.mobile.edge.media.MediaConstants;
+ import com.adobe.marketing.mobile.edge.media.MediaTracker;

createMediaObject

Copied to your clipboard
- public static HashMap<String, Object> createMediaObject(String name,
- String id,
- double length,
- String streamType,
- MediaType mediaType);
+ public static HashMap<String, Object> createMediaObject(String name,
+ String id,
+ int length,
+ String streamType,
+ MediaType mediaType);

createAdBreakObject

Copied to your clipboard
- public static HashMap<String, Object> createAdBreakObject(String name, long position, double startTime);
+ public static HashMap<String, Object> createAdBreakObject(String name, int position, int startTime);

createAdObject

Copied to your clipboard
- public static HashMap<String, Object> createAdObject(String name, String id, long position, double length);
+ public static HashMap<String, Object> createAdObject(String name, String id, int position, int length);

createChapterObject

Copied to your clipboard
- public static HashMap<String, Object> createChapterObject(String name,
- long position,
- double length,
- double startTime);
+ public static HashMap<String, Object> createChapterObject(String name,
+ int position,
+ int length,
+ int startTime);

createQoeObject

Copied to your clipboard
- public static HashMap<String, Object> createQoEObject(long bitrate,
- double startupTime,
- double fps,
- long droppedFrames);
+ public static HashMap<String, Object> createQoEObject(int bitrate,
+ int startupTime,
+ int fps,
+ int droppedFrames);

updateCurrentPlayhead

Copied to your clipboard
- public void updateCurrentPlayhead(double time);
+ public void updateCurrentPlayhead(int time);

Granular ad tracking

Media extension allowed for ad content tracking of 1 second when setting the MediaConstants.MediaObjectKey.GRANULAR_AD_TRACKING key in the media object.

Media for Edge Network extension supports customizable ping intervals. Ad content tracking interval can be set in the range [1-10] seconds, and main content tracking interval can be set in the range [10-50] seconds. For more details, refer to the createTrackerWithConfig API.

Java

Copied to your clipboard
+ HashMap<String, Object> trackerConfig = new HashMap<>();
+ trackerConfig.put(MediaConstants.Config.AD_PING_INTERVAL, 1);
- MediaTracker tracker = Media.createTracker()
+ MediaTracker tracker = Media.createTrackerWith(trackerConfig);
HashMap<String, Object> mediaObject = Media.createMediaObject("name", "id", 30, "vod", Media.MediaType.Video);
- mediaObject.put(MediaConstants.MediaObjectKey.GRANULAR_AD_TRACKING, true)
HashMap<String, String> videoMetadata = new HashMap<String, String>();
videoMetadata.put(MediaConstants.VideoMetadataKeys.EPISODE, "Sample Episode");
videoMetadata.put(MediaConstants.VideoMetadataKeys.SHOW, "Sample Show");
tracker.trackSessionStart(mediaObject, videoMetadata)

Downloaded content tracking

Media for Edge Network extension currently does not support the downloaded content tracking workflow.

API reference

The Media for Edge Network extension offers APIs that are similar to those provided by the Media Analytics extension. To explore the Media for Edge Network extension APIs and understand their usage, please refer to the API reference docs.

Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.