The basics for using SmartVideo in a lightbox, pop-up, or fancybox on WordPress
There are two suggested ways to get SmartVideo working inside a lightbox.
1. Use a WordPress Media Library video and let SmartVideo auto-convert it (easiest method)
2. Do a little magic with HTML and use a SmartVideo tag (advanced method)
Option 1: Auto-convert a WordPress Media Library video
Most lightbox/fancybox plugins for WordPress allow you to use a video from YouTube, Vimeo, or a publicly hosted URL ending with a video file format (e.g. “.mp4”).
Some video popup plugins will allow SmartVideo to auto-convert a YouTube video, but most will not allow SmartVideo to convert a Vimeo video.
Because of this, we recommend using a video that is stored in your WordPress Media Library
SmartVideo will see your YouTube or Vimeo video within the lightbox and auto-convert it.
If you want to use a video stored in your WordPress Media Library, make sure this setting is toggled on in the SmartVideo plugin:
Option 2: Use a SmartVideo tag by messing with HTML
If you’re comfortable editing some HTML, you can get a SmartVideo tag working in a lightbox. You’ll need Fancybox on your site (here’s a WordPress plugin that makes it easy).
<a href="#video" data-fancybox="images"> <img width="360px" src="https://www.mywebsite/my-video-source.png"> </a> <div style="display:none;"> <smartvideo src="https://www.mywebsite/my-video-source.mp4" width="640" height="360" controls autoplay id="video"></smartvideo> </div>
This should result in a lightbox that looks like this:
If you have any questions or need some assistance, let us know!