Many method signatures and API element names have changed for 2.0. Review these tables to see all API change details.

Implement callback functions in JavaScript

Comments in method documentation suggest the signature for callbacks that you need to implement.

For JavaScript, the API syntax is based on Web ID. For a TVSDK interface, the method names are called methodName(). For methods to be implemented by your application, a read/write attribute called methodNameCallbackFunc is added to the interface and your application should set it to point to a function that implements the method. For example:

// An app implementable interface
interface ContentFactory
{
    /*
     * AdPolicySelector retrieveAdPolicySelector(MediaPlayerItem item);
     */
    attribute Object retrieveAdPolicySelectorCallbackFunc;
 
    /*
     * ContentResolverList retrieveResolvers(MediaPlayerItem item);
     */
    attribute Object retrieveResolversCallbackFunc;
 
    /*
     * OpportunityGeneratorList retrieveGenerators(MediaPlayerItem item);
     */
    attribute Object retrieveGeneratorsCallbackFunc;
};
 
 
// this is how to implement it
var factory = new AdobePSDK.ContentFactory();
factory.retrieveAdPolicySelectorCallbackFunc = function(item)
{
    // return your adPolicySelector according to the item
    return adPolicySelector;
}
 
mediaPlayerItemConfig = new AdobePSDK.MediaPlayerItemConfig ();
playerConfig.adFactory = factory;
// Use this config to load new MediaResource

Advertising workflow API element changes for 2.0

These tables compare the advertising workflow API elements for the JavaScript TVSDK between versions 1.3 and 2.0.

Tables in this topic:

  • TimedMetadata
  • AdSignalingMode
  • AdvertisingMetadata
  • CustomRangeMetadata
  • ReplaceTimeRange
  • Placement
  • Opportunity
  • Reservation
  • Timeline / TimelineItem / TimelineMarker
  • AdBreak
  • Ad / AdAsset / AdClick / AdList / AdAssetList / AdBannerAsset
  • AdBreakTimelineItem / AdTimelineItem
  • AdBreakPolicy / AdBreakWatchedPolicy / AdPolicy / AdPolicyMode / AdPolicyInfo / AdPolicySelector
  • TimelineOperation
  • AdBreakPlacement
  • AuditudeSettings

TimedMetadata

2.0 API 1.3 API
TimedMetadata

  interface TimedMetadata  {
                       const unsigned  short METADATA_TYPE_TAG =  0 ; 
                       const unsigned  short METADATA_TYPE_ID3 =  1 ; 
                       readonly attribute unsigned  short type; 
                       readonly attribute long time;
                       readonly attribute DomString  id;
                       readonly attribute DomString name;
                   readonly attribute DomString content; 
                       readonly attribute Object metadata;
                  };  

interface TimedMetadata {
                       const unsigned  short METADATA_TYPE_TAG =  0 ;
                       const unsigned  short METADATA_TYPE_ID3 =  1 ;
                       readonly attribute unsigned  short metadataType;
                       readonly attribute  long time;
                       readonly attribute  long id;
                       readonly attribute DomString name;

                       readonly attribute Object metadata;
                  };

TimedMetadataList
(No change for 2.0)

interface TimedMetadataList {
                       readonly attribute unsigned  long length;
                       getter TimedMetadata(unsigned  long index);
                  };

AdSignalingMode

2.0 API 1.3 API
AdSignalingMode

Interface AdSignalingMode { 
       const  unsigned short MODE_DEFAULT, 
       const unsigned short MODE_MANIFEST_CUES , 
       const unsigned short MODE_SERVER_MAP , 
       const unsigned short MODE_CUSTOM_RANGES 
      };

This replaces MetadataKeys::MANIFEST_CUES key.

AdvertisingMetadata

2.0 API 1.3 API
AdvertisingMetadata

Interface AdvertisingMetadata { 
       attribute AdSignalingMode  mode; 
       attribute AdBreakWatchedPolicy   adBreakAsWatched; 
       attribute boolean livePreroll; 
       attribute boolean delayAdLoading ; 
};

This functionality was provided by

MetadataKeys::ADVERTISING_METADATA

key.

CustomRangeMetadata

2.0 API 1.3 API
CustomRangeMetadata

Interface CustomRangeMetadata  { 
            const unsigned short TYPE_MARK_RANGE; 
            const unsigned short TYPE_DELETE_RANGE; 
            const unsigned short TYPE_REPLACE_RANGE; 
            attribute unsigned short type; 
            attribute boolean adjustSeekPosition; 
            attribute TimeRangeList timeRangeList; 
       };

(New for 2.0)

ReplaceTimeRange

2.0 API 1.3 API
ReplaceTimeRange

interface ReplaceTimeRange { 
             attribute unsigned long begin; 
             readonly attribute unsigned long end; 
             attribute unsigned long duration; 
             attribute unsigned long replaceDuration; 
        };

(New for 2.0)

Placement

2.0 API 1.3 API
Placement

Interface Placement  { 
         const unsigned short TYPE_MID_ROLL; 
         const unsigned short TYPE_PRE_ROLL; 
         const unsigned short TYPE_POST_ROLL; 
         const unsigned short TYPE_SERVER_MAP; 
         const unsigned short TYPE_CUSTOM_RANGE;
         readonly attribute unsigned short  type; 
         readonly attribute long time; 
         readonly attribute long duration; 
         const unsigned short MODE_DEFAULT; 
         const unsigned short  MODE_INSERT; 
         const unsigned short MODE_REPLACE; 
         const unsigned short MODE_DELETE; 
         const unsigned short MODE_MARK; 
         const unsigned short MODE_FREE_REPLACE; 
         readonly attribute unsigned short mode;       
         readonly attribute TimeRange range; 
             };

(New for 2.0)

Opportunity

2.0 API 1.3 API
Opportunity

interface Opportunity  {  
     readonly attribute DomString id;  
     readonly attribute Placement placement;  
     readonly attribute Object settings;  
     readonly attribute Object customParameters;  
};  

(New for 2.0)

Reservation

2.0 API 1.3 API
Reservation

interface Reservation { 
   readonly attribute TimeRange  range; 
   readonly attribute long hold; 
             }; 

  (New for 2.0)

Timeline / TimelineItem / TimelineMarker

2.0 API 1.3 API
Timeline

interface Timeline 
       {      readonly attribute TimelineMarkerList timelineMarkers; 
              readonly attribute  TimelineItemList timelineItems;                 
              double convertToLocalTime( double  time); 
              double convertToVirtualTime(  double time); 
};

interface Timeline {
     readonly attribute TimelineMarkerList timelineMarkers;



};

TimelineItem

 interface TimelineItem :
        TimelineMarker   {
            readonly attribute long  id;  
            readonly attribute TimeRange virtualRange;  
            readonly attribute TimeRange localRange;  
            readonly attribute boolean watched;  
            readonly attribute boolean temporary; 
}; 

(New for 2.0)
TimelineMarker
(No change for 2.0)

interface TimelineMarker {
     readonly attribute double   time;
     readonly attribute double duration;
};

AdBreak

2.0 API 1.3 API
AdBreak

interface AdBreak  {



                       readonly attribute  double duration;
                       readonly attribute AdList ads;


                     readonly attribute AdInsertionType insertionType;
                  };                

interface AdBreak   {
                      readonly attribute  double time;
                      readonly attribute  double replaceDuration;

                       readonly attribute  double duration;
                       readonly attribute AdList adList;

                       readonly attribute DomString data;

                };              

Ad / AdAsset / AdClick / AdList / AdAssetList / AdBannerAsset

2.0 API 1.3 API
Ad

  interface Ad  {
                       readonly attribute AdAsset primaryAsset;
                       readonly attribute AdAssetList companionAssets;

                       readonly attribute  double duration;
                       readonly attribute DomString id;
                       const unsigned  short ADTYPE_LINEAR =  0 ;
                       const unsigned  short ADTYPE_NONLINEAR =  1 ;

                       readonly attribute unsigned  short adType;
                       readonly attribute AdInsertionType  adInsertionType; 
   
                       readonly attribute boolean clickable; 
                       readonly attribute boolean isCustomAdMarker;
                 };  

interface Ad {
                       readonly attribute AdAsset primaryAsset;
                       readonly attribute AdAssetList companionAssets;

                       readonly attribute  double duration;
                       readonly attribute DomString id;
                       const unsigned  short ADTYPE_LINEAR =  0 ;
                       const unsigned  short ADTYPE_NONLINEAR =  1 ;

                      readonly attribute unsigned  short type;
                       readonly attribute AdInsertionType insertionType;  
                       readonly attribute Object tracker;


                  };                

AdAsset
(No change for 2.0)

interface AdAsset      {
                       readonly attribute DomString id;
                       readonly attribute  double duration;
                       readonly attribute MediaResource resource;
                       readonly attribute AdClick adClick;
                       readonly attribute Object metadata;
                 };

AdClick

(No change for 2.0)

interface AdClick    {
                       readonly attribute DomString id;
                       readonly attribute DomString title;
                       readonly attribute DomString url;
                   };

AdList   
(No change for 2.0)

interface AdList   {
                       readonly attribute unsigned  long length;
                       getter Ad(unsigned  long index);
                 };

AdAssetList
(No change for 2.0)

interface AdAssetList   {
                       readonly attribute unsigned  long length;
                       getter AdAsset(unsigned  long index);
                 };

AdBannerAsset

interface AdBannerAsset : AdAsset
{
    readonly attribute int width;
    readonly attribute int height;
    readonly attribute DomString staticUrl;
    readonly attribute DomString height;
    readonly attribute DomString width;
};

  New in 2.0

AdBreakTimelineItem / AdTimelineItem

2.0 API 1.3 API

AdBreakTimelineItem

  interface AdBreakTimelineItem : TimelineItem   { 
                       readonly attribute AdBreak adBreak; 
                       readonly attribute AdTimelineItemList items; 
                   }; 

  (New for 2.0)

AdTimelineItem

interface AdTimelineItem : TimelineItem     { 
                        readonly attribute AdBreak adBreak; 
                        readonly attribute Ad ad;   
                   }; 

  (New for 2.0)
AdBreakTimelineItemList

interface AdBreakTimelineItemList   { 
                       readonly attribute unsigned  long length; 
                       getter AdBreakTimelineItem (unsigned lo ng index); 
                   };

  (New for 2.0)

AdBreakPolicy / AdBreakWatchedPolicy / AdPolicy / AdPolicyMode / AdPolicyInfo / AdPolicySelector

2.0 API 1.3 API
AdBreakPolicy

interface AdBreakPolicy  {
   readonly attribute  short AD_BREAK_POLICY_SKIP;
   readonly attribute  short AD_BREAK_POLICY_PLAY;
  readonly attribute  short AD_BREAK_POLICY_REMOVE;
  readonly attribute  short AD_BREAK_POLICY_REMOVE_AFTER_PLAY;
                 };

  interface AdPolicyConstants {
     readonly attribute  short AD_BREAK_POLICY_SKIP;
    readonly attribute  short AD_BREAK_POLICY_PLAY;
    readonly attribute  short AD_BREAK_POLICY_REMOVE;
    readonly attribute  short AD_BREAK_POLICY_REMOVE_AFTER_PLAY;
                          ...

AdBreakWatchedPolicy

  interface AdBreakWatchedPolicy  {
   readonly attribute  short AD_BREAK_AS_WATCHED_ON_BEGIN;
   readonly attribute  short AD_BREAK_AS_WATCHED_ON_END;
   readonly attribute  short AD_BREAK_AS_WATCHED_NEVER;
                      };  

                          ...
   readonly attribute  short AD_BREAK_AS_WATCHED_ON_BEGIN;
   readonly attribute  short AD_BREAK_AS_WATCHED_ON_END;
   readonly attribute  short AD_BREAK_AS_WATCHED_NEVER;
                          ...

AdPolicy

interface AdPolicy  {
    readonly attribute  short AD_POLICY_PLAY;
    readonly attribute  short AD_POLICY_PLAY_FROM_AD_BEGIN;
    readonly attribute  short AD_POLICY_PLAY_FROM_AD_BREAK_BEGIN;                       readonly attribute  short AD_POLICY_SKIP_TO_NEXT_AD_IN_BREAK;

    readonly attribute  short AD_POLICY_SKIP_AD_BREAK;
                      };

                          ... 
   readonly attribute  short AD_POLICY_PLAY;
   readonly attribute  short AD_POLICY_PLAY_FROM_AD_BEGIN;
   readonly attribute  short AD_POLICY_PLAY_FROM_AD_BREAK_BEGIN;
   readonly attribute  short AD_POLICY_SKIP_TO_NEXT_AD_IN_BREAK;
   readonly attribute  short AD_POLICY_SKIP_AD_BREAK;
                           ...

AdPolicyMode

interface AdPolicyMode {
   readonly attribute  short AD_POLICY_MODE_PLAY;
   readonly attribute  short AD_POLICY_MODE_SEEK;
   readonly attribute  short AD_POLICY_MODE_TRICKPLAY;
                     };

                           ...
   readonly attribute  short AD_POLICY_MODE_PLAY;
   readonly attribute  short AD_POLICY_MODE_SEEK;
   readonly attribute  short AD_POLICY_MODE_TRICKPLAY;
                   };

AdPolicyInfo

interface AdPolicyInfo {
  readonly attribute AdBreakTimelineItemList 
         adBreakTimelineItems;
   readonly attribute AdTimelineItem adTimelineItem;
   readonly attribute  double currentTime;
   readonly attribute  double seekToTime;
   readonly attribute  double rate;
   readonly attribute  short mode;  //AdPolicyMode
             };

interface AdPolicyInfo {
  readonly attribute AdBreakPlacementList 
         adBreakPlacements;
   readonly attribute Ad ad;
   readonly attribute  double currentTime;
   readonly attribute  double seekToTime;
   readonly attribute  double rate;
   readonly attribute  short mode;  //AdPolicyMode
                  };

AdPolicySelector

interface AdPolicySelector {
   /**
    * AdbreakPolicy selectPolicyForAdBreak(
    *      AdPolicyInfo adPolicyInfo);
    */
   attribute Object selectPolicyForAdBreakCallbackFunc;
     /**
      *   AdBreakTimelineItemList selectAdBreaksToPlay(
      *        AdPolicyInfo adPolicyInfo);
      */
    attribute Object selectAdBreaksToPlayCallbackFunc;
    /**
     * AdPolicy selectPolicyForSeekIntoAd(AdPolicyInfo adPolicyInfo);
     */
    attribute Object selectPolicyForSeekIntoAdCallbackFunc;    
    /**
     * AdBreakWatchedPolicy selectWatchedPolicyForAdBreak(
     *      AdPolicyInfo adPolicyInfo);
     */
   attribute Object selectWatchedPolicyForAdBreakCallbackFunc;
                    };

interface AdPolicySelector {
     /**
      * AdbreakPolicy selectPolicyForAdBreak(
      *      AdPolicyInfo adPolicyInfo);
      */
     attribute Object selectPolicyForAdBreakFuncCallback;
     /**
      *  AdBreakPlacementList selectAdBreaksToPlay(
      *         AdPolicyInfo adPolicyInfo);
      */
     attribute Object selectAdBreaksToPlayCallback;
     /**
      * AdPolicy selectPolicyForSeekIntoAd(AdPolicyInfo adPolicyInfo);
      */
     attribute Object selectPolicyForSeekIntoAdCallback;   
     /**
      * AdBreakAsWatched selectWatchedPolicyForAdBreak(
      *   AdPolicyInfo adPolicyInfo);
      */
     attribute Object selectWatchedPolicyForAdBreakCallback;
};

TimelineOperation

2.0 API 1.3 API
TimelineOperation  

interface TimelineOperation  { 
     readonly attribute  Placement placement ; 
                 };

  (New for 2.0)

AdBreakPlacement

2.0 API 1.3 API
AdBreakPlacement  

interface AdBreakPlacement : TimelineOperation {
     readonly attribute AdBreak adBreak;
     readonly attribute Placement placement; // From TimelineOperation
     readonly attribute double time;
     readonly attribute double duration;
};

interface AdBreakPlacement {
     readonly attribute AdBreak adBreak;
     readonly attribute Placement placement;
     readonly attribute double time;
     readonly attribute double duration;
};

AuditudeSettings

2.0 API 1.3 API
AuditudeSettings  

interface AuditudeSettings : AdvertisingMetadata { 
                         attribute DomString zoneId; 
                         attribute DomString mediaId; 
                         attribute DomString defaultMediaId ; 
                         attribute DomString domain ; 
                         attribute Object targettingInfo ; 
                         attribute Object customParameters ; 
                         attribute Boolean creativePackaingEnabled ;
                         attribute Boolean showStaticBanners ;
                   };

Functionality was provided byMetadataKeys::AUDITUDE_METADATA_KEY key.

Customization API element changes for 2.0

These tables compare the customization API elements for the JavaScript TVSDK between versions 1.3 and 2.0.

Tables in this topic:

  • MediaPlayerItemConfig
  • ContentFactory
  • NetworkConfiguration

MediaPlayerItemConfig

2.0 APIs 1.3 APIs
MediaPlayerItemConfig

interface MediaPlayerItemConfig {
        attribute ContentFactory adFactory;
        attribute StringList subscribeTags;

        attribute StringList adTags;


        attribute AdSignalingMode adSignalingMode;
        attribute CustomRangeMetadata customRangeMetadata;
        attribute NetworkConfiguration networkConfiguration;
        attribute AdvertisingMetadata advertisingMetadata;
        attribute Boolean useHardwareDecoder;
};

interface MediaPlayerConfig {



            attribute StringList adTags;
           attribute StringList subscribedTags;
            attribute MediaPlayerClientFactory clientFactory;





};

ContentFactory

2.0 APIs 1.3 APIs
ContentFactory

interface ContentFactory {
    /*
     * AdPolicySelector retrieveAdPolicySelector(
     *      MediaPlayerItem item);
     */
    attribute Object retrieveAdPolicySelectorCallbackFunc;
};

interface MediaPlayerClientFactory {
    /*
     * AdPolicySelector retrieveAdPolicySelector(
     *        MediaPlayerItem item);
     */
    attribute Object retrieveAdPolicySelectorFunc;
};

NetworkConfiguration

2.0 APIs 1.3 APIs
NetworkConfiguration

interface NetworkConfiguration
{
            attribute boolean forceNativeNetworking;
            attribute boolean useRedirectedUrl;
            attribute Object cookieHeader;
            attribute boolean readSetCookieHeader;
            attribute int masterUpdateInterval; 
            attribute boolean useCookieHeaderForAllRequests;
            attribute int readLimit;
};

In 1.3, some of this functionality was provided by MetadataKeys

DRM API element changes for 2.0

These tables compare the DRM API elements for the JavaScript TVSDK between versions 1.3 and 2.0.

Tables in this topic:

  • DRM Workflow Initialization
  • DRMAcquireLicenseSettings / DRMAuthenticationMethod
  • DRMMetadata
  • DRMPlaybackTimeWindow
  • DRMLicense
  • DRMLicenseDomain
  • DRMPolicy
  • DRMManager

DRM Workflow Initialization

2.0 APIs 1.3 APIs
Application needs to call AdobePSDK.initiateDRMWorkflow to initiate the DRM workflow. Without this call, DRM videos will not play.

interface AdobePSDK
{
void initiateDRMWorkFlow(
DomString appStoratePath,
DomString publisherId,
DomString appId,
DomString appVersion,
boolean privacyModeOn);
};

Initialization was done internally and no explicit call was required.

DRMAcquireLicenseSettings/DRMAuthenticationMethod

2.0 APIs 1.3 APIs
DRMAcquireLicenseSettings
No change for 2.0.

enum DRMAcquireLicenseSettings {
    const unsigned int FORCE_REFRESH = 0;
    const unsigned int LOCAL_ONLY = 1;
    const unsigned int ALLOW_SERVER = 2;
};

DRMAuthenticationMethod
No change for 2.0.

enum DRMAuthenticationMethod {
    const unsigned int UNKNOWN = 0;
    const unsigned int ANONYMOUS = 1;
    const unsigned int USERNAME_AND_PASSWORD = 2;
}

DRMMetadata

2.0 APIs 1.3 APIs
DRMMetadata
No change for 2.0.

interface DRMMetadata
{
    readonly attribute DomString serverUrl;
    readonly attribute DomString licenseId;
    readonly attribute DRMPolicyArray policies;   
};

DRMPlaybackTimeWindow

2.0 APIs 1.3 APIs
DRMPlaybackTimeWindow

interface DRMPlaybackTimeWindow {
    readonly attribute int playbackPeriodInSeconds;
    readonly attribute long playbackStartDate;
    readonly attribute long playbackEndDate;
};

interface DRMPlaybackTimeWindow {
    readonly attribute int periodInSeconds;
    readonly attribute int startDate;
    readonly attribute int endDate;
};

DRMLicense

2.0 APIs 1.3 APIs
DRMLicense
No change for 2.0.

interface DRMLicense {
    readonly attribute Uint8Array bytes;
    readonly attribute Date licenseStartDate;
    readonly attribute Date licenseEndDate;
    readonly attribute Date offlineStorageStartDate;
    readonly attribute Date offlineStorageEndDate;   
    readonly attribute DomString serverUrl;
    readonly attribute DomString licenseID;
    readonly attribute DomString policyID;
    readonly attribute DRMPlaybackTimeWindow playbackTimeWindow;
    readonly attribute Object customProperties;
};  

DRMLicenseDomain

2.0 APIs 1.3 APIs
DRMLicenseDomain

interface DRMLicenseDomain {
    readonly attribute DomString authenticationDomain;
    readonly attribute DRMAuthenticationMethod authenticationMethod;   
    readonly attribute DomString serverUrl;
};

interface DRMLicenseDomain {
    readonly attribute DomString authDomain;
    readonly attribute DRMAuthenticationMethod authMethod;   
    readonly attribute DomString serverURL;
};

DRMPolicy

2.0 APIs 1.3 APIs
DRMPolicy

interface DRMPolicy
{
    readonly attribute DomString authenticationDomain;
    readonly attribute DRMAuthenticationMethod authenticationMethod;

    readonly attribute DomString displayName;
    readonly attribute DRMLicenseDomain licenseDomain;
};

interface DRMPolicy
{
    readonly attribute DomString authDomain;
    readonly attribute DRMAuthenticationMethod authMethod;
    readonly attribute DomString dispName;
    readonly attribute DRMLicenseDomain licenseDomain;
};

DRMManager

2.0 APIs 1.3 APIs
DRMManager

interface DRMManager : EventTarget {
    void acquireLicense(DRMMetadata metadata, 
           DRMAcquireLicenseSettings setting, 
           DRMAquireLicenseListener listener);
    void acquirePreviewLicense(DRMMetadata metadata, 
            DRMAquireLicenseListener listener);
    void authenticate(DRMMetadata metadata, 
            DomString url,
            DomString &authenticationDomain, 
            DomString user, 
            DomString password, 
            DRMAuthenticateListener listener);

    DRMMetadata createMetadataFromBytes(
            Uint8Array array, DRMErrorListener listener);
    void initialize(DRMOperationCompleteListener listener);
    attribute long maxOperationTime;

   void joinLicenseDomain(
            DRMLicenseDomain licenseDomain, 
            boolean forceRefresh, 
            DRMOperationCompleteListener listener);
    void leaveLicenseDomain(
            DRMLicenseDomain licenseDomain, 
            DRMOperationCompleteListener listener);

   void resetDRM(DRMOperationCompleteListener listener);
    void returnLicense(DomString serverURL, 
            DomString licenseID, 
            DomString policyID, 
            boolean commitImmediately,
            DRMReturnLicenseListener listener);
    void setAuthenticationToken(
            DRMMetadata metadata, 
            DomString authenticationDomain, 
            Uint8Array token, 
            DRMOperationCompleteListener listener);
    void storeLicenseBytes(Uint8Array licenseBytes, 
            DRMOperationCompleteListener listener);
};

interface DRMManager : EventTarget {
    void acquireLicense(DRMMetadata metadata, 
            DRMAcquireLicenseSettings setting, 
            EventContext eventContext);
    void acquirePreviewLicense(DRMMetadata metadata, 
            EventContext eventContext);
    void authenticate(DRMMetadata metadata, 
            DomString url,
            DomString &authenticationDomain, 
            DomString user, 
            DomString password,     
            EventContext eventContext);

   DRMMetadata createMetadataFromBytes(
            Uint8Array array, EventContext eventContext);
    void initialize(EventContext eventContext);
    attribute long maxOperationTime;

    void joinLicenseDomain(
            DRMLicenseDomain licenseDomain, 
            boolean forceRefresh, 
            EventContext eventContext);
    void leaveLicenseDomain(
            DRMLicenseDomain licenseDomain, 
           EventContext eventContext);

    void resetDRM(EventContext eventContext);
    void returnLicense(DomString serverURL, 
            DomString licenseID,
            DomString policyID, 
            boolean commitImmediately,
            EventContext eventContext);
    void setAuthenticationToken(
            DRMMetadata metadata, 
            DomString authenticationDomain, 
            Uint8Array token, 
            EventContext eventContext);
    void storeLicenseBytes(Uint8Array licenseBytes, 
            EventContext eventContext);
};

DRMErrorListener

class DRMErrorListener : 
      public psdkutils::PSDKInterfaceWithUserData {
public:
    virtual void onDRMError(uint32_t major, 
         uint32_t minor, 
         const psdkutils:: PSDKString& errorString, 
         const psdkutils::PSDKString& errorServerUrl) = 0;

protected:
    virtual ~DRMErrorListener() {}
}

Event / Interface / Description
  • kEventDRMOperationError

    / DRMOperationErrorEvent

    When an error occurs during one of the asynchronous methods of DRMManger.

DRMOperationCompleteListener

class DRMOperationCompleteListener : 
      public DRMErrorListener {
public:
    virtual void onDRMOperationComplete() = 0;

protected:
    virtual ~DRMOperationCompleteListener() {}
};

Event / Interface / Description
  • kEventDRMInitializationComplete

    / PSDKEvent

    When Initialization of DRM is complete.

  • kEventDRMJoinLicenseDomainComplete

    / PSDKEvent

    When joinLicenseDomain() action completes successfully.

  • kEventDRMLeaveLicenseDomainComplete

    / PSDKEvent

    When leaveLicenseDomain() action completes successfully.

  • kEventDRMResetCompletePSDKEvent

    / PSDKEvent

    When resetDRM() action completes successfully.

  • kEventDRMAuthenticationTokenSet

    / PSDKEvent

    When setAuthenticationTokenSet() action completes successfully.

  • kEventDRMLicenseStored

    / PSDKEvent

    When storeLicenseBytes() action completes successfully.

DRMAuthenticateListener

class DRMAuthenticateListener : 
      public DRMErrorListener {
public:
    virtual void onAuthenticationComplete(
         psdkutils::PSDKImmutableByteArray* 
         authenticationToken) = 0;

protected:
    virtual ~DRMAuthenticateListener() {}
}

Event / Interface / Description
  • kEventDRMAuthenticationComplete

    / DRMAuthenticationCompleteEvent

    When DRMManager::authenticate method call is successful.

DRMAquireLicenseListener

class DRMAquireLicenseListener: 
      public DRMErrorListener {
public:
    virtual void onLicenseAcquired(const DRMLicense*) = 0;

protected:
    virtual ~DRMAquireLicenseListener() {}
};

Event / Interface / Description
  • kEventDRMPreviewLicenseAcquired

    / DRMLicenseAcquiredEvent

    When DRMManager::acquirePreviewLicense method call is successful.

  • kEventDRMLicenseAcquired

    / DRMLicenseAcquiredEvent

    When DRMManager::acquireLicense method call is successful.

DRMReturnLicenseListener

class DRMReturnLicenseListener: 
      public DRMErrorListener {
public:
    virtual void onLicenseReturnComplete(uint32_t numReturned ) = 0;

protected:
    virtual ~DRMReturnLicenseListener() {}
};

Event / Interface / Description
  • kEventDRMLicenseReturnComplete

    / DRMLicenseReturnCompleteEvent

    When DRMManager::returnLicense method call is successful.

Generic playback API element changes for 2.0

These tables compare the generic playback API elements between the JavaScript TVSDK 1.3 and 2.0.

Tables in this topic:

  • MediaResource
  • MediaPlayer
  • ABRControlParameters
  • BufferControlParameters
  • TextFormat
  • MediaPlayerItemLoader

MediaResource

2.0 APIs 1.3 APIs
MediaResource

interface MediaResource {
     attribute DomString url;    
     attribute unsigned short type;
     attribute Object metadata;
    const unsigned short TYPE_HLS;
    const unsigned short TYPE_HDS;
    const unsigned short TYPE_DASH;
    const unsigned short TYPE_CUSTOM;
    const unsigned short TYPE_UNKNOWN;
};

interface MediaResource {
     attribute DomString url;
     attribute DomString type;
     attribute Object metadata;
   




};

MediaPlayer

2.0 APIs 1.3 APIs
MediaPlayer

interface MediaPlayer : EventTarget
{
     void prepareToPlay( double position);
     void play();
     void pause();
     void seek( double position);
     void seekToLocal( double position);
     void reset();
     void release();
     void replaceCurrentItem(MediaPlayerItem item);
     void replaceCurrentResource(MediaResource rsource, 
            MediaPlayerItemConfig config); 
     void suspend();
     void restore();
     void notifyClick();

     readonly attribute TimeRange playbackRange;
     readonly attribute TimeRange seekableRange;
     readonly attribute double currentTime;
     readonly attribute double localTime;
     readonly attribute TimeRange bufferedRange;
     readonly attribute DRMManager drmManager;
     readonly attribute MediaPlayerItem currentItem;

// PlayerStatus


     const unsigned short PLAYER_STATUS_INITIALIZED;
     const unsigned short PLAYER_STATUS_PREPARING;
     const unsigned short PLAYER_STATUS_PREPARED;
     const unsigned short PLAYER_STATUS_PLAYING;
     const unsigned short PLAYER_STATUS_PAUSED;
     const unsigned short PLAYER_STATUS_SEEKING;
     const unsigned short PLAYER_STATUS_COMPLETE;
     const unsigned short PLAYER_STATUS_ERROR;
     const unsigned short PLAYER_STATUS_RELEASED;

    readonly attribute unsigned  short status;

     attribute unsigned short volume;
     attribute ABRControlParameters abrControlParameters;
     attribute BufferControlParameters bufferControlParameters;
   
  const unsigned short VISIBLE; //For CC visibility
  const unsigned short INVISIBLE; //For CC visibility
    attribute unsigned short ccVisibility;
    attribute TextFormat ccStyle;
    readonly attribute PlaybackMetrics playbackMetrics;
    
    attribute double rate;
    attribute MediaPlayerView view;
    readonly attribute Timeline timeline;
    attribute double currentTimeUpdateInterval; 
        // setting this Won't be supported for 2.0
};

interface MediaPlayer : EventTarget
{
     void prepareToPlay( int position);
     void play();
     void pause();
     void seek( int position);
     void seekToLocalTime( int position);
     void reset();
     void release();
     void replaceCurrentItem(MediaResource source);






    readonly attribute TimeRange playbackRange;
     readonly attribute TimeRange seekableRange;
     readonly attribute double currentTime;
     readonly attribute double localTime;
     readonly attribute TimeRange bufferedRange;
     readonly attribute DRMManager drmManager;
     readonly attribute MediaPlayerItem currentItem;

     // PlayerState
     const unsigned short PLAYER_STATE_IDLE;
     const unsigned short PLAYER_STATE_INITIALIZING;
     const unsigned short PLAYER_STATE_INITIALIZED;
     const unsigned short PLAYER_STATE_PREPARING;
     const unsigned short PLAYER_STATE_PREPARED;
     const unsigned short PLAYER_STATE_PLAYING;
     const unsigned short PLAYER_STATE_PAUSED;
     const unsigned short PLAYER_STATE_SEEKING;
     const unsigned short PLAYER_STATE_COMPLETE;
     const unsigned short PLAYER_STATE_ERROR;
     const unsigned short PLAYER_STATE_RELEASED;
     const unsigned short PLAYER_STATUS_SUSPENDED;
     readonly attribute unsigned short state;

     attribute unsigned short volume;
     attribute ABRControlParameters abrControlParameters;
     attribute BufferControlParameters bufferControlParameters;

     readonly unsigned short VISIBLE; //For CC visibility
     readonly unsigned short INVISIBLE; //For CC visibility
     attribute unsigned short ccVisibility;
     attribute TextFormat ccStyle;
     readonly attribute PlaybackMetrics playbackMetrics;
     attribute MediaPlayerConfig mediaPlayerConfig;
     attribute double rate;
     attribute MediaPlayerView view;
     readonly attribute Timeline timeline;


};

MediaPlayerStatus

interface MediaPlayerStatus
{
// PlayerStatus
     const unsigned short PLAYER_STATUS_IDLE;
     const unsigned short PLAYER_STATUS_INITIALIZING;
     const unsigned short PLAYER_STATUS_INITIALIZED;
     const unsigned short PLAYER_STATUS_PREPARING;
     const unsigned short PLAYER_STATUS_PREPARED;
     const unsigned short PLAYER_STATUS_PLAYING;
     const unsigned short PLAYER_STATUS_PAUSED;
     const unsigned short PLAYER_STATUS_SEEKING;
     const unsigned short PLAYER_STATUS_COMPLETE;
     const unsigned short PLAYER_STATUS_ERROR;
     const unsigned short PLAYER_STATUS_RELEASED;
     const unsigned short PLAYER_STATUS_SUSPENDED;
};

(New for 2.0)

Events supported by MediaPlayer

2.0 Event name 2.0 Interface   1.3 Event name 1.3 Interface

(deleted for 2.0)

    prepared Event

itemUpdated

When a media player item is updated.

MediaPlayerItemEvent  

updated

When the media player has successfully updated the media.

Event
timedMetadataAvailable TimedMetadataEvent   TtmedMetadata TimedMetadataEvent
timelineUpdated Event   TtmelineUpdated Event
Deleted in 2.0     playStart Event
Deleted for 2.0     playComplete Event
statusChanged StatusEvent   stateChanged StateEvent
sizeAvailable SizeEvent   size SizeEvent
adBreakStarted AdBreakEvent   adBreakStart AdBreakEvent
adStarted AdEvent   adStart AdEvent
adProgress AdProgressEvent   adProgress AdProgressEvent
adCompleted AdEvent   adComplete AdEvent
adBreakCompleted AdBreakEvent   adBreakComplete AdBreakEvent
timeChanged TimeEvent   progress ProgressEvent
bufferingBegin Event   buffer Event
bufferingEnd Event   bufferComplete Event
seekBegin SeekEvent   seekStart Event
seekEnd SeekEvent   seekComplete TimeEvent
loadInformationAvailable LoadInformationEvent   loadInfo LoadInfoEvent
operationFailed NotificationEvent   operationFailed ErrorEvent
drmMetadataInfoAvailable DRMMetadataEvent   drmMetadata DRMMetadataEvent
reservationReached ReservationEvent   timelineHolderReached TimelineHolderEvent
      bitrateChanged BitrateChangedEvent
rateSelected PlaybackRateEvent   rateSelected PlaybackRateEvent
ratePlaying PlaybackRateEvent   ratePlaying PlaybackRateEvent
adBreakSkipped AdBreakEvent   adBreakSkipped AdBreakEvent
adClicked
When user clicks on an Ad.
AdClickedEvent  

New in 2.0

 
profileChanged
When the playback profile changes.
ProfileEvent  

New in 2.0

 
seekPositionAdjusted
When seek position adjusts due to internal or external rules.
SeekEvent  

New in 2.0

 
audioUpdated
When a media player item is updated. For certain streams that contain audio tracks that are detectable only at playback time, this event is fired when new audio tracks are available.
MediaPlayerItemEvent  

New in 2.0

 
captionsUpdated
When a media player item is updated. For live/linear streams, the client must periodically refresh the media resource to detect the new available content. When this happens, certain media characteristics might change.
MediaPlayerItemEvent  

New in 2.0

 
masterUpdated
When a media player item is updated. For live/linear streams, the client must periodically refresh the media resource to detect the new available content. When this happens, certain media characteristics might change.
MediaPlayerItemEvent  

New in 2.0

 
playbackRangeUpdated
When a media player item is updated. For live/linear streams, the client must periodically refresh the media resource to detect the new available content. When this happens, certain media characteristics might change.
MediaPlayerItemEvent  

New in 2.0

 
timedEvent
Sent when timed events are generated.
TimedEvent  

New in 2.0

ABRControlParameters

2.0 APIs 1.3 APIs
ABRControlParameters

interface ABRControlParameters
{
     const unsigned short ABR_POLICY_CONSERVATIVE = 0 ;
     const unsigned short ABR_POLICY_MODERATE = 1 ;
     const unsigned short ABR_POLICY_AGGRESIVE = 2 ;

     attribute unsigned short abrPolicy;
     attribute unsigned int initialBitRate;
     attribute unsigned int minBitRate;
     attribute unsigned int maxBitRate;
     const unsigned short DEFAULT_ABR_INITIAL_BITRATE;
     const unsigned short DEFAULT_ABR_MIN_BITRATE;
     const unsigned short DEFAULT_ABR_MAX_BITRATE;
     const ABRPolicy DEFAULT_ABR_POLICY;
};

interface ABRControlParameters
{
     const unsigned short ABR_POLICY_CONSERVATIVE = 0 ;
     const unsigned short ABR_POLICY_MODERATE = 1 ;
     const unsigned short ABR_POLICY_AGGRESIVE = 2 ;

     attribute unsigned short abrPolicy;
     attribute unsigned int initialBitRate;
     attribute unsigned int minBitRate;
     attribute unsigned int maxBitRate;




};

BufferControlParameters

2.0 APIs 1.3 APIs
BufferControlParameters

interface BufferControlParameters
{
     attribute double initialBufferTime;
     attribute double playBufferTime;
    const double DEFAULT_INITIAL_BUFFER_TIME;
    const double  DEFAULT_PLAY_BUFFER_TIME;
};

interface BufferControlParameters
{
     attribute double initialBufferTime;
     attribute double playBufferTime;


};

TextFormat

2.0 APIs 1.3 APIs
TextFormat
No change for 2.0

interface TextFormat
{
     // Color
     const unsigned  short COLOR_DEFAULT =  0 ;
     const unsigned short COLOR_BLACK = 1 ;
     const unsigned short COLOR_GRAY = 2 ;
     const unsigned short COLOR_WHITE = 3 ;
     const unsigned short COLOR_BRIGHT_WHITE = 4 ;
     const unsigned short COLOR_DARK_RED = 5 ;
     const unsigned short COLOR_RED = 6 ;
     const unsigned short COLOR_BRIGHT_RED = 7 ;
     const unsigned short COLOR_DARK_GREEN = 8 ;
     const unsigned short COLOR_GREEN = 9 ;
     const unsigned short COLOR_BRIGHT_GREEN = 10 ;
     const unsigned short COLOR_DARK_BLUE = 11 ;
     const unsigned short COLOR_BLUE = 12 ;
     const unsigned short COLOR_BRIGHT_BLUE = 13 ;
     const unsigned short COLOR_DARK_YELLOW = 14 ;
     const unsigned short COLOR_YELLOW = 15 ;
     const unsigned short COLOR_BRIGHT_YELLOW = 16 ;
     const unsigned short COLOR_DARK_MAGENTA = 17 ;
     const unsigned short COLOR_MAGENTA = 18 ;
     const unsigned short COLOR_BRIGHT_MAGENTA = 19 ;
     const unsigned short COLOR_DARK_CYAN = 20 ;
     const unsigned short COLOR_CYAN = 21 ;
     const unsigned short COLOR_BRIGHT_CYAN = 22 ;

     readonly attribute unsigned short fontColor;
     readonly attribute unsigned short backgroundColor;
     readonly attribute unsigned short fillColor;
     readonly attribute unsigned short edgeColor;

     // Size
     const unsigned  short SIZE_DEFAULT =  0 ;
     const unsigned short SIZE_SMALL = 1 ;
     const unsigned short SIZE_MEDIUM = 2 ;
     const unsigned short SIZE_LARGE = 3 ;

     readonly attribute unsigned short size;

     // FontEdge
     const unsigned  short FONT_EDGE_DEFAULT =  0 ;
     const unsigned short FONT_EDGE_NONE = 1 ;
     const unsigned short FONT_EDGE_RAISED = 2 ;
     const unsigned short FONT_EDGE_DEPRESSED = 3 ;
     const unsigned short FONT_EDGE_UNIFORM = 4 ;
     const unsigned short FONT_EDGE_DROP_SHADOW_LEFT = 5 ;
     const unsigned short FONT_EDGE_DROP_SHADOW_RIGHT = 6 ;
     readonly attribute unsigned  short fontEdge;

     // Font
     const unsigned  short FONT_DEFAULT =  0 ;
     const unsigned short FONT_MONOSPACED_WITH_SERIFS = 1 ;
     const unsigned short FONT_PROPORTIONAL_WITH_SERIFS = 2 ;
     const unsigned short FONT_MONSPACED_WITHOUT_SERIFS = 3 ;
     const unsigned short FONT_CASUAL = 4 ;
     const unsigned short FONT_CURSIVE = 5 ;
     const unsigned short FONT_SMALL_CAPITALS = 6 ;
     readonly attribute unsigned  short font;
     readonly attribute unsigned short fontOpacity;
     readonly attribute unsigned short backgroundOpacity;
     readonly attribute unsigned short fillOpacity;
     readonly attribute unsigned short DEFAULT_OPACITY;
};

MediaPlayerItemLoader

2.0 APIs 1.3 APIs
MediaPlayerItemLoader

interface MediaPlayerItemLoader:
{
    void load(MediaResource resource, long resourceId,
           ItemLoaderListener listener, 
           MediaPlayerItemConfig config) ;
    void cancel();
    readonly attribute MediaPlayerItem currentItem;
};

New for 2.0
ItemLoaderListener

interface ItemLoaderListener
{
//onLoadCompleteCallbackFunc(MediaPlayerItem)
    var onLoadCompleteCallbackFunc;
//onErrorCallbackFunc(PSDKErrorCode)
    var onErrorCallbackFunc;
}

New for 2.0

Media characteristics API element changes for 2.0

These tables compare the media characteristic API elements for the C++ TVSDK between versions 1.3 and 2.0.

Tables in this topic:

  • MediaPlayerItem
  • Track, AudioTrack, ClosedCaptionsTrack
  • Profile
  • DRMMetadataInfo

MediaPlayerItem

2.0 APIs 1.3 APIs
MediaPlayerItem

interface MediaPlayerItem {
    readonly attribute MediaResource resource;
    readonly attribute long resourceId;
    readonly attribute boolean live;

    readonly attribute boolean hasAlternateAudio;
    readonly attribute AudioTrackList audioTracks;
    readonly attribute AudioTrack selectedAudioTrack;
    void selectAudioTrack(AudioTrack track);       

    readonly attribute boolean hasClosedCaptions;
    readonly attribute ClosedCaptionsTrackList closedCaptionsTracks;
    readonly attribute ClosedCaptionsTrack selectedClosedCaptionsTrack;
    void selectClosedCaptionsTrack(
            ClosedCaptionsTrack track);  
     
    readonly attribute boolean hasTimedMetadata;
    readonly attribute TimedMetadataList timedMetadata;
    readonly attribute boolean dynamic;

    readonly attribute boolean isProtected;
    readonly attribute DRMMetadataInfoList drmMetadataInfos;
    readonly attribute ProfileList profiles;
    readonly attribute Profile selectedProfile;

    readonly attribute boolean trickPlaySupported;
    readonly attribute FloatArray availablePlaybackRates;
    readonly attribute float selectedPlaybackRate;
    

    readonly attribute MediaPlayer mediaPlayer;
    readonly attribute MediaPlayerItemConfig config;
};

interface MediaPlayerItem {
    readonly attribute MediaResource resource;
    readonly attribute long resourceId;
    readonly attribute boolean live;

    readonly attribute boolean hasAlternateAudio;
    readonly attribute AudioTrackList audioTracks;
    attribute AudioTrack selectedAudioTrack;


    readonly attribute boolean hasClosedCaptions;
    readonly attribute ClosedCaptionsTrackList ccTracks;
    attribute ClosedCaptionsTrack selectedCCTrack;



    readonly attribute boolean hasTimedMetadata;
    readonly attribute TimedMetadataList timedMetadata;
    readonly attribute boolean dynamic;

    readonly attribute boolean isProtected;
    readonly attribute DRMMetadataInfoList drmMetadataInfos;
    readonly attribute ProfileList profiles;


    readonly attribute boolean trickPlaySupported;
    readonly attribute Int32Array availablePlaybackRates;

    readonly attribute StringList adTags;

    readonly attribute MediaPlayer mediaPlayer;

};

Track / AudioTrack / ClosedCaptionsTrack

2.0 APIs 1.3 APIs
Track

interface Track
{
    readonly attribute DomString name;
    readonly attribute DomString language;
    readonly attribute boolean default;
    readonly attribute boolean autoSelect;
};  

New for 2.0
AudioTrack

interface AudioTrack : Track
{
    readonly attribute DomString name; //FromTrack
    readonly attribute DomString language;//FromTrack
    readonly attribute boolean default; // From Track
    readonly attribute boolean autoSelect;//FromTrack

    readonly attribute unsigned int pid;
};

interface AudioTrack
{
    readonly attribute DomString name;
    readonly attribute DomString language; 
    readonly attribute boolean default;
    readonly attribute boolean autoSelect;
   readonly attribute boolean forced;

};

AudioTrackList
No change for 2.0

interface AudioTrackList
{
    readonly attribute unsigned long length;
    getter AudioTrack (unsigned long index);
};

ClosedCaptionsTrack

interface ClosedCaptionsTrack : Track
{
    readonly attribute DomString name; //FromTrack
    readonly attribute DomString language;//FromTrack
    readonly attribute boolean default; // FromTrack
   readonly attribute boolean autoSelect;//FromTrack

        
    const unsigned short SERVICE_608_CAPTIONS = 0;
    const unsigned short SERVICE_708_CAPTIONS = 1;
    const unsigned short SERVICE_WEB_VTT_CAPTIONS = 2;
    readonly attribute unsigned short serviceType;
    readonly attribute boolean forced;
};

interface ClosedCaptionsTrack
{
    readonly attribute DomString name;
    readonly attribute DomString language;
    readonly attribute boolean default;

  
     readonly attribute boolean active;





};

ClosedCaptionsTrackList
No change for 2.0

interface ClosedCaptionsTrackList
{
    readonly attribute unsigned long length;
    getter ClosedCaptionsTrack(unsigned long index);
};

Profile

2.0 APIs 1.3 APIs
Profile
No change for 2.0

interface Profile
{
    readonly attribute unsigned int width;
    readonly attribute unsigned int height;
    readonly attribute unsigned int bitRate;
};  

ProfileList
No change for 2.0

interface ProfileList
{
    readonly attribute unsigned long length;
    getter Profile(unsigned long index);
};

DRMMetadataInfo

2.0 APIs 1.3 APIs
DRMMetadataInfo
No change for 2.0

interface DRMMetadataInfo
{  
    readonly attribute DRMMetadata metadata;
    readonly attribute long prefetchTimestamp;
    readonly attribute TimeRange timeRange;
};

DRMMetadataInfoList
No change for 2.0

interface DRMMetadataInfoList
{
    readonly attribute unsigned long length;
    getter DRMMetadataInfo(unsigned long index);
};

Mapping C++ Errors to Exceptions in Different Languages

You can map C++ error codes to exceptions in different languages.

The C++ PSDK has a "no throw" policy for its APIs. Most of the API methods return a PSDKErrorCode value to indicate whether the method was executed successfully. Asynchronous errors are notified through the error events.

The ActionScript and JAVA PSDK have a different policy. Most of the errors will throw an ArgumentError or IllegalStateException to indicate that the synchronous part of the method could not be executed. These exceptions are not caught, and the application code is responsible for handling the exceptions. They usually carry useful information of why the method call failed. For example, if the prepareToPlay command is called in an invalid state, the following exception is thrown:

throw new IllegalStateException("Invalid player state. prepareToPlay method 
must be called only once after replaceCurrentItem or replaceCurrentResource method.");

The ActionScript/JAVA also throws exceptions from constructors to indicate that some internal object was incorrectly created. These exceptions are handled internally, and they are not propagated to the application. The exceptions will be included in a warning notification that is sent to the application 

For example, if no valid media file was found for the received ad response, then no valid ad asset object or ad can be created. As a result, no ad is placed on the timeline, and a NotificationEvent.OperationFailed notification is dispatched.  

Error or warning codes that are received asynchronously from the Adobe Video Engine (AVE) are dispatched to the application as normal events. The notification event contains all received error codes and any additional metadata, such as the URL, resource identifier, handle, and so on. If the error is serious and the playback of the current media cannot continue, the MediaPlayer transitions to the ERROR status and onStatusChanged callback or MediaPlayerStatusChanged.STATUS_CHANGED event is dispatched. If the playback can continue, a normal notification event is dispatched.

C++ Error (PSDKError Code)   Java ActionScript JavaScript
kECInvalidArgument   IllegalArgumentException ArgumentError Exception with code = 1, description = "INVALID_ARGUMENT" and additionalInfo= <as passed by method which threw this exception>
kECNullPointer   IllegalArgumentException ArgumentError Exception with code = 2, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECIllegalState   IllegalStateException IllegalStateException Exception with code = 3, description = "ILLEGAL_STATE" and additionalInfo= <as passed by method which threw this exception>
kECInterfaceNotFound   - - Exception with code = 4, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECCreationFailed   - - Exception with code = 5, description = "CREATION_FAILED" and additionalInfo= <as passed by method which threw this exception>
kECUnsupportedOperation   - - Exception with code = 5, description = "CREATION_FAILED" and additionalInfo= <as passed by method which threw this exception>
kECDataNotAvailable   - - Exception with code = 7, description = "DATA_NOT_AVAILABLE" and additionalInfo= <as passed by method which threw this exception>
kECSeekError   - - Exception with code = 8, description = "SEEK_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECUnsupportedFeature   - - Exception with code = 9, description = "UNSUPPORTED_FEATURE" and additionalInfo= <as passed by method which threw this exception>
kECRangeError   - - Exception with code = 10, description = "RANGE_ERROR" and additionalInfo= <as passed by method which threw this exception
kECCodecNotSupported   - - Exception with code = 11, description = "CODEC_NOT_SUPPORTED" and additionalInfo= <as passed by method which threw this exception>
kECMediaError   - - Exception with code = 12, description = "MEDIA_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECNetworkError   - - Exception with code = 13, description = "NETWORK_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECGenericError   MediaPlayerNotification.Error or MediaPlayerNotification.Warning MediaError or NotificationEvent Exception with code = 14, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECInvalidSeekTime   - - Exception with code = 15, description = "INVALID_SEEK_TIME" and additionalInfo= <as passed by method which threw this exception>
kECAudioTrackError   - - Exception with code = 16, description = "AUDIO_TRACK_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECAccessFromDifferent

ThreadError

  - - Exception with code = 17, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECElementNotFound   - - Exception with code = 18, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception
kECNotImplemented   - - Exception with code = 19, description = "GENERIC_ERROR" and additionalInfo= <as passed by method which threw this exception>
kECPlaybackOperationFailed   - - Exception with code = 200, description = "PLAYBACK_OPERATION_FAILED" and additionalInfo= <as passed by method which threw this exception>
kECNativeWarning   MediaPlayerNotification.Warning NotificationEvent Exception with code = 201, description = "NATIVE_WARNING" and additionalInfo= <as passed by method which threw this exception
kECAdResolverFailed   MediaPlayerNotification.Warning - Exception with code = 202, description = "AD_RESOLVER_FAILED" and additionalInfo= <as passed by method which threw this exception>

Utility and Helper API element changes for 2.0

These tables compare the Utility and Helper API elements for the JavaScript TVSDK between versions 1.3 and 2.0.

Tables in this topic:

  • Version
  • TimeRange
  • QOSProvider
  • DeviceInformation
  • LoadInfo
  • View
  • PlaybackInformation

Version

2.0 APIs 1.3 APIs
Version

interface Version
{
     readonly attribute DomString version;
     readonly attribute DomString description;
     readonly attribute long major;
     readonly attribute long minor;
     readonly attribute long revision;
     readonly attribute long apiVersion;
};

interface Version
{
     readonly attribute DomString version;
     readonly attribute DomString description;
     readonly attribute DomString major;
     readonly attribute DomString minor;
     readonly attribute DomString revision;
     readonly attribute DomString apiVersion;
};

TimeRange

2.0 APIs 1.3 APIs
TimeRange
No change for 2.0

interface TimeRange
{
     readonly attribute unsigned long begin;
     readonly attribute unsigned long end;
     readonly attribute unsigned long duration;
};

QOSProvider

2.0 APIs 1.3 APIs
QOSProvider
No change for 2.0

interface QOSProvider
{
     void attachMediaPlayer(MediaPlayer player);
     void detachMediaPlayer();
     
     readonly attribute DeviceInformation deviceInformation;
     readonly attribute PlaybackInformation playbackInformation;
};

DeviceInformation

2.0 APIs 1.3 APIs
DeviceInformation

interface DeviceInformation
{
     readonly attribute DomString os;



     readonly attribute DomString id;
     readonly attribute int densityDPI;
     readonly attribute int heightPixels;
     readonly attribute int widthPixels;
     readonly attribute boolean seekToKeyFrame;
};

interface DeviceInformation
{
     readonly attribute DomString os;
     readonly attribute int sdk;
     readonly attribute DomString model;
     readonly attribute DomString manufacturer;
     readonly attribute DomString id;
     readonly attribute int densityDPI;
     readonly attribute int heightPixels;
     readonly attribute int widthPixels;

};

LoadInfo

2.0 APIs 1.3 APIs
LoadInfo
No change for 2.0

interface LoadInfo
{
     readonly attribute DomString url;
     readonly attribute int size;
     readonly attribute double downloadDuration;
     readonly attribute int periodIndex;
     readonly attribute double mediaDuration;
     readonly attribute short TRACK_TYPE_FRAGMENT;
     readonly attribute short TRACK_TYPE_TRACK;
     readonly attribute short TRACK_TYPE_MANIFEST;
     readonly attribute short type;
     readonly attribute DomString trackName;
     readonly attribute DomString trackType;
     readonly attribute int trackIndex;
};

View

2.0 APIs 1.3 APIs
View
No change for 2.0

interface View
{
    readonly attribute unsigned short x;
    readonly attribute unsigned short y;
    readonly attribute unsigned short width;
    readonly attribute unsigned short height;

    void setSize(unsigned short width, unsigned short height);
    void setPos(unsigned short x, unsigned short y);
}

PlaybackInformation

2.0 APIs 1.3 APIs
PlaybackInformation

interface PlaybackInformation
{
     readonly attribute double timeToFirstByte;
     readonly attribute double timeToLoad;
     readonly attribute double timeToStart;
     readonly attribute double timeToFail;
     readonly attribute int totalSecondsPlayed;
     readonly attribute int totalSecondsSpent;
     readonly attribute double frameRate;
     readonly attribute int droppedFrameCount;
     readonly attribute int perceivedBandwidth;
     readonly attribute int bitrate;
     readonly attribute double bufferTime;
     readonly attribute int bufferLength;
     readonly attribute int emptyBufferCount;
     readonly attribute double bufferingTime;
};

interface PlaybackInformation
{
     readonly attribute double timeToFirstByte;
     readonly attribute double timeToLoad;
     readonly attribute double timeToStart;
     readonly attribute double timeToFail;
     readonly attribute int totalSecondsPlayed;
     readonly attribute int totalSecondsSpent;
     readonly attribute double frameRate;
     readonly attribute int droppedFrameCount;

     readonly attribute int bitrate;
     readonly attribute double bufferTime;
     readonly attribute int bufferLength;
     readonly attribute int emptyBufferCount;
     readonly attribute double bufferingTime;
};

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