About ad insertion

The PSDK advertising workflow has three phases, and information about ad placement comes from two possible sources.

PSDK ad insertion includes ad resolving for VOD, live streaming, and linear streaming, along with ad tracking and ad playback. The PSDK makes the required requests to the ad server, receives information about ads for the specified content, and places the ads into the content.

The PSDK groups ads into ad breaks, each of which contains one or more ads that play in sequence. The PSDK inserts ads into the main content as members of an ad break.

The PSDK process for placing ads within ad breaks into your main content has three phases:
  • Opportunity detection: The PSDK uses stream information to detect possible and desired locations for ads.

  • Ad resolution: The PSDK communicates with an advertisement server to retrieve the ads to splice into the content.

  • Ad placement: The PSDK loads the specified ads and places them in ad breaks on the content timeline at the specified locations and recomputes the virtual timeline if needed.

The PSDK can obtain the possible locations for ad placement in two ways:
  • Use manifest metadata/cues

    This is common for live/linear streams. The PSDK is responsible for detecting such metadata/cues, extracting the necessary information from them, and communicating with an advertising server to obtain the corresponding ads.

    The PSDK usually splices in the resolved ads by replacing main content at the location indicated by the metadata/cues; otherwise, the client would drop further and further behind the actual live point.

  • Use advertising server map

    This is common for video-on-demand (VOD) streams. Usually, metadata about these streams are registered into the advertising server before playback. The PSDK retrieves the ad timeline and corresponding ads from the server. The PSDK usually splices the resolved ads by insertion into the main content as indicated by the server map.

By default, the PSDK uses manifest cues for live/linear streams and advertising server maps for VOD streams. However, to support full-event replay for live events, your application must take extra steps.