Ad Integration

Configuration

Parameter
Type
Default
Description

ads

Boolean | object

false

This parameter is controled through the Settings on our AdManager Module. Alternatively you can also add Tags directly. Please see documentation blow.

Using AdTags URLs

Alternatively you can also add your AdTags directly to the Player configuration, see the following example. Here you can find some test tags from Google: https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/tagsarrow-up-right.

<script>
const player = new js3q({
    playoutId: '95ea8442-c3aa-43a3-bfdd-c93f35c6242a',
    ads: {
        preroll: "your ad tag url",
        midroll: "your ad tag url",
        postroll: "your ad tag url",
        adpoints: "360,720,1140,1500,1710"
    }
});
</script>

Parameter adpoints (Midrolls)

Ad-Cue points define fixed moments during content playback where midroll ads may be shown.

  • Seeking or fast-forwarding does not skip ads. If a viewer jumps past one or more ad cue points, the player will still trigger a midroll ad.

  • No ad stacking after seeking. When multiple cue points are skipped in a single seek action, only one midroll ad is played.

  • Normal playback behavior. During regular playback, midroll ads are triggered automatically when a cue point is reached.

  • Rewinding content. When a viewer seeks backward, upcoming cue points become active again and may trigger ads when reached.

This ensures fair ad delivery while keeping the viewing experience smooth and predictable.

AdEvents

You can create EventListeners for all AdEvents, please have a look here: Events.

Macros

We have integrated the Google IMA SDK and also a custom VAST Adapter. You can utilize the following macros to customize your AdTag URL. The macros are replaced automatically when calling the Ad.

  • {random}: A random number to ensure URL uniqueness.

  • {referrer}: URL-encoded referrer of the current page.

  • {consentString}: User's consent string.

  • {loggedin}: Boolean indicating if the user is logged in.

Example

Smartclip Integration

If you are using Smartclip, we are automatically replacing and inserting the parameters consent and optout.

Last updated