Introduction
A bumper is typically a very short video (10 secs or less) automatically inserted before any pre-roll ads and your content. A bumper is not used for monetization but instead relays information such as your company logo or branding.
Here is an example of a bumper video playing before the main content.
Requirements
The following requirements are needed for this feature:
Brightcove SDK version
- Native SDK for Android 9.0.0 and newer (
BumperComponent, in the ExoPlayer module) - Native SDK for iOS 6.11.0 and newer
Functionality
Here are some details about Bumper videos:
- Bumpers are compatible with both Client-Side Advertising (CSAI) and Server-Side Advertising (SSAI)
- Bumpers play before any pre-roll ads and your content
- The player is configurable during bumper video playback:
- Show/hide the player controls
- Prevent seeking during playback
- Change the seekbar color to indicate a bumper
- Analytics data will be tracked the same as for any content video
Configuration
A bumper video can be set for the player or for an individual video.
Player-level bumper
By default, bumper videos are a player-level feature. This means that all videos in a player will have the same bumper.
A bumper consists of a single Video Cloud video, referenced by either:
- Video ID
- Reference ID
Video-level bumper
To assign a bumper to a video, you can define a custom field in Video Cloud Studio. The custom field must have the following:
- Custom field name of
bumper_id - Custom field value must be a valid video ID
Android Implementation
A player requests a bumper from the Playback API like any other video and inserts it before ads and content.
There are two ways to configure a player to play a bumper video:
-
Bumper ID
The bumper ID is the video ID or reference ID of the video to play before other content.
// Building the instance of the bumper component, providing the existing video view and catalog. bumperComponent = new BumperComponent.Builder(brightcoveVideoView, catalog).build(); bumperComponent.setVideoBumperID("Bumper ID"); // Initializing the bumper. bumperComponent.init(); -
Custom Fields
The
bumper_idfield can be defined in Custom Fields in Video Cloud Studio. It must contain a valid video ID or reference ID. The AndroidBumperComponentdoes not read the custom field itself: read the field from the video properties and pass its value tosetVideoBumperID().// Building the instance of the bumper component, providing the existing video view and catalog. bumperComponent = new BumperComponent.Builder(brightcoveVideoView, catalog).build(); // Obtaining the bumper ID from the video custom fields. Map<String, Object> customFields = (Map<String, Object>) mVideo.getProperties().get(Video.Fields.CUSTOM_FIELDS); if (customFields != null && customFields.containsKey("bumper_id")) { bumperComponent.setVideoBumperID((String) customFields.get("bumper_id")); } // Initializing the bumper. bumperComponent.init();
You can access the video view for the bumper to modify it as any other video view by using:
bumperComponent.getBumperVideoView();
For a complete example, see the Android BumperSampleApp (a Kotlin version is also available).
iOS Implementation
The Native SDK for iOS/tvOS supports bumper video playback.
For details, see the following: