AMP - Parameterization or Binding

Document created by Herberth Alvarado Employee on Apr 13, 2016Last modified by Herberth Alvarado Employee on Jan 26, 2017
Version 12Show Document
  • View in full screen mode

Maintainer: Maverick Chacon Garro

This document is part of Adaptive Media Player Web User Guide

 

 

Parameters

AMP has the capabilities for handle dynamically metadata during playback the main purpose of this feature is allow customers to easily use customer-specific, media-specific values for configuration options such as Analytics, advertising and customer custom functions.

There are 3 different ways to provide metadata or bind content.

  1. Customer provided: Into the params section provide in the config.
  2. Player provided: Populated values from the player.
  3. Wide-open JS / DOM execution: such as DOM variables, Javascript methods and expressions.

 

1. Customer provided (Params)

The player can “hold” general parameters that can then be sent to the ads and analytics calls.

Any string, Boolean, or numerical parameter are permitted, and then the params can be used in ads or analytics config blocks via the #{param} syntax.

Syntax for AMP config.

XML config
JSON config

<params type="Object">

<tracking_group type="Number">99999</tracking_group>

<sitesection type="String">ndn</sitesection>

<sec type="String">oth</sec>

<sub type="String">non</sub>

</params>

params:                                       

  {

  playerName: "fullpage",

  aam: "FRANKAAM",

  aamId: "FRANKAAMID",

  adparamSZ: "1001x1001|1920x1080" ,

  adparamSDMAX: "45000" ,

  hostname: "players.akamai.com"

  },

Please refer to the sections above for parameterization examples in the analytics section.

2. Player provided.

 

AMP provide us a lot of util metadata which we can access easier, AMP populates the following data.

2.1 Ad

All info related for ads, this can be access #{ad}. Properties available for ads.

 

NameType
Description

id

String

Represents ad id provided by ad vendor. Can be access as follows #{ad.id}

title

StringAd title from VAST or ad definition.

duration

NumberAd time duration.

position / *adIndex

NumberIndex or id for a specific ad from ads list. 

totalAds

NumberNumbers of ads.

type / *podPostion

StringIndicates if ad is pre, mid or post.

partner / *adPlatform

StringAd system such ima and dfp.

advertiser / *adSystem

StringAd vendor.

companions

ArrayList of companions ads.

metadata

ObjectMetadata from the ad reponse.

request

StringAd Tag url requested.

error

ObjectThis section provide more info when an error occurs during ads request.

currentTime

NumberAd playback timestamp.

 

* Property name for flash mode.

 

2.2 Player

 

NameType
Description

width

Number

Player Dimensions.

height

NumberPlayer Dimensions.

mode

StringPlayback mode, Flash or HTML5 vide tag.

autoplay

BooleanIf autoplay is enabled.

domain

StringPlayer domain. See the config options.

name

StringPlayer name.

currentTime

NumberPlayback current time.

version

StringPlayer buid number

timecode

Object

time code available

   timecode: {      duration: String // “00:00:00” format      currentTime: String  // “00:00:00” format    }

 

2.3 Media

 

NameType
Description

width

Number

Media Object dimensions

height

NumberMedia Object dimensions

title

StringMedia title.

description

StringA description for the current media. This could be set into feed data.

src

StringMedia location url.

duration

NumberTotal of media duration.

guid

StringUnique ID for a specific media.

isLive

BooleanOptional value for live streams.

temporalType

StringTemporal media type. (live, vod, ondemand).

poster

String

Poster image url.

categoryArrayCategories data.
scenesArrayOptional, if they are availble on feed object.
metadataObjectMetadata available on feed object.

3. Wide-open JS / DOM execution

Custom values and metadata created by customer on customer side such as

 

    1. DOM variables
    2. JS method calls
    3. Expressions

 

 

This document is part of Adaptive Media Player Web User Guide

Attachments

    Outcomes