VAST integration

VAST (Video Ad Serving Template) standardize the communication requirements between video players and the ad servers.

How it works:

  • Player makes an ad request to VAST compliant ad server using an ad tag.
  • Ad Server returns XML response with available videos.
  • Player chooses supported video asset and starts playback.

An ad tag is a simple HTTP(S) based URL that typically appears as follows:

http[s]://api.virool.com/vast/[site_key]?[vastQuery]

site_key - site key

Mobile-compatible VAST (MP4 Media File)

For campaigns created after May, 15, 2015 we have special VAST containing 480p version of video. We are converting videos from 720p to 240p (for mobile devices) and to 480p for desktop devices. Video links look like:

Inside HTML5 VAST we serve 480p video for better quality. Our HTML5 VAST tag supports all parameters supported by our Desktop VAST tag except the width & height parameters. The example link for html5 VAST:

http://api.virool.com/html5vast/44fe67f?cid=187220

VAST Query

Param Type Details
cid
(optional)
Number Specific campaign ID. Campaign selected automatically when parameter omitted.
width
(optional)
Number Widget width in pixels. (default: 640)
height
(optional)
Number Widget height in pixels. (default: 360)
min_reward
(optional)
Number, cents Offers only videos with reward greater than specified.
userId
(optional)
String 12341
gender
(optional)
String male, female
dob
(optional)
String YYYY-MM-DD (e.g. 1987-10-25)

In the ad response, the ad server returns a VAST data structure which is a XML template that denotes media files and any event pixels.

Example

https://api.virool.com/vast/1869e2b?cid=21782&width=640&height=400

VPAID

VPAID compliant SWF player. Please keep in mind that this player is supposed to be integrated via VPAID specification and could not be tested with direct link as its content loads on certain VPAID event. It's highly recommended to use alternative integration methods unless you fully understand how VPAID works.

http://api.virool.com/swf/vpaid.swf?site_key=[site_key]&cid=[campaign_id]
Param Type Details
site_key String Site key
campaign_id
(optional)
Number Specific campaign ID. Campaign selected automatically when parameter omitted. Aware not running campaign. It's highly recommended to skip this parameter.

Example

http://api.virool.com/swf/vpaid.swf?siteKey=2387e59&cid=94686

NOTE: It doesn't work on mobile devices due their lack of flash plugin.