wiki:OvaRCNotes-011211-3

Version 37 (modified by paul, 2 years ago) (diff)

--

What's New? (Release Candidate 3 - January X 2011)

The following versions have been issued as "release candidates".

  • OVA for AS3 v0.6.0 (build X)
  • OVA for JW Player 4 v0.5.0 (build X)
  • OVA for JW Player 5 v0.5.0 (build X)
  • OVA for Flowplayer v0.6.0 (build X)

The following changes are in this release:

  • VAST 2 wrapper support
  • VPAID 1.1 Linear Ad support (JW only. Flowplayer support will be in the next RC along with non-linear VPAID support)
  • An ability to configure a "Skip Ad" button
  • Dramatically simplified configuration for pre-roll only setups
  • Support for the specification of 'fail-over' ad servers
  • The OVA for AS3 SWC has been renamed to 'ova-as3-<version>.swc'
  • Deferred loading of ads via the 'delayAdRequestUntilPlay' option
  • A "cache-buster" parameter is can be added to the end of wrapped VAST ad requests (config driven)
  • Finer grain control when disabling the control bar during linear ad playback
  • Support added for a range of new ad tag variables - e.g. "page-url" etc.
  • Several ad server examples added:
    • AdForm - VAST 2 Linear
    • Lightningcast - VAST 1 Linear
    • Adap.tv - VAST 2 Linear
    • Spotxchange - VAST 2 Linear
    • Smartclip - VAST 1 Linear and VAST 2 VPAID Linear
    • Telemetry - VAST 1 and 2 VPAID Linear
    • TidalTV - VAST 2 VPAID Linear
    • Liverail VPAID Linear
    • Eyewonder VPAID Linear
    • Mov.ad VPAID Linear
    • Adotube VAST2 Linear/Non-Linear and VPAID Linear/Non-Linear
  • Show clips can now have the duration forcibly set via a shows "setDurationFromMetaData" config option
  • Completely rewritten logic for setting the show stream based on the meta data - fixes pseudo-streaming control bar issues
  • Media files can be excluded from a VAST response based on mime type
  • Ticket 226 - Critical Timestamp.secondsToTimestamp() fix - was producing invalid timestamp for times greater than 60 mins
  • Support for new Media, Player width/height and AS version based dynamic ad tag variables
  • Added onLinearAdSkipped() Javascript callback method - this is triggered when the user skips an ad via the skip ad button
  • Resolved a parsing issue with international characters in ad notice definitions by replacing the JSwoof JSON parser used in OVA for JW Player 4 & 5 with the standard Adobe parser
  • Ensured that a "allowScriptAccess" param tag is used when a companion SWF is inserted into a page
  • Added support for custom impression tracking using Google Analytics tracking (and default OVA impression tracking)
  • A new set of Javascript callback events supported with VPAID Ads
  • Added support for the direct injection of a VAST Response into OVA via the "ova.vast" flashvar or the "inject" ad server type
  • Added a new configuration option "tagParams" to allow custom parameters to be added to an ad tag at runtime
  • OVA for Flowplayer is now compatible with the Flowplayer BWCheck plugin
  • Cleaned up and extended the Javascript callback API methods - ad object now passed back and some method names changed
  • Added support for Companion <AdParameters> to be passed in to SWF companions

1. Download the Release Candidates

You can download the full release candidate package via the following links:

If you just want the OVA.swf or AS3 framework library file, download via these links:

Finally, the latest release candidate code can be found in the SVN "packages" directory, or the "tags" directory.

2. RC2 Examples

You can find the full set of RC2 examples here:

3. VAST2 wrapper support

Support has been added for the VAST 2 wrapper. For more information on the format of VAST 2 wrappers, refer to the  IAB site.

For an example of the VAST 2 wrapper in action, click  here.

Automatic support for a cache-buster parameter being added to the wrapped ad tag has been provided via the "addCacheBuster" config variable. Set this config option to true to turn on the cache buster parameter.

...
      "server": {
              "type": "direct",
              "addCacheBuster": true,
              "tag": "your-ad-tag-goes-here"
      }
...

4. VPAID support

Support has been added for VPAID 1.1 linear ads. At this time the support has been added to the AS3 framework, OVA for JW4 and OVA for JW5 plugins.

4.1 Enabling VPAID for OVA for JW Player 5

VPAID ads will be played by default by OVA for JW Player 5. No specific configuration is required.

To see an example VPAID linear ad in action (JW5), click  here.

The default behaviour for OVA is to hide the control bar during VPAID Linear Ad playback. This behaviour can be overridden (see below).

4.2 Enabling VPAID for OVA for JW Player 4

For VPAID Linear Ads to work with OVA for JW Player 4, a "holding" clip must be placed in the position of the linear ad within the playlist. A holding clip is a "minimal" image - a single black pixel image file.

OVA automatically places this "holding" clip when it schedules the ads to play.

The holding clip must be hosted on a server of your choice.

The following configuration structure is used to instruct OVA for JW4 as to the location of the holding clip:

{
    "ads": {
        "vpaid": {
              "holdingClipUrl": "http://static.openvideoads.org/ads/blank/blank-pixel.jpg"
        },
        "schedule": [
               .....
        ]
    }
}

To see an example JW4 VPAID linear ad in action, click  here.

4.3 Showing the Control Bar during VPAID Linear Playback

OVA for JW Player 4/5 hides the control bar by default during VPAID Linear Ad playback.

OVA can be instructed to show the control bar during playback via the following configuration:

   ...
      "ads": {
           "vpaid": {
                 "controls": { "hideOnLinearPlayback": false }
           },
           ...

An example can be found  here.

4.4 Instructing OVA to pass a Referrer URL to the VPAID Ads

Sometimes VPAID ads require a "referrer" URL to be passed to them.

To enable this information to be passed, configure OVA as follows:

      ...
          "ads": {
             "vpaid": {
                 "supplyReferrer": true
             },
     ....

An example can be found  here.

4.5 Setting the Maximum Timeout Option

If a VPAID ad has an internal exception that cannot be caught by OVA, a default timer can be set to ensure that OVA will eventually close down the VPAID ad and continue on to the next clip.

The following configuration sets the default timer to 30 seconds. The timer is disabled by default.

   ...
       "ads": {
            "vpaid": {
                  "enableMaxDurationTimeout": true,
                  "maxDurationTimeout": 30
            },
   ...

An example can be found  here.

4.6 Integrating VPAID Into your Custom Player via OVA for AS3

The code shown in this section has been taken from the OVA for JW Player 5 implementation. Please use that implementation as a reference implementation when integrating the OVA VPAID functionality into your custom player.

4.6.1 How OVA Treats VPAID Ads

VPAID ads are delivered to OVA via a VAST response.

A linear VPAID ad is identified within a VAST response via the "apiFramework" attribute on the <MediaFile> tag. For instance:

<MediaFile delivery="progressive" width="300" height="250" type="application/x-shockwave-flash" apiFramework="VPAID">
   <![CDATA[http://chibis.adotube.com/vast/UA.swf?mode=vpaid&adLinear=true&omlSource=http%3A%2F%2Fwww.adotube.com%2Fphp%2Fservices%2Fplayer%2FOMLService.php%3Favpid%3D2ChPxDe%26platform_version%3Das3%26vast_cache_get%3D7-cff0cc9320fa4510824a6b7ee3543ab0%26integration%3Dlongtail&publisher=__domain__&title=ova test&tags=ova&description=video description&videoURL=]]>
</MediaFile> 

Non-linear VPAID ads are identified within the VAST response via the "apiFramework" attribute on the <NonLinear> tag. For instance:

<NonLinear width="300" height="250" apiFramework="VPAID" > 
   <StaticResource creativeType="application/x-shockwave-flash"> 
       <![CDATA[http://chibis.adotube.com/vast/UA.swf?mode=vpaid&omlSource=http%3A%2F%2Fwww.adotube.com%2Fphp%2Fservices%2Fplayer%2FOMLService.php%3Favpid%3DOBpMj3k%26platform_version%3Das3%26vast_cache_get%3D7-54aac9181937ecb5d8ce2ae3c1cd0053&publisher=www.longtailvideo.com&title=The Black Hole&tags=ova,test&description=ova test stream&videoURL=]]> 
   </StaticResource> 
</NonLinear> 

OVA expects to play back a VPAID ad via an overlay on the player rather than through the more standard clip playback mechanisms of the player.

As such, VPAID ads need to be treated differently during playback to the standard linear ad clips.

In principal, OVA does all the work to playback a VPAID ad. The custom player just has to recognise when an ad to be played is a VPAID ad and trigger the OVA VPAID playback functionality accordingly.

4.6.2 The Three Steps to Integration

To implement OVA VPAID functionality within your player, three steps should be taken:

  1. Register the VPAID event handlers
  2. Implement the VPAID event handlers
  3. Implement the clip control logic to ensure that if the active ad to play is a VPAID ad, play it using the OVA "playVPAID" method rather than loading it as a clip into the player

4.6.3 The VPAID Events

Two sets of VPAID events are provided by OVA - those generated by linear VPAID ads, and those generated by non-linear VPAID ads.

The linear VPAID events are as follows:

VPAIDAdDisplayEvent.LINEAR_START - generated when a VPAID ad starts
VPAIDAdDisplayEvent.LINEAR_COMPLETE - generated when a VPAID ad completes
VPAIDAdDisplayEvent.LINEAR_ERROR - generated when a VPAID ad generates an error event
VPAIDAdDisplayEvent.LINEAR_LINEAR_CHANGE - generated when the VPAID ad changes into and out of a "linear" state
VPAIDAdDisplayEvent.LINEAR_EXPANDED_CHANGE - generated when the VPAID ad is minimised/maximised
VPAIDAdDisplayEvent.LINEAR_TIME_CHANGE - generated by the VPAID ad to indicate that the remaining time left has changed

The non-linear VPAID events are as follows:

VPAIDAdDisplayEvent.NON_LINEAR_START - generated when a VPAID ad starts
VPAIDAdDisplayEvent.NON_LINEAR_COMPLETE - generated when a VPAID ad completes
VPAIDAdDisplayEvent.NON_LINEAR_ERROR - generated when a VPAID ad generates an error event
VPAIDAdDisplayEvent.NON_LINEAR_LINEAR_CHANGE  - generated when the VPAID ad changes into and out of a "linear" state
VPAIDAdDisplayEvent.NON_LINEAR_EXPANDED_CHANGE - generated when the VPAID ad is minimised/maximised
VPAIDAdDisplayEvent.NON_LINEAR_TIME_CHANGE - generated by the VPAID ad to indicate that the remaining time left has changed

Typically a full set of event handlers implemented for the type of VPAID ads (linear, non-linear) that you are delivering.

4.6.4 Implementing The VPAID Event Handlers

X

4.6.5 Triggering the Playback of a VPAID Ad

X

4.8 Known Limitations

  • Non-linear VPAID not supported in this RC (due in RC3)
  • Flowplayer VPAID not supported in this RC (due in RC3)
  • An exception in the VPAID ad that does not throw an Error event will hang the player (unless timeout is defined)
  • OVA for JW4 does not fully support configuration of VPAID ad without a stream also being played (play button does not show unless file= defined) - recommend upgrade to OVA for JW5
  • OVA for JW4 does not support "autostart=true" on VPAID pre-rolls - recommend upgrade to OVA for JW5
  • Updates to the timeline on the control bar are not triggered by VPAID ads

5. Configuring the Skip Ad Button

The ability to "skip" on a linear ad has been added along with a set of examples illustrating how to configure OVA to activate the button ( Flowplayer,  JW4,  JW5 examples)

A "skip" button can be enabled as follows:

{
     "ads": {
          "controls": {
               "skipAd": {
                   "enabled": true
               }
          },
          ....
     }
}

5.1 The Standard Skip Ad Button

By default a button with a pre-defined image is used.

To see the standard "skip ad" button in action, click here ( Flowplayer,  JW4,  JW5).

That image can be overridden.

5.2 Using a Custom Image for the Skip Ad Button

To override the standard skip ad button image, use the "image" property and specify the new image "width" and "height":

{
    "ads": {
         "controls": {
                "skipAd": {
                     "enabled": true,
                     "image": "../../images/my-new-skip-button.jpg",
                     "width": 65,
                     "height": 15
                }
        },
        ....
    }
}

An example of an overridden button image can be found here ( Flowplayer,  JW4,  JW5).

5.3 Using Region Attributes with the Skip Ad Button

It is also possible to use the region attributions to declare a skip button - background color, margins, borders and html content can be specified to construct the look of the button.

{
     "ads": {
           "controls": {
                "skipAd": {
                     "enabled": true,
                     "html": "<p>SKIP!</p>",
                     "region": {
                            "id": "my-new-skip-ad-button",
                            "verticalAlign": 3,
                            "horizontalAlign": 3,
                            "backgroundColor": "#FF3300",
                            "opacity": 0.8,
                            "borderRadius": 15,
                            "padding": "0 1 1 13",
                            "width": 60,
                            "height": 20
                     }
                }
           },
           ....
      }
}

An example of a HTML button can be found here ( Flowplayer,  JW4,  JW5)

5.4 Showing the Skip Button on Ads with a minimim duration

It is possible to configure the "skip ad" button so that it only shows on ads that are longer than a specific duration.

For example, the following configuration configures the "skip ad" button to show only on ads that are 10 seconds or longer in duration.

{
     "ads": {
          "controls": {
               "skipAd": {
                   "enabled": true,
                   "minimumAdDuration": 10
               }
          },
          ....
     }
}

If you want to see this option in action, view these examples ( Flowplayer,  JW4,  JW5)

6. Simplified Configuration

In the case of a straight forward pre-roll setup, the OVA configuration approach has been simplified in this release.

When configuring OVA, all that is required now for the minimal pre-roll setup is the ad tag itself.

To declare a pre-roll setup for OVA for JW Player 4/5, use the following flashvars:

flashvars="plugins=ova&ova.tag=put-your-ad-tag-here"

To declare a pre-roll setup for OVA for Flowplayer, use the following Flowplayer configuration:

   ova: {
        url: "ova.swf",
        tag: "put-your-ad-tag-here"
   }

7. Deferred Loading

Using the "delayAdRequestUntilPlay" configuration option it is possible to defer the ad request to an ad server until the play button has been hit.

An example of the deferred loading option in action can be found here ( Flowplayer,  JW4,  JW5)

8. Ad Server Failover

It is possible to specify secondary ad servers to "fail-over" too when the preceding ad server call fails to return a result.

Fail-over server ad tags are specified using the "failoverServers" configuration property. An array of tags may be declared - each will be tried in turn until a result is returned.

This property can be used at an AdSlot or Server declaration level.

"schedule": [
     {
          "zone": "5",
          "position": "post-roll",
          "server": {
                 "type": "OpenX",
                 "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                 "oneAdPerRequest": true,
                 "customProperties" : {
                       "target": "category=food" 
                 },
                 "failoverServers": [
                       {
                            "type": "AdTech",
                            "tag": "http://adserver.adtech.de/?adrawdata/3.0/990.1/2366662/
                                        0/1725/noperf=1;cc=2;header=yes;cookie=yes;adct=204;
                                        alias=;key=key1+key2;;=;grp=[group];misc=__random-number__"
                      }
                 ]
          }
     }
]

An example of the failover option in action can be found here ( Flowplayer,  JW4,  JW5)

9. Always setting the show stream duration from Metadata

The "setDurationFromMetaData" configuration option has been implemented for "show" streams in this release.

"shows": {
     "setDurationFromMetaData": true
}

When the option is set to "true", OVA will forcibly set the duration will always be set according to the metadata duration for the stream. The option is "false" by default.

10. Excluding Ad Media Files based on Mime Type

Two configuration options have been added to the "ads" configuration block to allow media files to be excluded during OVA search to identify relevant linear streams to playback.

The two options are illustrated below.

"ads": {
      "acceptedLinearAdMimeTypes": [ "video/x-flv" ],
      "filterOnLinearAdMimeTypes": true,
      ...
}

In this example, only FLV based ad streams will be selected.

"acceptedLinearAdMimeTypes" is an Array based configuration property. A set of mime types can be configured as per a normal Array based definition. For instance, to limit the filtering to FLV and MP4, the following declaration should be made:

"acceptedLinearAdMimeTypes": [ "video/x-flv", "video/x-mp4"]

By default:

  • In the AS3 framework "filterOnLinearAdMimeTypes" is false
  • In the OVA JW4, JW5 and Flowplayer plugins, "filterOnLinearAdMimeTypes" is true and "acceptedLinearAdMimeTypes" is set to ["video/x-flv","video/x-mp4","application/x-shockwave-flash"]

To turn off the default filtering in the OVA plugins just set "filterOnLinearAdMimeTypes" to false - all "media files" elements of the VAST response will then be searched for a match to playback.

11. New Ad Tag Template Variables

Support has been added for the following new ad tag template variables:

  • media-id
  • media-title
  • media-description
  • media-categories
  • media-keywords
  • media-url
  • page-stream-url
  • partner-id
  • domain
  • allow-vpaid

EXPLAIN EACH HERE

12. Fine Grained Control Over Control Bar Enabling/Disabling

EXPLAIN HERE

13. Replaced JSwoof JSON with Adobe JSON Parser

To resolve a parsing issue with international characters being used in OVA configuration, the OVA for JW4/5 implementations have replaced the JSON parser used. The Adobe parser is now used instead of JSwoof. While the Adobe parser resolves the international character issue, it is less tolerant to erroneous JSON definitions (e.g. cases where additional commas are left etc.). As a result, when deploying RC3 you may notice that your old configuration doesn't work. If that's the case, check for un-necessary commas etc. in your declaration.

14. Tracking Impressions with Google Analytics

EXPLAIN HERE

15. Direct Injection of a VAST Response into OVA via Config

It is now possible to directly inject a VAST response into OVA when configuring the OVA instance.

You can see a few examples of this mechanism in action here ( OVA for JW4,  OVA for JW5,  OVA for Flowplayer).

15.1 OVA for JW4/5 Config File Setup

To pass in a pre-fetched VAST response to OVA when configuring the player via an external config file, use an ad server type of "inject" and place the VAST response data into the "tag" field as follows:

<config>
   <ova.json>
      {
          "ads": {
              "schedule": [
                 {
                    "position": "pre-roll",
                    "server": {
                        "type": "Inject",
                        "tag": "%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22...."
                    }
                 }
              ]
          },

          "debug": {
              "levels": "fatal, config, vast_template, vpaid, playlist",
              "debugger": "firebug"
          }
      }
   </ova.json>
</config>

The VAST response data must be urlencoded when specified in the OVA config file.

15.1 OVA for JW4/5 Flashvars Setup

To pass in a pre-fetched VAST response to OVA when configuring JW Player, use the "ova.vast" flashvar as follows:

var VAST_RESPONSE='<?xml version="1.0" encoding="UTF-8" ?><VAST version="2.0">....';
...
... flashvars="&ova.vast=" + escape(escape(VAST_RESPONSE)) + "&file=OVA_HTTP_SHOW_STREAM_1&duration=30&provider=video" 
...

Notice that the VAST response must be passed into OVA in a double "escaped" (urlencoded) format.

15.2 OVA for JW5 Javascript Embed Setup

The following configuration example illustrates how to configure OVA for JW5 using the Javascript setup method and a pre-fetched VAST response:

<script type="text/javascript">jwplayer("container").setup({
       flashplayer: "/path/to/the/player.swf", 
       file: "http://streaming.openvideoads.org/shows/the-black-hole.mp4",
       plugins: {
           "../../../dist/swf/ova.swf": 
                { 
                  debug: "fatal, config, vast_template, vpaid, http_calls, tracking_events",
                  vast: escape('<?xml version="1.0" encoding="UTF-8" ?><VAST version="2.0">.....</VAST>') 
                }
       },
       height: 300,
       width: 450
});
</script>

To pass in a pre-fetched VAST response, use the "ova.vast" configuration variable. The VAST response string must always be escaped when being passed into OVA.

15.3 OVA for Flowplayer

A VAST response can be directly inserted into the OVA setup via the "tag" variable for the "inject" ad server type:

var VAST_RESPONSE='<?xml version="1.0" encoding="UTF-8" ?><VAST version="2.0">....';

flowplayer("a.example", "../../dist/swf/flowplayer-3.2.3.swf", {
    plugins: {
        controls: {
            autoHide: "always"
        },

        ova: {
            url: "../../dist/swf/ova.swf",

            "ads": {
                "schedule": [
                    {
                       "position": "pre-roll",
                       "server": {
                           "type": "inject",
                           "tag": escape(VAST_RESPONSE)
                       }
                    }
                ]
            }
        }
    }
});

The VAST response must be double escaped when passing into OVA for Flowplayer.

16. Adding Parameters to an Ad Tag at Runtime via "tagParams"

A new configuration option called "tagParams" has been added to allow additional parameters to be added to an Ad Tag URL at runtime. For example, you may want to add "&a=aa&b=bb&c=cc" to an ad tag to dynamically customise it (for example via Javascript) at runtime when OVA is configured.

OVA for JW Player 4 and 5 offer this configuration parameter in the form of a flashvar "ova.tagparams".

The fields to be added to the ad tag are declared using the "ova.tagparams" flashvar as a string that takes the format:

field-name:value,fieldname:value,.....

Below is an example setup using the option as a flashvar:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0" 
  WIDTH="450" HEIGHT="300" id="player">
 <PARAM NAME=movie VALUE="../../../dist/swf/5.4.swf">
 <PARAM NAME=quality VALUE=high>
 <PARAM NAME=bgcolor VALUE=#000000>
 <PARAM NAME=allowfullscreen VALUE="true">
 <PARAM NAME=allowscriptaccess VALUE="always">
 <PARAM NAME=flashvars VALUE="plugins=../../../dist/swf/ova.swf&config=../../config/ad-servers/ova04.xml">
<EMBED
 id="player"
 data="../../../dist/swf/5.4.swf"
 src="../../../dist/swf/5.4.swf"
 width="450"
 height="300"
 allowscriptaccess="always"
 allowfullscreen="true"
 flashvars="plugins=../../../dist/swf/ova.swf&config=../../config/ad-servers/ova04.xml&ova.tagparams=a:aa,b:bb,c:cc"
>
</EMBED>
</OBJECT>

A JW4 example can be found  here.

OVA for JW Player 5 also makes this parameter available via the Javascript embed code. The fields to be added to the ad tag are declared as a string that takes the format:

field-name:value,fieldname:value,.....

An example follows:

<script type="text/javascript">jwplayer("container").setup({
       flashplayer: OVA_PLAYER_2, 
       file: "http://streaming.openvideoads.org/shows/the-black-hole.mp4",
       config: "../../config/ad-servers/ova03.xml",
       plugins: {
           "../../../dist/swf/ova.swf": { 
                debug: "fatal, config, vast_template, vpaid, http_calls, tracking_events",
                tagparams: "a:aa,b:bb,c:cc"
           }
       },
       height: 300,
       width: 450
});
</script>

A JW5 example can be found  here.

This example results in the following parameters being added to the ad tag when it's called:

http://the-ad-tag-is-here&a=aa&b=bb&c=cc

OVA for Flowplayer supports it within the Ad Servers JSON configuration block. For example:

...
    "ads": {
         "pauseOnClickThrough": true,
         "servers": [
             {
                 "type": "OpenX",
                 "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                 "tagParams": {
                      "a": "aa",
                      "b": "bb"
                 }
             }
         ],
...

A Flowplayer example can be found  here.

17. Javascript Callback API

A number of Javascript callback methods have changed in this release.

The following callback methods are now declared for Linear ads:

onLinearAdStart(ad:Object)
onLinearAdStop(ad:Object)
onLinearAdPause(ad:Object)
onLinearAdResume(ad:Object)
onLinearAdFullscreen(ad:Object)
onLinearAdFullscreenExit(ad:Object)
onLinearAdMute(ad:Object)
onLinearAdUnmute(ad:Object)
onLinearAdReplay(ad:Object)
onLinearAdMidPointComplete(ad:Object)
onLinearAdFirstQuartileComplete(ad:Object)
onLinearAdThirdQuartileComplete(ad:Object)
onLinearAdFinish(ad:Object)

Linear Interactive (e.g. "VPAID" linear) ads have the following callbacks declared:

onVPAIDAdStart(ad:Object)
onVPAIDAdComplete(ad:Object)
onVPAIDAdError(ad:Object)
onVPAIDAdExpandedChange(ad:Object)
onVPAIDAdLinearChange(ad:Object)
onVPAIDAdRemainingTimeChange(ad:Object)

The "ad" object passed back takes the following form:

{
   type:String // "linear", "linear-vpaid", "non-linear", "non-linear-vpaid",
   id:String,  
   uid:String,
   inlineAdId:String,  
   adId:String,
   sequenceId:String,
   creativeId:String,
   adSystem:String, 
   adTitle:String,
   description:String,
   survey:String,
   linearAd:Object,
   nonLinearAds:Array,
   companions:Array
   extensions:Array
};

The "linearAd" object takes the following form:

   adId:String,
   id:String,
   uid:String,
   scalable:String,
   maintainAspectRatio:String,
   duration:String,
   mediaFiles:Array

the "mediaFiles" array is an array of MediaFile objects, each taking the form:

   id:String,
   bandwidth:String,
   delivery:String,
   scale:String,
   maintainAspectRatio:String,
   mimeType:String,
   bitRate:String,
   width:String,
   height:String,
   apiFramework:String,
   urlId:String,
   url:String,
   adParameters:String

"nonLinearAds" is an array of non-linear ad objects. Each non-linear ad object has:

{
   id:String,
   adId:String,
   uid:String,
   width:int,
   height:int,
   expandedWidth:int,
   expandedHeight:int,
   resourceType:String,
   creativeType:String,
   apiFramework:String,
   scalable:Boolean,
   maintainAspectRatio:Boolean,
   recommendedMinDuration:int,
   url:String,
   codeblock:String
}

"companions" is an array of companion objects. Each companion object has:

{
   id:String,
   adId:String,
   uid:String,
   divId:String,
   altText:String,
   width:int,
   height:int,
   resourceType:String,
   creativeType:String
   markup:String
}

"extensions" are the VAST extensions that have been provided by the ad server. The field is an array of Objects, with each element being the content of the <extension></extension> tagset in the VAST response- two attributes are declared on the objects in the array - "label" and "text". The "label" is the type declared for the extension and the "text" is the content within the extension tagset.

For example, an extension tagset as follows:

<Extensions>
   <Extension type="LR-Pricing">
      <Price model="CPM" currency="USD">6</Price>
   </Extension>
   <Extension type="SpotX-Count">
      <total_available>9</total_available>
   </Extension>
   <Extension type="Location">
       London
   </Extension>
</Extensions

yields:

ad.extensions[0] == { label: "LR-Pricing", text: "<Price model="CPM" currency="USD">6</Price>" }
ad.extensions[1] == { label: "SpotX-Count", text: "<total_available>9</total_available>" }
ad.extensions[2] == { label: "Location", text: "London" }

18. Support Click Throughs with SWF Companions

If a Companion Ad has either the <AdParameters> and/or a <CompanionClickThrough> declared in the VAST response, the values will be passed through to the SWF as follows:

  • If there is a <CompanionClickThrough> specified, the escaped value (e.g. escape(value)) is passed through as a "clickTAG" flashvar
  • If there are <AdParameters> specified, the value is passed through directly as flashvars
  • If both a specified, the <CompanionClickThrough> is specified first as "clickTag=" followed by "&" plus the value of the <AdParameters>