Okay
  Public Ticket #3018892
Editing video controls
Closed

Comments

  •  16
    Josée started the conversation

    Hi!

    I was wondering if it possible to control the way a video plays in background  of a row. In the normal editing  tool, there are no controls for de loop. I want the video to play juste once. Do I need to change something in the child theme? Or css?

    Thanks for your help.

  •  8,839
    Tahir replied

    Hey Again,

    You're going to need to copy the vc_row.php file into your child theme for overriding it and then modify this section: (around line 670)

    echo '<video class="nectar-video-bg" width="1800" height="700" preload="auto" loop="" autoplay="" muted="" playsinline="">';
    if(!empty($video_webm)) { echo '<source src="'. esc_url( $video_webm ) .'" type="video/webm">'; }
    if(!empty($video_mp4)) { echo '<source src="'. esc_url( $video_mp4 ) .'" type="video/mp4">'; }
    if(!empty($video_ogv)) { echo '<source src="'. esc_url( $video_ogv ) .'" type="video/ogg">'; }
    echo '</video>';
    

    to be this instead:

    echo '<video class="nectar-video-bg" width="1800" height="700" preload="auto" autoplay="" muted="" playsinline="">';
    if(!empty($video_webm)) { echo '<source src="'. esc_url( $video_webm ) .'" type="video/webm">'; }
    if(!empty($video_mp4)) { echo '<source src="'. esc_url( $video_mp4 ) .'" type="video/mp4">'; }
    if(!empty($video_ogv)) { echo '<source src="'. esc_url( $video_ogv ) .'" type="video/ogg">'; }
    echo '</video>';
    

    Salient element overrides

    Salient allows for easy overriding of Salient WPBakery element template files through a child theme.

    • Step 1. Copy the desired template file from the salient-core plugin template directory (wp-content/plugins/salient-core/includes/vc_templates)
    • Step 2. Create a folder in the root of your child theme called “vc_templates” (salient-child/vc_templates)
    • Step 3. Paste the desired template file(s) inside that directory. Any template files found in that directory will be loaded instead of the default salient-core file.

    Thanks 



    ThemeNectar Support Team 

  •  16
    Josée replied

    Thanks Tahir. It worked! Have a nice day!