Learn about the changes in the Browser TVSDK between DHLS 1.4 and Browser TVSDK 2.4.

Related documents:

Namespace changes

In TVSDK 1.4 for Desktop HLS (DHLS), all the Browser TVSDK classes are under namespace com.adobe.mediacore, but in Browser TVSDK 2.4, all the TVSDK classes are under namespace AdobePSDK. 

TVSDK 1.4 for DHLS Browser TVDSK 2.4
import com.adobe.mediacore.DefaultMediaPlayer; var player:MediaPlayer = new DefaultMediaPlayer(context); var mediaResource = new AdobePSDK.MediaResource(url,mediaResourceType, metadata);

Changes in the default TVSDK classes

TVSDK classes that were previously prefixed with Default, such as DefaultMediaPlayer, DefaultNetworkConfiguration, DefaultContentFactory, and so on, have been changed to MediaPlayer, NetworkConfiguration, ContentFactory and so on.

Here are the changes: 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
var player:MediaPlayer = new DefaultMediaPlayer(context); var player = new AdobePSDK.MediaPlayer();

The usage of MediaPlayer and DefaultMediaPlayer is identical. The same applies to all classes that use the Default naming convention. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
com.adobe.mediacore.metadata.DefaultMetadataKeys AdobePSDK.MetadataKeys

Constructors that replace static create methods

For most of the classes, the static methods to create objects are replaced by public constructors.

The classes for which the create methods are removed and constructors are introduced are:

  • MediaResource
  • Ad
  • AdAsset
  • AdBreak
  • AdBreakTimelineItem
  • AdPolicyInfo

Changes in TVSDK classes

Some TVSDK classes in Browser TVSDK 2.4 have changed. 

MediaPlayer Class

In TVSDK 1.4 for DHLS, the constructor of the default implementation of the MediaPlayer interface (DefaultMediaPlayer) accepted a MediaPlayerContext object by parameter. In 2.4, the MediaPlayer constructor doesn't take anything as an argument. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
var player:MediaPlayer = new DefaultMediaPlayer(context); var player = new AdobePSDK.MediaPlayer();

MediaResource Class

The static builder MediaResource.createFromUrl (url:String, metadata:Metadata) is removed from 2.4. Instead, it uses the class constructor itself to create a MediaResource instance. The constructor's signature takes the following parameters:

  • the resource URL
  • the resource type (HLS, HDS, DASH, Custom, Unknown, ISOBMFF)
  • and resource metadata. 
TVSDK 1.4 for DHLS Browser TVSDK 2.4
var mediaResource:MediaResource = MediaResource.createFromUrl(url, metadata); var mediaResource = new AdobePSDK.MediaResource (url, mediaResourceType, metadata);

ABRControlParameters Class

A few more parameters have been added to ABRControlParameters constructor in 2.4. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
ABRControlParameters (policy:String, initialBitRate:int, minBitRate:int, maxBitRate:int) ABRControlParameters (nInitialBitRate, nMinBitRate, nMaxBitRate, eABRPolicy, nMinTrickPlayBitRate, nMaxTrickPlayBitRate, nMaxTrickPlayBandwidthUsage, dMaxPlayoutRate)

ContentFactory Class

Consider the following information:

  • In TVSDK 1.4 for DHLS, the ContentFactory and its default implementation (DefaultContentFactory) were part of public API and also were non-final classes. This allowed the application implementation to select which methods to customize, such as retrieveOpportunityGenerators, retrieveResolvers, and so on.

    In 2.4, is a pure interface, which means that customizing requires complete implementation. However, if a null value is returned, the will use the default implementation.

  • In TVSDK 1.4 for DHLS, ContentFactory methods were prefixed with do, such as doRetrieveResolvers, doRetrieveAdPolicySelector, and so on. In 2.4, do prefix is removed and callbackFunc has been added to the methods, in for example, retrieveResolversCallbackFunc, retrieveAdPolicySelectorCallbackFunc, and so on.

In 2.4, to only override the retrieveAdPolicySelectorCallbackFunc, do the following: 

  1. retrieveResolversCallbackFunc = function(item)

  2. {

  3. return null;

  4. }

  5. retrieveOpportunityGeneratorsCallbackFunc = function(item)

  6. {

  7. return null;

  8. }

  9. retrieveAdPolicySelectorCallbackFunc = function(item)

  10. {

  11. // Provide custom implementation here

  12. }

  13. retrieveCustomAdPlaybackHandlersCallbackFunc = function(item)

  14. {

  15. return null;

  16. }

TimeRange Class

There is a minor change in the TimeRange constructor. In 2.4, the second parameter has been changed from range end to range duration value. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
TimeRange(begin:Number, end:Number) TimeRange(begin, duration)

Changes in the advertising classes

Some advertising classes in Browser TVSDK have changed. 

Ad Class

A few more parameters have been added to ABRControlParameters constructor in Browser TVSDK 2.4. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4

Ad (id:String, type:String, duration:uint, primaryAsset:AdAsset,              companionAssets:Vector.<AdAsset>, tracker:ContentTracker = null)

Ad (id, adType, duration, isCustomAdMarker,    primaryAsset,companionAssets, tracker,    adInsertionType, isClickable, isCustomAd)

The following member variables have been added in Browser TVSDK 2.4 (only getter provided):

  • isClickable
  • isVPAIDAd

AdBreak Class

The following methods have been removed in Browser TVSDK 2.4:

  • public static function get allowCustomAds():Boolean
  • public function get isCustomAdMarker():Boolean

AdBreakTimelineItem Class

The following methods have been removed in Browser TVSDK 2.4:

  • public function hasOnlyCustomAds():Boolean

The following member variables have been removed in Browser TVSDK 2.4:

  • pausePeriods

AdPolicyInfo Class

The following member variables have been renamed in Browser TVSDK 2.4: 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
seekIntoAd adTimelineItem
desiredSeekPosition seekToTime

AdvertisingMetadata Class

The following methods have been removed in Browser TVSDK 2.4:

  • public final function get adSignalingMode():String
  • public final function set adSignalingMode(value:String):void

The following member variables have been added in Browser TVSDK 2.4:

  • livePreRoll

AdBreakWatchedPolicy Class

The following methods have been removed in Browser TVSDK 2.4:

  • public static function isPolicySupported(policy:String):Boolean

AdSignalingMode Class

The following methods have been removed in Browser TVSDK 2.4:

  • public static function isModeSupported(mode:String):Boolean member

AdPolicy Class

The following member variables have been added in Browser TVSDK 2.4:

  • SKIP_AD_BREAK:int = 4

Changes in closed captioning

Closed captioning APIs have changed in 2.4.

Here are the changes:

  • ClosedCaptionStylesBuilder has been renamed as TextFormat.
    • All occurrences of ClosedCaptionStylesBuilder must be replaced with TextFormat.
    • The method toClosedCaptionStyles has been removed from the TextFormat class.
  • ClosedCaptionStyles has been removed.
    • You must delete occurrences that relate to ClosedCaptionStyles, because the styles it contained are now also in the TextFormatclass

Changes in TVSDK class methods

Some TVSDK class methods in Browser TVSDK 2.4 have changed. 

notifyClick Method

The notifyClick method is now part of MediaPlayer and not MediaPlayerView. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
view.notifyClick() player.notifyClick()

convertToLocalTime Method

The convertToLocal method is now part of Timeline and not MediaPlayer. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
mediaPlayer.converToLocalTime(time) mediaPlayer.timeline.converToLocalTime(time)

Changes in DRM

In Browser TVSDK 2.4, the majority of the changes are in the DRM layer.

The following table shows the changes between TVSDK 1.4 for DHLS and Browser TVSDK 2.4: 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
  DRMAuthenticationMethod
DRMContentData

DRMMetadata

DRMContentData.domain and DRMContentData.authenticationMethod have been removed and can be queried from DRMPolicy.

DRMContentData.getVoucherAccessInfo DRMMetadata.policies
DRMDeviceGroup DRMLicenseDomain

VoucherAccessInfo

DRMPolicy
VoucherAccessInfo.policyID is no longer available.  
VoucherAccessInfo.deviceGroup DRMPolicy.licenseDomain
DRMVoucher DRMLicense
DRMVoucher.offlineLeaseStartDate DRMLicense.offlineStorageStartDate
DRMVoucher.offlineLeaseEndDate DRMLicense.offlineStorageEndDate
DRMVoucher.voucherStartData DRMLicense.licenseStartDate
DRMVoucher.voucherEndDate DRMLicense.licenseEndDate
DRMVoucher.policies DRMLicense.customProperties
DRMPlaybackTimeWindow.startDate DRMPlaybackTimeWindow.playbackStartDate
DRMPlaybackTimeWindow.endDate DRMPlaybackTimeWindow.playbackEndDate
DRMPlaybackTimeWindow.period DRMPlaybackTimeWindow.playbackPeriodInSeconds
DRMManager.loadVoucher DRMManager.acquireLicense

Tip: The last parameter that was added is a listener.

DRMManager.loadPreviewVoucher DRMManager.acquirePreviewLicense

Tip: The last parameter that was added is a listener.

DRMManager.addToDeviceGroup DRMManager.joinLicenseDomain

Tip: The last parameter that was added is a listener.

DRMManager.removeFromDeviceGroup DRMManager.leaveLicenseDomain

Tip: The first parameter changes from a URL to a metadata, and the last parameter that was added is a listener.

DRMManager.resetDRMVoucher

DRMManager.resetDRM

Tip: Last parameter added is a listener.

DRMManager::returnVoucher

DRMManager::returnLicense

Tip: The sequence of parameters has changed, and last parameter that was added is a listener.

DRMManager::storeVoucher

DRMManager::storeLicenseBytes

Tip: The last parameter that was added is a listener.

  DRMManager ::setMaxOperationTime
DRMDeviceGroupEvent DRMLicenseDomainEvent
DRMDeviceGroupErrorEvent DRMLicenseDomainErrorEvent

Changes in event handling

In Browser TVSDK 2.4, all event types are in the PSDKEventType class, not in the event classes. 

TVSDK 1.4 for DHLS Browser TVSDK 2.4
player.addEventListener(BufferEvent.BUFFERING_BEGIN, onBufferingBegin) player.addEventListener(AdobePSDK.PSDKEventType.BUFFERING_BEGIN, onBufferingBegin)

Error Events

In Browser TVSDK 2.4, the MediaError class has been replaced with the Notification class. 

Changes in constants

In Browser TVSDK 2.4, many constants have changed type from String to int.

For example:

  • MediaResourceType
  • MediaPlayerStatus
  • ABRControlParameters class that contains constants like CONSERVATIVE_POLICY, and so on. 

Removed classes

Some classes have been removed from Browser TVSDK 2.4 and have no equivalents.

The following classes have been removed:

  • TimeRangeCollection
  • PSDKConfig
  • BaseLogger
  • DefaultLogger
  • Log
  • Logger
  • LogFactory
  • NullLogger
  • StringUtils
  • NumberUtils

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy