Server-guided ad insertion (SGAI)

PRESTOplay for Web Apps supports server-guided ads in the form of HLS interstitials and DASH alternative MPD events in modern browsers.

Review Server-guided ad insertion first for the shared concepts.

Note

Support for smart TVs is coming soon.

Configuration

Both features are enabled by default. To disable them, set enable to false:

const player = new clpp.Player("video", {
  ads: {
    hls: { enable: false },
    dash: { enable: false },
  },
});

HLS interstitials

HLS interstitials are supported since 6.19.0. To enable them on Safari, set preferNativeHlsOnSafari to false (see Using the MSE player for HLS):

const player = new clpp.Player("video", {
  streaming: {
    preferNativeHlsOnSafari: false,
  },
});

Playback session ID

To give decisioning servers useful context, you can enable playback session identification:

const player = new clpp.Player("video", {
  mse: {
    sendPlaybackSessionIdHeader: true,
  },
});

With this in place, the player sends the X-Playback-Session-Id HTTP header with every HTTP request related to primary playback, and the _HLS_primary_id query parameter containing the same value with every interstitial request.

Note

For this to work, your primary content server must allow the HTTP header X-Playback-Session-Id in Access-Control-Allow-Headers.

DASH alternative MPD events

DASH alternative MPD events are supported since 6.37.0.

Next topic: Analytics
Previous topic: FreeWheel (beta)