Skip to main content

Standard video ad units

Dejacast Player supports video ads in VPAID, VAST and VMAP formats.

The standard video ads include the following types:

  • Pre-roll ads, displayed before the video content starts;
  • Mid-roll ads, displayed in the middle of the video content, at the specified time or percentage of the video duration;
  • Post-roll ads, displayed after the video content ends;
  • Overlay ads, displayed on top of the video content

Your ad server's VAST response must contain IAB compliant tracking events and standard event types, like impressions. The player will automatically track these events and clicks and report them to your ad server.

Using Dejacast Dashboard​

  • Step 1: Login using your account credentials into Dejacast Dashboard, that can be accessed at app.dejacast.com
  • Step 2: Navigate to Settings > Players and choose the player you want to configure. Make sure Allow advertising is enabled
  • Step 3: On the Edit Player page, use the top navigation bar to go to Advertising, then turn on Enable VOD Ads. Configure the ad break settings for Pre-roll, Mid-roll, or Post-roll as needed. For each mid-roll break, set the Ad Break Time.
    • VOD Ads and In-article MultiAd can't be used together: when one is enabled on a player, the other is disabled.
    • You can add one or multiple VAST URLs for every ad break type.
    • If multiple URLs will be input for an ad break type, the player will request ads from every URL and will create an ad pod of multiple ads if more than one URL will respond with a valid ad.
    • You can use the same VAST URL or different URLs for the different ad break types.
  • Step 4: Click Save Ads. You will now be able to start seeing ads delivered within the video content embedded using this player.

Using front-end script​

The Video Player Embed Script exposes an invokePlayer function that allows you to initialize the video player and specify VAST URLs for pre-roll, mid-roll, and post-roll advertisements.

Usage:

  • Make sure the player allows advertising, according to Step 2 above
  • Call the invokePlayer function when the embed script onload event fires
    <script id="my_embed"
    src="https://app.dejacast.com/player/YOUR_PLAYER_SLUG/vYOUR_VIDEO_UUID.js">
    </script>
    <script>
    document.getElementById('my_embed').onload = function() {
    invokePlayer('preroll_url', 'midroll_url', 'postroll_url','div_container_id','cust_params');
    };
    </script>

Parameters:​

  • preroll_url (string): The URL of the VAST ad for the pre-roll. Pass null if no pre-roll ad is available.
  • midroll_url (string, optional, default:null): The URL of the VAST ad for the mid-roll. Pass null if no mid-roll ad is available.
  • postroll_url (string, optional, default:null): The URL of the VAST ad for the post-roll. Pass null if no post-roll ad is available.
  • div_container_id (string, optional, default:null): The id of the div where the player is required to be injected
  • cust_params (string, optional, default:null): Targeting params. A string containing an urlencoded object of the key-values used for targeting