Content Units
Content unit parameters
These are the settings of each content unit type. You set them in the CMS when you create or edit the unit, and for most types you can override them in the embed code. The names below are keys of the unit’s Widget object: Widget.settings holds the colour (for the OTT traffic driver, the site address) and Widget.options holds everything else.
Switches are stored as "1" (on) and "0" (off). Use the same strings when you override them: they work for every type, while true and 1 don’t work for all of them.
Overriding settings in the embed code
Playlist, Native, Mid-article and Simple: add a
Widgetobject to the$bp()config. It replaces the unit’s CMS settings as a whole, so includesettingsand every option you want; anything you leave out is off or uses its default.Standard lightbox and OTT traffic driver: add a
Widgetobject to the$lb()or$td()config. It is merged with the CMS settings, so include only what you change.Vertical lightbox: only
options.showTitleandoptions.showDescriptioncan be overridden.Reels: settings can’t be overridden; they are set only in the CMS.
A Playlist unit with all its settings in the embed code:
<script type="text/javascript" src="https://player.target-video.com/player/build/targetvideo.min.js"></script>
<div id="TargetVideo_12345678"></div>
<script type="text/javascript">
$bp("TargetVideo_12345678", {
"id": "PLAYER_ID",
"playlist": {"mode": "widget", "id": "CONTENT_UNIT_ID", "widget_type": "playlist_widget"},
"Widget": {
"settings": {
"color": "#ffffff"
},
"options": {
"forceDuration": "1",
"forceTitle": "1",
"forcePlayButton": "0",
"numberOfThumbs": 4,
"logo": {
"url": "https://your-domain.com/logo.png",
"width": 32,
"height": 32,
"position": "top-right",
"title": "Logo"
}
}
}
});
</script>A standard lightbox that changes only how titles are shown:
<script type="text/javascript">
$lb("TargetVideo_12345678", {
"id": "PLAYER_ID",
"Playlist": {"mode": "widget", "id": "CONTENT_UNIT_ID", "widget_type": "lightbox_widget"},
"Widget": {"options": {"forceTitle": "1", "titleOptions": {"position": "outside"}}}
});
</script>Playlist
Parameter | Description |
|---|---|
settings.color | Background colour behind the player and its thumbnails, as a CSS colour. In the CMS: Background color. |
options.forceDuration | Shows each video’s duration on its thumbnail. In the CMS: Video duration. |
options.forceTitle | Shows each video’s title on its thumbnail, on desktop only. In the CMS: Video title. |
options.forcePlayButton | Shows a play button on every thumbnail. In the CMS: Play button. |
options.numberOfThumbs | Number of thumbnails to show. Without it, the number fits the available width. Embed code only. |
options.logo.url | Logo image shown on every thumbnail. In the CMS: Upload Logo. |
options.logo.width, options.logo.height | Logo size in px. Default 32. In the CMS: Size (px). |
options.logo.position | Corner of the thumbnail: |
options.logo.title | Text shown when a viewer hovers over the logo. Default “Logo”. In the CMS: Title. |
Native
Parameter | Description |
|---|---|
settings.color | Background colour of the unit while the text panel is shown. In the CMS: Background color. |
options.position | Side of the text panel: |
options.minWidth | Below this width in px, the text panel is hidden. Default 400. In the CMS: Minimum width (px). |
options.header.title | Header text. The header is shown when a title or a “Powered by” value is set. In the CMS: Title. |
options.header.poweredBy | Shown as “Powered by: …” in the header; an image URL is shown as an image. In the CMS: Powered by. |
options.header.poweredByUrl | Link for the “Powered by” text or image. In the CMS: Powered by URL. |
Mid-article
Parameter | Description |
|---|---|
settings.color | Background colour of the unit when it is at least 500 px wide. In the CMS: Background color. |
options.position | Side of the thumbnail column: |
options.forceDuration | Shows each video’s duration on its thumbnail. In the CMS: Video duration. |
options.forceTitle | Shows each video’s title on its thumbnail, on desktop only, unless the description box shows the title. In the CMS: Video title. |
options.forcePlayButton | Shows a play button on every thumbnail. In the CMS: Play button. |
options.forceThumbs | Keeps the thumbnails on screens narrower than 500 px instead of hiding them. In the CMS: Show thumbnails on small devices. |
options.logo | The same |
options.titleDescriptionAdditions.showTitle | Shows the video title in the description box. In the CMS: Display video title. |
options.titleDescriptionAdditions.showDescription | Shows the video description in the description box. In the CMS: Display video description. |
options.titleDescriptionAdditions.position | Side of the description box: |
options.header | The same |
Simple
Parameter | Description |
|---|---|
settings.color | Background colour of the description panel. In the CMS: Background color. |
options.widget_mobile_position.position | Screen edge the sticky player docks to: |
options.widget_mobile_position.offset | Distance from that edge in px, as a string, e.g. |
options.description_wrapper_position | Side of the description panel: |
options.text_color | Colour of the description title, as a CSS colour. In the CMS: Text color. |
Standard lightbox
Parameter | Description |
|---|---|
settings.color | Background colour of the popup player. In the CMS: Popup background color. |
options.header.title | Header text above the thumbnails. In the CMS: Title. |
options.forceDuration | Shows each video’s duration on its thumbnail. In the CMS: Video duration. |
options.forceTitle | Shows each video’s title on its thumbnail. In the CMS: Video title. |
options.titleOptions.position | Where the title is shown: |
options.titleOptions.color | Title colour, as a CSS colour. Default white. In the CMS: Color. |
options.forcePlayButton | Shows a play button on every thumbnail. In the CMS: Play button. |
options.logo.url | Logo image shown in the header. In the CMS: Upload Logo. |
Vertical lightbox
Parameter | Description |
|---|---|
options.showTitle | Shows the video titles on the cards. In the CMS: Display video title. |
options.showDescription | Shows the video description in the player, with player skins that support it. In the CMS: Display video description. |
The unit’s ad settings, Script ad tag and Frequency, are set in the CMS and can’t be overridden.
OTT traffic driver
Parameter | Description |
|---|---|
settings.ott_url | Address of your OTT site. Each thumbnail links to the video there and opens in a new tab. In the CMS: OTT Url. |
options.header.title | Header text. In the CMS: Title. |
options.forceDuration | Shows each video’s duration on its thumbnail. Only |
options.forceTitle | Shows each video’s title on its thumbnail. Only |
options.forcePlayButton | Shows a play button on every thumbnail. Only |
Reels
Reels settings, such as the feed page address, background, logo, navigation, titles, ads and the thumbnail cards, are set only in the CMS. How each one works is described in the Help Center: https://helpdesk.target-video.com/reels-content-unit