×
Menu

Schedule VAST / IMA / VPAID ads at your desired time

This demo showcases the Bitmovin Player’s ad insertion capabilities. The player can be used with different advertising standards, namely VAST, VPAID, IMA and VMAP.

Simply schedule your ads at different times of the video by choosing an advertisement standard and providing the link to the ad tag in the text area. Use the “schedule ads” button to insert the ad, and the “reset configuration” button to clear previous scheduled ads.

This demo has a pre-roll ad scheduled by default. If you do not want to see these ads, reset the configuration before playing the video.

Schedule an ad during playback

Use the Bitmovin Player's API to schedule ads during playback:

let adType = document.getElementById('adType').value;
let manifestUrl = document.getElementById('ad-server-url').value;
let schedule = document.getElementById('schedule-list').value;

player.scheduleAd(manifestUrl, adType, {
  'timeOffset': schedule,
  'pertistant': true,
  'adMessage': 'scheduledAd'
});

Setup an ad via the config

Use the advertising section of the configuration to schedule ads at the desired positions. This example will play an ad before the actual video will start.

var conf = {
  key: '<YOUR PLAYER KEY>',
  source: {
    dash: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
    hls: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
    progressive: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',
    poster: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/poster.jpg'
  },
  advertising: {
    client: 'vpaid',
    schedule: {
      'pre-roll-ad': {
        offset: 'pre',
        tag: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/32573358/skippable_ad_unit&' +
        'impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]' +
        '&description_url=[description_url]&correlator=[timestamp]'
      }
    }
  }
};

Create an account to get started!

No credit card required.