Type alias VastMacro

VastMacro: string

From VAST specification:

Sometimes ad servers would like to collect metadata from the video player when tracking event URIs are accessed. For example, the position of the video player playhead at the time a tracking event URI is accessed is useful to the ad server and is data that can only be known at the time of the prescribed tracking event. This data cannot be built into the URI at the time the VAST response is built and served.

The following macros enable the video player to provide certain details to the ad server at the time tracking URIs are accessed.

  • [ERRORCODE]: replaced with one of the error codes listed in section 2.3.6.3 when the associated error occurs; reserved for error tracking URIs.
  • [CONTENTPLAYHEAD]: replaced with the current time offset “HH:MM:SS.mmm” of the video content.
  • [CACHEBUSTING]: replaced with a random 8-digit number.
  • [ASSETURI]: replaced with the URI of the ad asset being played.
  • [TIMESTAMP]: the date and time at which the URI using this macro is accessed. Used where ever a time stamp is needed, the macro is replaced with the date and time using the formatting conventions of ISO 8601. However, ISO 8601 does not provide a convention for adding milliseconds. To add milliseconds, use the convention .mmm at the end of the time provided and before any time zone indicator. For example, January 17, 2016 at 8:15:07 and 127 milliseconds, Eastern Time would be formatted as follows: 2016-01-17T8:15:07.127-05 When replacing macros, the video player must correctly percent-encode any characters as defined by RFC 3986. VAST doesn’t provide any guidance on URI format, but using the [CACHEBUSTING] macro simplifies trafficking, enabling ad servers to easily search and replace the appropriate macro for cache busting.

Generated using TypeDoc