Have you seen on Facebook that when you click on a video from the computer and continue scrolling the video is superimposed in a side corner and so you can continue watching the video while browsing?
Well, you can achieve this in a very simple way using a plugin without the need to know anything about code. The plugin we are going to use is called ‘Lazy load videos and sticky control‘ is free and you will find it in the WordPress repository.
The free version of the plugin only works with Youtube videos but the author of the plugin sells a PRO version for HTML5 videos and Vimeo videos.
Features
Lazy load videos and sticky control improves page load times as it only loads the preview image of YouTube videos when the user scrolls and the video appears in the viewport. It also provides the option to pin videos to make your video stick to the side (top/bottom/left/right) of the window if the user scrolls the content.
You don’t need to configure anything, just choose the video position from the plugin settings window. You also have an editor to add custom CSS in case you need to tweak the video position or give it a custom style.
Supports multiple videos on a single page. Plays only one video at a time, i.e. the video will pause if you play another video. Still video scrolls down or up if you move away from the video.
How does it work?
Add this shortcode to your content with the YouTube video ID.
[lazy-load-videos-and-sticky-control id="Youtube-video-ID"]
You have to replace what is between the quotes with the ID of the video. Example:
[lazy-load-videos-and-sticky-control id="uAWMvcyI_Ps"]
From the plugin settings you have a manual/guide where it explains the whole process.
Leave a Reply