

The upper part of the plugin settings page (General Settings).
Create a seamless and engaging viewing experience with KU Sticky Video for YouTube. This lightweight plugin automatically turns your YouTube embeds into a floating video (a sticky video in picture in picture style) that follows the reader as they browse your content.
When a user scrolls past a playing video, the player smoothly glides to the corner of the page so they can keep watching. This prevents interruptions, keeping users engaged with your content while they read.
Whether you want to implement youtube scroll tracking or a simple floating video widget, this plugin delivers high performance with zero configuration needed.
The following plugins have been tested and confirmed to work seamlessly alongside this plugin:
The “EmbedPlus for YouTube” plugin uses a unique architecture with custom initialization wrappers and dynamic lazy-loading. Because of these modifications, standard player tracking scripts cannot automatically capture its state change events.
To enable the sticky video effect for videos embedded via EmbedPlus, add the following PHP code snippet to your theme’s functions.php file (preferably in a child theme):
add_action( 'wp_enqueue_scripts', function() {
wp_add_inline_script(
'ku-sticky-video-for-youtube',
"
if ( window.wp && window.wp.hooks ) {
window.wp.hooks.addFilter(
'ku_sticky_video_for_youtube_get_existing_player',
'ku-sticky-video-compat-embedplus',
function( player, iframe ) {
if ( ! player && window._EPYT_ && window._EPYT_.apiVideos && iframe.id ) {
return window._EPYT_.apiVideos[ iframe.id ] || null;
}
return player;
}
);
}
if ( window._EPADashboard_ && ! window._EPADashboard_.__ku_sticky_hooked ) {
window._EPADashboard_.__ku_sticky_hooked = true;
const originalOnStateChange = window._EPADashboard_.onPlayerStateChange;
window._EPADashboard_.onPlayerStateChange = function( event ) {
if ( typeof originalOnStateChange === 'function' ) {
originalOnStateChange.apply( this, arguments );
}
if ( window.kuStickyVideoForYouTube && event.target ) {
let iframe = null;
try {
iframe = event.target.getIframe();
} catch(e) {}
if ( ! iframe && event.target.f ) {
iframe = event.target.f;
}
if ( iframe ) {
window.kuStickyVideoForYouTube.handleStateChange( event, iframe );
}
}
};
}
",
'before'
);
}, 20 );
Need more control? KU Sticky Video for YouTube Pro adds a suite of advanced options for power users and professional sites.
š View Pro details and pricing | Try the live demo