Lightbox height

[button class=“btn-lightbox” href=“image-1.jpg” lightbox_caption=“I am a caption.”]
[lightbox selector=".btn-lightbox"],

i used this code for setting up a video on my website and its taking the whole screen to display the video, is there any option that i can control the width and height of the video.

Hi Grant,

Thanks for writing in! Could you try following this post (https://theme.co/apex/forum/t/video-light-box-button/38255/6?u=mldarshana) and you can add those custom CSS rules into your X -> Theme Options -> CSS area to resize it accordingly.

Hope that helps.

no it didnt, sorry.
but just adding .lightbox-holder will help me to control my video attributes. Do i need a class for the lightbox or is it built-in

[button class="video" style="padding-left: 30px;" type="transparent" shape="pill" size="regular" href="https://www.youtube.com/embed/TVrWEq6u7Wk" title="new video"][icon type="play"]New Video[/button]

[lightbox selector=".video"]

this is my code

Hi Grant,

Instead of using the lightbox and button shortcode, please use the Content Area Modal element. This way you have control over the button and the modal box.

You need to use the Youtube video embed code:

<iframe width="100%" height="315" src="https://www.youtube.com/embed/TVrWEq6u7Wk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Enable the reset on element toggle option so the video stops when the modal is closed.



Hope it helps,
Cheers!

Don’t have that option, so the video is continue playing even after the modal is closed.
By the way thanks for the help, it really worked .

You’re welcome. Glad we’re able to help.

sorry, can you help me to stop the video playing on background even after the modal is closed.

Hey Grant,

Sorry if I missed that also. The option @friech mentioned was released in Pro 2.3.0. I’d recommend that you update to the latest version of Pro.

What that option does is it removes the modal’s content from the document essentially stopping the video from playing for your case.

Hope that helps.

Thank you so much. It really helped.

You’re welcome. Glad it’s resolved now.

after updating the theme, the video is not playing at all, when i click the link its showing like this.

Is that view in the builder or in the front-end? If in the front-end, please try re-saving the page in the builder.

Thanks.

sorry it was my mistake, i didn’t saved it. sorry.
And thanks it works.

No worries. There’s really an issue in the builder where the Dynamic Rendering turns the modal content into base64. I’ve posted this in our issue tracker.

ok let me have a look at it. Thanks!

Sure. Let us know how it goes. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.