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.
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
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Sticky Video”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Video Source. Set “Type”, “Video URL”, “Video Source — Title”, “Show title overlay”.
- 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
| Control | What the code does |
|---|---|
| Type | Select control; the chosen value is saved on the block. Options: YouTube; Vimeo; Self-Hosted (MP4). block.json default: youtube. Saved as `videoType`. |
| Video URL | Text field in the inspector. Saved as `videoUrl`. |
| Video Source — Title | Text field in the inspector. block.json default: Watch our video. Saved as `title`. |
| Show title overlay | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Subtitle (optional) | Text field in the inspector. Saved as `subtitle`. |
| Autoplay | On/off toggle in the inspector. Off by default. Saved as `autoplay`. |
| Muted | On/off toggle in the inspector. Off by default. Saved as `muted`. |
| Loop | On/off toggle in the inspector. Off by default. Saved as `loop`. |
| Show controls | On/off toggle in the inspector. On by default. Saved as `controls`. |
| Show overlay play button | On/off toggle in the inspector. On by default. Saved as `showOverlayPlay`. |
| Aspect Ratio | Select 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 Radius | Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `borderRadius`. |
| Enable sticky-on-scroll | On/off toggle in the inspector. On by default. Saved as `stickyEnabled`. |
| Only stick when playing | On/off toggle in the inspector. Off by default. Saved as `stickyOnPlay`. |
| Sticky Corner | Select 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 Background | Color control in the inspector. block.json default: rgba(0,0,0,0.35). Saved as `overlayBg`. |
| Overlay Text/Icon | Color control in the inspector. block.json default: #ffffff. Saved as `overlayColor`. |
| Sticky Bar BG | Color control in the inspector. block.json default: #1e293b. Saved as `stickyBg`. |
| Section Background | Color control in the inspector. Saved as `sectionBg`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Video player that minimises into a floating corner player when scrolled past, with close and restore controls — that is the job of Sticky Video, not a generic content block.
- Use it when you need the editor control labeled “Type”, which exists on this block’s inspector.
- It matches pages about video, sticky, floating.
- Inserter grouping: video, animation, and rich media sections.
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
Video Facade
Performance-optimized video thumbnail that loads the actual YouTube or Vimeo player only on click. Eliminates heavy iframes on page load, improving Core Web Vitals. Supports custom thumbnails, overlay text, and animated play buttons.
Background Video
A looping autoplay background video section with overlay and InnerBlocks content — distinct from video players or popups.
Video Grid
Responsive grid of video cards with play-in-lightbox functionality. Supports YouTube, Vimeo, and self-hosted videos. Custom thumbnails, titles, and duration badges.
Video Playlist
A video player paired with a clickable episode/chapter list — perfect for course previews, tutorial series and video podcasts.
Video Popup Button
A stylizable play button that opens a YouTube, Vimeo, or custom video in a modern full-screen popup modal.
Embed / iFrame
Responsive iframe embed for Calendly, Typeform, Google Forms, Airtable, YouTube, Vimeo, or any URL. Full aspect-ratio control and loading options.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Sticky Video from the Gutenberg inserter.