How to integrate Pulse ad delivery with Chromecast using VMAP.


Note: We are using the Google Cast SDK to handle all the logic around the integration, so any potential bug fixes or feature requests are entirely dependent on Google.
To build a Cast app, you need:
  • A sender application: written for the Android, iOS, or Chrome platform, where you display the Cast button and user controls.
  • A receiver application (such as our sample CAF Receiver Application): an HTML5/Java Script application that you host on your own servers and that runs on the receiver device. The receiver application provides an interface to display the app's content on the TV and handles the communication between the sender app (mobile or desktop) and the receiver device (such as a Chromecast).
For more information, see Google Cast SDK.

You can use our sample Cast Application Framework (CAF) Receiver Application, based on Google's CAF Receiver API and support of the IAB VMAP standard, to create your own receiver application that can provide the ads metadata and request VMAP ads from Pulse to be served on a Chromecast device.

Whenever the CAF Receiver Application loads the video, meaning you start casting, you have the opportunity to insert ad break information by providing a VMAP request URL with all the parameters that define the characteristics and filters for the ads in the VMAP ticket.

The sample application contains a URL builder helper script and the code to customize the receiver application by intercepting messages and handling events.
Note: If you are not using our URL builder helper script, you need to pass in the pf parameter accordingly.

Supported features and protocols

The following ad formats are supported when integrating Pulse ad delivery with Chromecast using VMAP:
  • standard and RTB linear ads (pre-, mid-, and post-rolls),
  • standard third-party ads (pre-, mid-, and post-rolls),
  • and sponsor ads.

The supported VMAP protocol is 1.0.


The following limitations apply when integrating Pulse ad delivery with Chromecast using VMAP:
  • Ad selection logic for VMAP requests filters out goals containing unsupported ad formats, like pause ads, even if the goal contains an ad that matches the request's criteria.
  • The Google Cast SDK does not support overlay ads, so even though Pulse can return overlays in the VMAP response, the Google Cast SDK is unable to parse that and fails to load the ad.

Known issues

The following issues are found when integrating using the Google Cast SDK:

  • There is an issue with tracking where no events are tracked for the first ad in an ad break when that ad is paused as soon as it starts playing, and then resumed after approximately 8 to 10 seconds.
  • The Google Cast SDK is unable to parse the VMAP response if any of the ad breaks are empty. When the VMAP ticket contains one or more valid ads but only tracking information for the rest of the ads, the response is discarded, no ads are shown, and you get the following message: Unable to parse the VMAP response. The workaround for this is to always have a filler ad for pre-, mid-, and post-roll ad breaks so there are no empty ad breaks.

Location and tutorial

The repository is located on GitHub: Cast Application Framework (CAF) Receiver Application. This location contains:
  • a sample CAF Receiver Application, including a CSS file to style various UI elements,
  • VMAP request URL builder helper script,
  • Pulse VMAP parameters documentation,
  • information on how to build the project,
  • a tutorial on how to get started with the integration,
  • and information on how to test, debug, and publish the CAF Receiver Application.