Video Lightbox

A play button, image card, text link or Animated Button that opens a YouTube, Vimeo or self-hosted video in a lightbox. Nothing from the video site loads before the click.

Video Lightbox puts a trigger on the page that opens a video in the theme's lightbox: a round play button, an image card, a text link or an Animated Button. It plays YouTube (Shorts too), Vimeo (unlisted videos too), other sites WordPress can embed, and video files from your Media Library. Nothing from the video site loads until a visitor clicks.

An image card with a play button, a title and a duration chip, next to a solid play button with text, a ring play button, a text link with a play icon and an Animated Button with a play icon

Add it

In WPBakery, click Add Element and pick Video Lightbox from the Highend Shortcodes category, then paste a video link in Video. Or use the shortcode. See Shortcode.

The Video Lightbox settings panel: the Video field with a Media Library button, Player Address, Start At, Video Proportions, Title, Duration and Gallery Group

When the video can't be played (an empty or unknown link), visitors see nothing, and logged-in editors see a short note in its place.

Settings

VideoTextvideo

A YouTube or Vimeo link (unlisted Vimeo links too), another link WordPress can embed, such as Dailymotion, TikTok or VideoPress, or an MP4 or WebM file. Click Media Library to pick a video you uploaded. See Video sources.

Player AddressTextembed

Optional, for players WordPress can't embed, such as Wistia or Loom: the address from their embed code (the iframe's src), starting with https://. Used instead of Video. See Player Address.

Start AtTextstart

Optional. Starts the video at this time, for example 1:30, 90 or 1m30s. Works with YouTube, Vimeo, Dailymotion and video files. A t= time in a YouTube or Vimeo link works too.

Video ProportionsSelectDefault: Automaticratio

The shape of the player. Options: Automatic, Wide (16:9), Vertical (9:16), Standard (4:3), Square, Cinema (21:9). Automatic uses the video's own: 9:16 for YouTube Shorts and TikTok.

TitleTexttitle

Names the video for screen readers, and shows on the image card and under the video in the lightbox.

DurationTextduration

Optional, for example 2:14. Shown with every trigger except the Animated button.

Gallery GroupTextgroup

Optional. Videos and images with the same group name open together, with arrows to browse them. Image Frames join with the same Gallery REL attribute.

Trigger tab

TriggerSelectDefault: Play buttontrigger

What visitors click to play the video. Options: Play button, Image card, Text link, Animated button (set up in the Button tab).

ImageImageimage

The image of the image card. It also shows while the video loads, and as its thumbnail when it opens with other items.

TextTextDefault: Watch the videolabel

Next to the play button, or the text of the link or button. Leave empty for a play button on its own. Not shown for the image card.

Text PositionSelectDefault: Right of the buttonlabel_position

Options: Right of the button, Below the button. The duration goes under the text. Only shown for the play button.

Play Button StyleSelectDefault: Automaticbutton_style

Options: Automatic, Solid, Light, Glass, Ring with a slow pulse. Automatic is Solid, and Glass on an image card. Light and Glass suit photos. Colors adjust to what is behind the button, so the icon stays readable. Only shown for the play button and the image card.

Play Button SizeSelectDefault: Medium (64px)size

Options: Small (48px), Medium (64px), Large (88px), Extra large (112px). Only shown for the play button and the image card.

ColorColorcolor

The Solid fill, the Ring, the Light style's icon, the Glass tint, or the link. Leave empty for the accent color (the text color for Ring and the link). Not shown for the Animated button.

Icon ColorColoricon_color

Leave empty for white or near black, whichever reads better. Only shown for the play button and the image card.

MagneticCheckboxmagnetic

The button leans toward the mouse when it comes close. Not on touch screens or with reduced motion. Only shown for the play button.

Image ProportionsSelectDefault: Wide (16:9)card_ratio

Options: Wide (16:9), Landscape (3:2), Standard (4:3), Square, Portrait (4:5), Vertical (9:16), Cinema (21:9), Original. Only shown for the image card.

Play Button PositionSelectDefault: Centerplay_position

Options: Center, Bottom left, Bottom right. Only shown for the image card.

Follow the CursorCheckboxfollow

Over the image, the play button follows the mouse and becomes the pointer. Not on touch screens or with reduced motion. Only shown for the image card.

OverlaySelectDefault: Automaticoverlay

Options: Automatic, Gradient at the bottom, Dim the whole image, None. Automatic adds a gradient under the title, and nothing without one. Only shown for the image card.

Overlay ColorColoroverlay_color

The color of the gradient or dim. Leave empty for black. Not shown when Overlay is None.

Hover EffectSelectDefault: Slow zoomhover

Options: Slow zoom, Lift, None. Only shown for the image card.

Border RadiusTextDefault: 16radius

In pixels. Only shown for the image card.

Corner ShapeSelectDefault: Roundcorner_shape

How the rounded corners are drawn. Options: Round, Squircle, Soft squircle, Bevel (cut corners), Scoop (inward curve), Notch (inward square). Browsers without corner shape support show normal rounded corners. Only shown for the image card.

Show Title and DurationCheckboxDefault: Yescaption

Shows the Title and Duration from the General tab on the image. On small cards the duration hides and the title gets smaller. Only shown for the image card.

Play IconCheckboxDefault: Yesplay_icon

A small play icon before the button text. Only shown for the Animated button.

AlignmentSelectDefault: Leftalign

Options: Left, Center, Right. Not shown for the image card, which fills its column.

Button tab

The Animated Button's own settings (style, size, arrow, colors, typography and the rest), used when Trigger is Animated button. Its text comes from Text in the Trigger tab, and the button opens the video instead of a link.

Common settings

Video Lightbox also has a CSS box in the Design Options tab, Entrance Animation and Entrance Delay in the Animation tab, and an Extra class name field in the Advanced tab. See the Elements overview.

Video sources

SourceExampleNotes
YouTubehttps://www.youtube.com/watch?v=…, https://youtu.be/…, https://www.youtube.com/shorts/…Live and embed links work too. Plays from youtube-nocookie.com, YouTube's privacy-enhanced mode. Shorts open in 9:16.
Vimeohttps://vimeo.com/123456789, https://vimeo.com/123456789/abc123def4Unlisted videos keep their hash. Plays with Vimeo's Do Not Track.
Other sitesDailymotion, TikTok, VideoPress and any other provider WordPress can embedYour site asks the provider for the player address once and remembers it for a month. TikTok opens in 9:16.
Video files.mp4, .m4v, .webm, .ogv, .movPick one with Media Library or paste its address. Plays in the browser's own player, with the card's Image as the poster.

Videos start playing as soon as the lightbox opens, with sound where the browser allows it and muted otherwise.

Player Address

For players WordPress can't embed, paste the address of their player (the src of the iframe in their embed code) in Player Address. It's used instead of Video. Players on these sites work on any page, whoever wrote it:

HostThe address must start with
www.youtube-nocookie.com, www.youtube.com, youtube.com/embed/
player.vimeo.com/video/
www.tiktok.com/player/
geo.dailymotion.com/player
www.dailymotion.com/embed/
fast.wistia.net, fast.wistia.com/embed/
www.loom.com/embed/
video.wordpress.com, videopress.com/embed/
streamable.com/e/
player.mux.com/
iframe.mediadelivery.net (Bunny Stream)/embed/
Any subdomain of cloudflarestream.com/
play.vidyard.com/
player.twitch.tv/
archive.org/embed/
embed.ted.com/talks/

The address must start with https://, without a port number or a user name.

A player address on any other site only works when the page's author can post unfiltered HTML (by default, administrators and editors on a single site, and only super admins on a multisite network), the same rule WordPress uses for raw iframes. Such a page opens in a sandboxed frame, which can't navigate your page, open windows or send forms. Otherwise the element shows nothing to visitors.

Add a video host

Developers can add a player to the list with the highend_lightbox_embed_hosts filter. Keys are host names (*.example.com matches any subdomain, but not example.com itself) and values are the path the address must start with:

add_filter( 'highend_lightbox_embed_hosts', function ( $hosts ) {
	$hosts['player.example.com'] = '/embed/';
	return $hosts;
} );

The lightbox's script checks the same list. See Filter hooks for the related filters.

Privacy

Nothing from YouTube, Vimeo or any other video site loads before a visitor clicks: the trigger is a plain link with your own image or button, and the player is only added when the lightbox opens. It's removed again when the visitor closes the lightbox or moves to another item. YouTube videos play from youtube-nocookie.com, and Vimeo videos with Do Not Track.

Shortcode

[hb_video_lightbox video="https://www.youtube.com/watch?v=aqz-KE-bpKQ" trigger="image" image="123" title="Our story" duration="2:14"]

image takes an attachment ID. Animated Button settings take a btn_ prefix, for example btn_style="outline" and btn_arrow="circle".

Works with the Lightbox module off

The Video Lightbox element always opens the theme's lightbox, even when the Lightbox switch in Highend Modules is off for a lightbox plugin.

On this page