Video Autoplay Sliders & Poster Images

1 reply·opened Jun 17, 2020
P
pardthemonsterJun 17, 2020

With Google’s advice on “First Contentful Paint” and thus removal of transitions by default, there is now more noticeable lag on video autoplay sliders (example below). Is there any way to get the poster="images/videos/explore-poster.jpg" to show while videos are loading?

<div class="video-wrap">
	<video id="slide-video" poster="images/videos/explore-poster.jpg" preload="auto" loop autoplay muted>
		<source src='images/videos/explore.webm' type='video/webm' />
		<source src='images/videos/explore.mp4' type='video/mp4' />
	</video>
	<div class="video-overlay" style="background-color: rgba(0,0,0,0.55);"></div>
</div>
S
SemiColonWebSTAFFJun 17, 2020

Hello,

This is not readily available as the Video is hidden while it is getting resized to avoid jumps. However, we have tested the following code and it appears to be working fine:

<div class="swiper-slide dark">
&#x9;<div class="container">
&#x9;&#x9;<div class="slider-caption slider-caption-center">
&#x9;&#x9;&#x9;<h2 data-animate="fadeInUp">Beautifully Flexible</h2>
&#x9;&#x9;&#x9;<p class="d-none d-sm-block" data-animate="fadeInUp" data-delay="200">Looks beautiful &amp; ultra-sharp on Retina Screen Displays. Powerful Layout with Responsive functionality that can be adapted to any screen size.</p>
&#x9;&#x9;</div>
&#x9;</div>
&#x9;<div class="swiper-slide-bg" style="background-image: url(&apos;images/videos/explore-poster.jpg&apos;);"></div>
&#x9;<div class="video-wrap">
&#x9;&#x9;<video id="slide-video" poster="images/videos/explore-poster.jpg" preload="auto" loop autoplay muted>
&#x9;&#x9;&#x9;<source src=&apos;images/videos/explore.webm&apos; type=&apos;video/webm&apos; />
&#x9;&#x9;&#x9;<source src=&apos;images/videos/explore.mp4&apos; type=&apos;video/mp4&apos; />
&#x9;&#x9;</video>
&#x9;&#x9;<div class="video-overlay" style="background-color: rgba(0,0,0,0.55);"></div>
&#x9;</div>
</div>

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard