Skip to main content

Setup

AdvertisingThird-party SDK

This guide explains how to setup SmartLib to work with advertising mechanics, such as:

  • Ad insertion / replacement (SSAI)
  • Ad tracking (CSAT)
  • Ad metrics (reporting to Analytics)
  • Third-party SDK integration (PAL SDK, OM SDK)
  • Ad-aware UI/UX adaptation (lock seekbar, hide controls, show ad progress...)

Ads can be of 2 types:

  • In-band, or in-stream, which mean they are signalled in the stream and therefore are requested before starting playback
  • Out-of-band, or on-the-fly, which mean they are not signalled in the stream but can be requested on demand after starting playback

Before continuing, make sure the following requirements are fulfilled:

Requirements

Activate advertising

For all cases, activateAdvertising() must be called after createStreamingSession() but before getURL().

session = SmartLib.getInstance().createStreamingSession();
...
session.activateAdvertising();
...
session.getURL();

Then depending on the use case, follow the appropriate guide: