Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1324813

    I need to have 7 self-hosted MP4 videos on a Homepage.

    I have the first video playing in the background of the Color Section layout, which makes it full-screen and that’s ok for the hero section. But for the remaining videos added throughout the Homepage, they need to be smaller like 1/2 the page since they will be placed adjacent to relevant text.

    Is there an option to add a background video without having it displayed full-width?

    I know there’s a video element option but that won’t work because I need these videos (which are actually 3D renders of moving cars and people) to play automatically, without allowing the user to play/pause them. So unless there’s some tips there, I may need to use another theme (which I don’t want to do).

    Thanks in advance.

    #1325321

    Hey WebDevDept,
    Thank you for your patience, as I understand your situation you would like to have some 1/2 column background videos with text blocks next to them like in a checkerboard pattern, tested using a grid row element with text on one side and a code block on the other with an html code for a background video.
    This is the backend view:
    2021-10-17_001.jpg
    this is the frontend view:
    2021-10-17_002.jpg
    the html is based on this codepen, and if you are using the Avia Layout Builder Debugger you can add my test page to your site to examine with this shortcode:

    [av_heading heading='Below a grid row element is used' tag='h3' style='' subheading_active='' show_icon='' icon='ue800' font='entypo-fontello' size='' av-medium-font-size-title='' av-small-font-size-title='' av-mini-font-size-title='' subheading_size='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' icon_size='' av-medium-font-size-1='' av-small-font-size-1='' av-mini-font-size-1='' color='' custom_font='' subheading_color='' seperator_color='' icon_color='' margin='' margin_sync='true' padding='10' icon_padding='10' headline_padding='' headline_padding_sync='true' link='' link_target='' id='' custom_class='' template_class='' av_uid='av-kuvig2gc' sc_version='1.0' admin_preview_bg=''][/av_heading]
    
    [av_layout_row border='' min_height_percent='' min_height_pc='25' min_height='0' color='main_color' mobile='av-flex-cells' mobile_breaking='' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' id='' custom_class='' template_class='' aria_label='' av_element_hidden_in_editor='0' av_uid='av-5o6ocv' sc_version='1.0']
    [av_cell_one_half av_uid='av-4at75r']
    
    [av_textblock size='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' font_color='' color='' id='' custom_class='' template_class='' av_uid='av-kuvihovt' sc_version='1.0' admin_preview_bg='']
    This is 1/2 of the grid row, the other half has a background video.
    [/av_textblock]
    
    [/av_cell_one_half][av_cell_one_half vertical_align='top' padding='0px' padding_sync='true' background='bg_color' background_color='' background_gradient_color1='' background_gradient_color2='' background_gradient_direction='vertical' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' link='' linktarget='' link_hover='' mobile_display='' custom_class='' template_class='' av_uid='av-2ohsgf' sc_version='1.0']
    
    [av_codeblock wrapper_element='' wrapper_element_attributes='' codeblock_type='' alb_description='' id='' custom_class='' template_class='' av_uid='av-kuvijbtf' sc_version='1.0']
    <style>
    /* video background */
    #background-video {
      height: 100%;
      width: 100%;
      object-fit: cover;
      z-index: -1;
    }
    
    /* page content */
    p.text {
      color: #fff;
      font-weight: bold;
      text-align: center;
    font-size:2em;
    }
    span.text {
        top: 30vh;
        position: absolute;
        z-index: 5;
        left: 30%;
        width: 50%;
    }
    
    @media (max-width: 750px) {
        #background-video { display: none; }
        body {
          background: url("https://assets.codepen.io/6093409/river.jpg") no-repeat;
          background-size: cover;
        }
    }
    </style>
    <video id="background-video" autoplay loop muted poster="https://assets.codepen.io/6093409/river.jpg">
      <source src="https://assets.codepen.io/6093409/river.mp4" type="video/mp4">
    </video>
    <span class="text">
    <p class="text">THIS IS A RIVER.</p>
    <p class="text">How majestic.</p>
    </span>
    [/av_codeblock]
    
    [/av_cell_one_half]
    [/av_layout_row]
    
    

    Hopefully this helps.

    Best regards,
    Mike

    #1325478

    Absolutely beautiful Mike! Your code works well for me so now I can get back to work.

    I appreciate your time, thank you!

    #1325482

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Background video options outside Color Section layout?’ is closed to new replies.