Public Ticket #3082208
Getting a video to not play on slide appearance


  • Dana Cobb started the conversation

    This does not seem to stop the video or prevent it from starting:

    <asp:Panel ID="pnl_layer_slider" cssclass="row g-0 align-items-center" runat="server">
          <div class="col-12">
            <div id="layerslider" autoPlayVideos="false" autoPauseSlideshow="false" style="width:1280px;height:700px;margin:0 auto;margin-bottom: 0px;">
              <!-- First slide -->           <div class="ls-slide" data-ls="duration:6000;  transition2d: 11; ">
                Slide 2
                <img src="images/guntable_1600x951.png" class="ls-bg" alt="Slide background">
                <p style="font-weight:600;width:700px; font-family:Poppins; font-size:50px; line-height:50px; color:#fff; top:10%; left:0px; white-space:normal;" class="ls-l">
                  ADCO SUPER THUMBS®
                <p style="font-weight:600;width:700px; font-family:Poppins; font-size:36px; line-height:36px; color:#fff; top:17%; left:0px; white-space:normal;" class="ls-l">            
                  Since 1986
                <p style="font-weight:600;width:700px; font-family:Poppins; font-size:24px; line-height:24px; color:#fff; top:25%; left:0px; white-space:normal;" class="ls-l">            
                  So many guns.... so little time
                <p style="font-weight:600;width:700px; font-family:Poppins; font-size:24px; line-height:24px; color:#fff; top:35%; left:0px; white-space:normal;" class="ls-l">            
                  Get a Super Thumb to Load Your Magazines Faster!!
                <p style="font-weight:600;width:700px; font-family:Poppins; font-size:18px; line-height:18px; color:#fff; top:45%; left:0px; white-space:normal;" class="ls-l">            
                  Click on the video to see how they work and get one today!
                  <div style="top:25%; left:75%; " class="ls-l" data-ls="offsetxin: 0; offsetyin: 0; autoPlayVideos">
                    <video src="how-superthumb-works/vedio/st-2-how-it-works.mp4" width="480px" height="320px" controls autostart=0  preload="none"></video>
                  </div>                         </div> </div>

  •  69
    John replied

    Hi Dana,

    Thank you for getting in touch with us. My name is John and I'm happy to assist you today. I appreciate your patience while we've been working towards your ticket.

    You're using attributes and properties like autoPlayVideos incorrectly.

    You can use a global setting to disable autoplay in the slider's init code. The relevant section of the documentation is located under the Slider Setup tab.

    You can also disable autoplay for individual video layers. In this case, you need to use the data-ls attribute on the layer and add the autoplay: false property. The documentation details this under Adding Layers -> Embedding video/audio.

    Best Regards,
    John | Kreatura Dev Team