Web Player

Embed options

Every option on this page goes in the object you pass to $bp(), next to id, width and height. An embed option overrides the player’s CMS settings for that embed only: the player starts from its defaults, applies the player settings from the CMS, then applies the options from the embed code. To change a setting for every embed, change it in the CMS instead. The CMS player settings are described in the Help Center: https://helpdesk.target-video.com/

This page lists options that aren’t covered elsewhere. For common setups, including the sticky player, see Player configuration reference, and its Consent and privacy options section for wait_tcf_api, wait_gpp_api, ima_secure_mode and nonce_ppid. For ad tags (Ad), see Advertisement.

$bp('DIV_ID', {
    id: 'PLAYER_ID',
    width: '640',
    height: '360',
    video: 'VIDEO_ID',
    controlsTimeout: 5000,
    unmute_button: true,
    play_progress_color: '#e50914'
});

Before you start

  • Use real booleans and numbers, such as true, false and 5000. Values aren’t converted, so the strings "0" and "false" turn a feature on.

  • Objects and arrays replace the CMS value; they aren’t merged with it. If you pass inview or close_button_styles, include every property you need.

Controls and interface

Parameter

Description

contextMenu (boolean)

Right-click opens the player’s own menu (Share, Keyboard shortcuts) instead of the browser’s. Default false.

shortcutsEnabled (boolean)

Keyboard shortcuts while the player has focus, on desktop — for example, the arrow keys seek and change the volume. Default true. When contextMenu is on, viewers can turn shortcuts off themselves, and their browser remembers the choice.

controlsTimeout (number)

How long the controls stay visible without activity before they hide, in milliseconds. Default 3000.

titleBar (boolean)

Shows the video title at the top of the player. Default true.

unmute_button (boolean)

Shows an Unmute button when playback starts muted.

play_progress_color (string)

Colour of the progress bar, as a CSS colour, e.g. #e50914.

customPlayButton (string)

URL of an image to use as the large play button.

shareOn (array)

Buttons on the share screen: fb Facebook, tw X (Twitter), wa WhatsApp, rd Reddit, cd embed code, cp copy link, vb Viber, ma email. Players set up in the CMS show all eight; pass a shorter list, e.g. ["fb", "cp"], to limit them. Has no effect when shareScreen is off.

next_video_preview (boolean)

Shows a “Next video” card near the end of a video — 15 seconds before the end, or at two-thirds of a short video — when the playlist has another video. Only on players taller than 260 px. Default true.

Playlist

Parameter

Description

afterPlaylistEnd (string)

What happens after the last video when the playlist plays continuously (playlistPlayback: "continuous"): "loop" starts again from the first video, "stop" stops. The player’s default is "stop"; the CMS player form defaults to "loop".

max_related_videos (number)

Maximum number of related videos added to the playlist.

Advertising

Ad tags are set with Ad (see Advertisement). An Ad value in the embed code replaces the player’s CMS ad schedule.

Parameter

Description

dont_stack_midrolls (boolean)

When a viewer seeks past several midroll cue points, only the last one plays instead of every break in a row.

blockAdPause (boolean)

If an ad pauses without the viewer pausing it, the player resumes it straight away. Viewers can still pause ads themselves.

call_ads_on_click (boolean)

Works with autoplay_on_ad. If the autoplay preroll isn’t filled, autoplay is turned off and the preroll is requested again when the viewer clicks play.

wait_for_ad_inview (boolean)

If the player is out of view when the first ad starts, the ad pauses and resumes once the player is at least 50% visible.

ad_max_bitrate (number)

Maximum recommended ad bitrate in kbps, passed to Google IMA. Has no effect on ads that don’t play through IMA.

vpaid_controls (boolean)

Keeps the control bar visible during VPAID ads. Without it, the control bar is hidden until the ad ends.

autohide_ad_controls (boolean)

Hides the controls during ads after controlsTimeout, as during the video. Set false to keep them visible during ads. Default true.

Sticky player

These options change how the sticky player behaves. They only apply when the sticky player is on (slide_inview: true, with its inview settings). slide_inposition uses none of them.

Parameter

Description

inviewTopOffset_mobile, inviewBottomOffset_mobile, inviewLeftOffset_mobile, inviewRightOffset_mobile (number or string)

Offsets used on phones instead of the desktop inviewTopOffset, inviewBottomOffset, inviewLeftOffset and inviewRightOffset: a number in px, or a percentage string such as "10%". When they aren’t set, phones ignore the desktop offsets and use 5 px (at the top: below a fixed header).

slide_inview_mobile (boolean)

true turns the sticky player off on mobile devices, tablets included.

slide_inview_show (string)

When the close button appears: "ad_start" straight away, "ad_end" after the ad, "custom" after slide_inview_seconds.

slide_inview_seconds (number)

Seconds before the close button appears, with slide_inview_show: "custom". Set both together.

unsticky_btn (string)

Position of the close button: "top-right" (default), "top-left", "top-right-inside" or "top-left-inside".

close_button_styles (object)

Custom close button image and size in px: { image: "IMAGE_URL", width: 20, height: 20 }.

sticky_border_radius (number or string)

Rounded corners for the sticky player: a number in px, or a percentage string such as "10%".

sticky_title_above (boolean)

Shows a bar with the video title above the sticky player. The close button moves to the top right.

stickyWaitsScroll (boolean)

The player only becomes sticky after the viewer has scrolled the page.

boostSticky (boolean)

Delayed autoplay: the player starts muted boostStickyTime seconds after it first comes into view, and goes sticky only once it has been in view and is then scrolled out. If the viewer interacts with the player first, the delayed start is cancelled.

boostStickyTime (number)

Delay for boostSticky, in seconds. Always set it: without it, playback starts straight away.

Sticky bar on mobile

On mobile devices, slide_intop replaces the sticky player with a full-width bar. It also needs slide_inview: true, and on mobile it takes priority over slide_inposition.

Parameter

Description

slide_intop (boolean)

Turns the bar on.

slide_intop_position (string)

"top" (default) or "bottom".

slide_intop_offset (number)

Gap between the bar and the edge of the screen, in px. Pass a number, e.g. 10, not "10px".

slide_intop_title (string)

"below" shows the video title under the video, "right" shows the next video’s title beside it, "normal" shows no title.

Frame

Draws a coloured frame around the player, with an optional title above it and a “Powered by” line below. Every frame option needs frame_show: true; the frame_by_ options also need frame_show_by: true. The frame isn’t drawn in the CMS preview.

Parameter

Description

frame_show (boolean)

Turns the frame on.

frame_width (number)

Frame thickness in px. Default 5; 0 removes the frame background.

frame_color (string)

Frame colour, as a CSS colour.

frame_text_color (string)

Colour of the title and the “Powered by” text.

frame_title (string)

Title shown above the player. HTML is allowed.

frame_title_font_size (number)

Title size in px. Default 20.

frame_title_text_align (string)

"left", "center" or "right".

frame_font_family (string)

Font for the frame text, as a CSS font-family.

frame_show_by (boolean)

Adds a “Powered by” link with a logo below the player.

frame_by_text (string)

Link text. Default Powered by.

frame_by_link (string)

Link address. It opens in a new tab.

frame_by_image_src (string)

Logo image URL, shown at up to 78 × 16 px.

frame_by_font_size (number)

Link text size in px. Default 9.

Embed options · TargetVideo Developer Docs