On This Page

Implementing Server-Side Ads with the Native Player SDKs

In this topic, you will learn how to play Server-Side ads with the Brightcove Native Player SDKs, from videos ingested for Dynamic Delivery.

Overview

Server-Side Ad Insertion (SSAI) allows you to embed ads into your videos so that they can't be blocked by ad blockers in the browser. Dynamic Delivery is the next generation ingest and delivery system which reduces your storage footprint and dynamically packages media. Learn more about using Dynamic Delivery for your videos.

SSAI works with both DRM and non-DRM content.

Notes:

To use SSAI, your Video Cloud account needs to be configured for Dynamic Delivery and enabled for SSAI. Contact your account manager to start using this feature.

Call the catalog service to retrieve your video along with your ad configuration from the Playback API. Start video playback with your specified ads.

catalog.findVideoByID(videoId, null, parameters, new VideoListener() {
@Override
public void onVideo(Video video) {
try {
// The OnceUX plugin will look for a VMAP URL in the video object properties.
// If valid, it will play the video.
plugin.processVideo(video);
} catch (NoSourceFoundException e) {
// If NoSourceFoundException is thrown it means a suitable VMAP URL was not found.
// You can try to play it on a regular view,
brightcoveVideoView.add(video);
}
}
});

iOS implementation

Follow these steps within your app to get your ad configuration and play your video:

Include the Once UX plugin in your app, as shown in the Basic Once UX Player sample. This will be the starting point for your app. Notice that the storyboard contains the definitions for the videoContainerView and the companionSlotContainerView.