Customizing the ad overlay text
This guide explains how to customize the overlay texts during an adbreak, if any. You may ask this question if you want to change the aspect or the content of the overlay displaying the countdown to content on top of the ads.
This is done in two steps: the first is to customize the text, if you so desire. For this we will be leveraging the language localization mechanism. You can find further information on this regard at UIConfiguration.language.
The second step is to change the aspect of such text. This can be done via CSS.
SDKs
Web SDK | Android SDK | iOS SDK | tvOS SDK | Android TV SDK | Chromecast SDK |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | No | N/A |
Changing the text
In this paragraph, we will explain how to modify the text. We will take the countdown to the content text as an example (another ad overlay text is the "Skip ad" text, if any). When considering a new text to replace the original one, it is important to take into consideration its length (which should be determined accordingly to the available space) and how it is composed.
The current example is composed of 3 parts: one text ("The content will play in"), a dynamic countdown and another text ("seconds"). For this reason, when changing the text, both text parts need addressing.
Code examples
Web SDK
ui: {
// your other UI configuration
language: 'en',
languages: { 'en':
{
"The content will play in": "Here your customised text",
"seconds": "Here your customised text"
// any other translation or text change
}
}
}
Legacy Android SDK (4.12.x)
//Example of THEOplayerConfig with language localization enabled
THEOplayerConfig playerConfig = new THEOplayerConfig.Builder()
.cssPaths("style.css")
.jsPaths("script.js")
.ui(new UIConfiguration.Builder().language("nl").build())
.build();
iOS/tvOS SDK and Legacy iOS/tvOS SDK (4.12.x)
//to be added