Media · Gutenberg

Sticky Video block for WordPress

Video player that minimises into a floating corner player when scrolled past, with close and restore controls.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Video player that minimises into a floating corner player when scrolled past, with close and restore controls.

Inspector panels on this block: Video Source, Playback Options, Player Layout, Sticky / PiP Behaviour. Those titles come from index.js, not from a shared template.

Behavior controls: “Type” options: YouTube, Vimeo, Self-Hosted (MP4); “Aspect Ratio” options: 16:9 (Widescreen), 4:3 (Classic), 1:1 (Square), 9:16 (Portrait), 21:9 (Ultrawide); “Sticky Corner” options: Bottom Right, Bottom Left, Top Right, Top Left.

Where to find it

Gutenberg inserter → Media → search “Sticky Video” (block name `blockenberg/sticky-video` in block.json). Style it in the sidebar after insert.

How to use Sticky Video block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Sticky Video”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Video Source. Set “Type”, “Video URL”, “Video Source — Title”, “Show title overlay”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
TypeSelect control; the chosen value is saved on the block. Options: YouTube; Vimeo; Self-Hosted (MP4). block.json default: youtube. Saved as `videoType`.
Video URLText field in the inspector. Saved as `videoUrl`.
Video Source — TitleText field in the inspector. block.json default: Watch our video. Saved as `title`.
Show title overlayOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Subtitle (optional)Text field in the inspector. Saved as `subtitle`.
AutoplayOn/off toggle in the inspector. Off by default. Saved as `autoplay`.
MutedOn/off toggle in the inspector. Off by default. Saved as `muted`.
LoopOn/off toggle in the inspector. Off by default. Saved as `loop`.
Show controlsOn/off toggle in the inspector. On by default. Saved as `controls`.
Show overlay play buttonOn/off toggle in the inspector. On by default. Saved as `showOverlayPlay`.
Aspect RatioSelect control; the chosen value is saved on the block. Options: 16:9 (Widescreen); 4:3 (Classic); 1:1 (Square); 9:16 (Portrait); 21:9 (Ultrawide). block.json default: 16:9. Saved as `aspectRatio`.
Border RadiusNumeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `borderRadius`.
Enable sticky-on-scrollOn/off toggle in the inspector. On by default. Saved as `stickyEnabled`.
Only stick when playingOn/off toggle in the inspector. Off by default. Saved as `stickyOnPlay`.
Sticky CornerSelect control; the chosen value is saved on the block. Options: Bottom Right; Bottom Left; Top Right; Top Left. block.json default: bottom-right. Saved as `stickyCorner`.
Sticky Width (px)Numeric range control in the inspector. Range 200–500. block.json default: 320. Saved as `stickyWidth`.
Edge Offset (px)Numeric range control in the inspector. Range 8–80. block.json default: 24. Saved as `stickyOffset`.
Sticky Radius (px)Numeric range control in the inspector. Range 0–30. block.json default: 12. Saved as `stickyRadius`.
Overlay BackgroundColor control in the inspector. block.json default: rgba(0,0,0,0.35). Saved as `overlayBg`.
Overlay Text/IconColor control in the inspector. block.json default: #ffffff. Saved as `overlayColor`.
Sticky Bar BGColor control in the inspector. block.json default: #1e293b. Saved as `stickyBg`.
Section BackgroundColor control in the inspector. Saved as `sectionBg`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Sticky Video block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Sticky Video”. It sits under Media. After insert, open Video Source and set “Type”, “Video URL”, “Video Source — Title”, “Show title overlay”.

Where do Sticky Video submissions go?

The published page calls this block’s Blockenberg REST route (see front-end notes). The editor canvas does not send mail unless you preview on the front end.

Is the Sticky Video Gutenberg block free?

Yes. Sticky Video ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Sticky Video to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Video Source, Playback Options, Player Layout, Sticky / PiP Behaviour).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Sticky Video from the Gutenberg inserter.

Get Blockenberg