How to enable autoplay for videos in a custom slideshow section?

arthur_izi_pick
Tourist
8 0 1

Hi,

 

I have developed my own slideshow section, with thumbnails, and I would like to know how to add a code to make the videos included in the slide show in autoplay mode (when the user click on the thumbnail to display the video, it plays directly). 

 

I am not an expert but I think the CSS code for the video is the below:

       {%- for block in section.blocks -%} 
          <div class="column " id="Slide-{{ section.id }}-{{ forloop.index }}">
             {%- if block.settings.image != blank -%}
                 <img class="slide-thumbnail" src="{{ block.settings.image | image_url: width: 85 }}" alt="" onclick="currentSlide({{ forloop.index }})" alt="Caption One" />
    	     {%- else -%}
                <video poster="{{ block.settings.videoimage | image_url }}" class="slide-thumbnail" onclick="currentSlide({{ forloop.index }})" alt="Caption One" >
                  <source src="{{ block.settings.video }}" type="video/mp4"/>
                  <iframe src="{{ block.settings.video }}" allow="autoplay"></iframe>
                </video>
             {%- endif -%}
          </div>      
      {%- endfor -%}

Does anyone know how to make the videos in Autoplay mode?

 

See below the slide show with thumbnails:

arthur_izi_pick_0-1669863572851.png

 

 

Replies 0 (0)