Open a Vimeo video in a lightbox on page load

Product:

WonderPlugin Lightbox

Question:

I am trying to find a wordpress plugin that will allow me to have my Vimeo video pop up in a lightbox once the home page loads - automatically. Does your plugin do this?

Answer:

You can try our plugin WonderPlugin Lightbox.

You can view the following page for how to do it: https://www.wonderplugin.com/wordpress-lightbox/pop-up-a-vimeo-video-in-a-lightbox-on-page-load/

How to add a poster image for HTML5 video lightbox?

Product:

WonderPlugin Lightbox

Question:

I wonder how can I add a poster image for HTML5 video lightbox?

Answer:

The HTML5 poster image feature is available in WonderPlugin Lightbox version 4.0 and above. If you are using an old version, please upgrade your plugin first.

In the plugin, Lightbox Options menu, there is an option "Video poster image (absolute URL)", you can use the option to specify a poster image for all HTML5 videos.

Or you can use a data tag data-html5videoposter to specify a poster image for the lightbox link, for example:

Video Lightbox

The HTML code is as following:

<a href="https://www.wonderplugin.com/wp-content/plugins/wonderplugin-lightbox/images/demo-video0.mp4" class="wplightbox" data-webm="https://www.wonderplugin.com/wp-content/plugins/wonderplugin-lightbox/images/demo-video0.webm" data-html5videoposter="https://www.wonderplugin.com/wp-content/uploads/2014/03/gallery.jpg">Video Lightbox</a>

Hide Lightbox Navigation Arrows

Question:

Hi there,

Is there any code I can use within the script when calling a lightbox to disable the navigation arrows?

As Lightbox cannot auto detect connection speed of the computer accessing my site, I have created a lightbox with a gallery on it underneath that’s a bit of a workaround. When a thumbnail (play video) image is clicked on in my page, lightbox launches with an image. I have made a gallery that displays under the image to either stream HD content, SD content or Low Res content. Works great, but the navigation arrows appear when you hover over the video. I just want to remove these on the video light boxes, but not on the photo ones I have running elsewhere on the site, so I’m not looking for a universal code, just something in the script that calls the lightbox like “navarrows=false” or something like that.

Is that possible?

Many thanks for the help!

Answer:

If you want to hide the arrows on specific pages, you can add the following CSS code to these pages:

<style type="text/css">
#html5-prev {
  display: none !important;
}
#html5-next {
  display: none !important;
}
</style>

How to open video Lightbox on page load

Question:

Support,

I am looking for a solution for displaying a vimeo video in a lightbox that launches with the page load. I am looking at purchasing your commercial version. Is the auto launch feature available or is there additional code I could pay you to develop to accomplish this?

Answer:

You can do it with WonderPlugin Lightbox Plugin.

You can add the following JavaScript code to your page or post:

<script type="text/javascript">
	jQuery("document").ready(function(){   
            setTimeout(function() { 
                if (wonderpluginLightbox)
                    wonderpluginLightbox.showLightbox(4, 'https://player.vimeo.com/video/1084537', 'Big Buck Bunny by Blender Foundation');
            }, 3000);
	});
</script>
<a class="wplightbox"></a>

You can view the demo page: https://www.wonderplugin.com/wordpress-lightbox/open-video-lightbox-on-page-load/

Here is the definition of the function showLightbox:

function showLightbox(type, href, title, width, height, webm, ogg, thumbnail, description);

Here is the definition of the function argument type:

0: image, 1: Flash SWF, 2: MP4 video, 3: YouTube video, 4: Vimeo video; 5: PDF, 7: Webpage

So if you want to open a YouTube video, you can change the line to:

wonderpluginLightbox.showLightbox(3, 'https://www.youtube.com/embed/j32YM7UvvGk', 'WordPress Carousel Plugin');

Only showing up once

To prevent the lightbox popup from appearing in the current web browser session for the second time, you can use the following code:

<script type="text/javascript">
    jQuery("document").ready(function(){  

            var is_popped = false;
            var cookies = document.cookie ? document.cookie.split(';') : [];
            for (var i in cookies)
            {
                var parts = $.trim(cookies[i]).split('=');
                if (parts.length && parts[0] == 'wplightboxpopup')
                {
                    is_popped = true;
                    break;
                }
            }

            if (is_popped)
              return;
            
            setTimeout(function() {
                if (wonderpluginLightbox)
                {
                    wonderpluginLightbox.showLightbox(4, 'https://player.vimeo.com/video/1084537', 'Big Buck Bunny by Blender Foundation');
                    document.cookie = 'wplightboxpopup=1;path=/';
                }
            }, 3000);
    });
</script>
<a class="wplightbox"></a>