[Resolved] GenerateBlock Container Video

Home Forums Support [Resolved] GenerateBlock Container Video

Home Forums Support GenerateBlock Container Video

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1358550
    Eaydman

    Hi,
    I want to ask if it is possible to add a background video to the containerblock ?
    If not, what other possibility to I have to add a background video ?

    #1358852
    David
    Staff
    Customer Support

    In the current free version it would require some HTML. Using the same method applied to a page hero:

    https://docs.generatepress.com/article/page-hero-background-video/

    In this case you would add a HTML block inside your Container Block with this markup:

    <video loop muted autoplay poster="URL/TO/poster.jpg" class="background-video">
        <source src="URL/TO/video.mp4" type="video/mp4">
        <source src="URL/TO/video.webm" type="video/webm">
        <source src="URL/TO/video.ogv" type="video/ogv">
    </video>

    Then give the Container Block an Advanced > Additional CSS class of: video-container

    Then add some CSS to your site like this:

    .background-video {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        opacity: 0.5;
    }
    
    .video-container {
        position: relative;
        overflow: hidden;
    }
    
    .background-video-content {
        position: relative;
        z-index: 1;
    }
    
    video[poster] {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    It may require a little tweaking.

    #1358906
    Eaydman

    Thanks for your lovely support mate.
    But I need different videos on my pages. So that setup is not the best well ?

    I have to wait for a pro version maybe ?

    #1359231
    David
    Staff
    Customer Support

    I do believe its on the list for Pro version…

    #1361024
    Eaydman

    Thanks for info

    #1361576
    David
    Staff
    Customer Support

    You’re welcome

    #1404918
    Eaydman

    Any news about the Pro version ? πŸ™‚

    #1405214
    Tom
    Lead Developer
    Lead Developer

    Not yet – getting there πŸ™‚

    #1671684
    Sam

    Did background video make it into the GB Pro version? I’m not seeing it.

    #1671785
    David
    Staff
    Customer Support

    Hi there,

    not yet – its on our roadmap

    #1945027
    Mike

    This code worked for me but it won’t show up on mobile, only desktop. Any ideas on how to fix it? Thanks!

    I do have Generate Blocks Pro, but I didn’t see it there as an option. Is that still in the works?

    #1945272
    Elvin
    Staff
    Customer Support

    Hi Mike,

    Can you open up a new topic?

    Opening a new topic lets you use the private information text field to provide the site details of the site you’re working on. This is so we can inspect the site for you and point you to what can be done with it. πŸ˜€

    #1945569
    Mike

    Thanks Elvin, will do.

    #1946225
    Elvin
    Staff
    Customer Support

    No problem.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.