Skip to main content

Sticky Video Feature

You can add a pretty rad "sticky" functionality (aka Picture in Picture functionality) to your Vidalytics videos.

What this will do is make your videos "pop out" and stick to the corner of your page as you scroll down in it.

Check out this Codepen for the sample code and to see it in action!

https://codepen.io/vidalytics/pen/bGjoMxB

To make it super clear, you have to:

  • Add your video's embed code between the "start of embed code" and "end of embed code" comments in the HTML section of the Codepen
  • Wrap the JS functions (the code in the JS section of the Codepen) in a <script> tag.
  • Wrap CSS code (the code in the CSS section of the Codepen) in a <style> tag

If something does not work, then review all elements corresponding to the embed code placeholder and check their CSS position and z-index settings. It would also be good to check for console errors to debug ;)