nk-o / jarallax

Parallax scrolling for modern browsers

Home Page:https://jarallax.nkdev.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

videoPlayOnlyVisible

gcooke75 opened this issue · comments

Video still loading when visible even when videoPlayOnlyVisible: false

Version used:

v2.0.2

Code to reproduce the issue (HTML blocks + JavaScript initialization)

<div class="jarallax" data-jarallax data-video-src="https://www.youtube.com/watch?v=5rPmsdGPGFU">
      <div class="container"> 
		<div class="row h-100">
			    <div class="col-12 text-center">
					 <h2>Early Works</h2>
			   </div>
		</div>
	</div>
</div>
 jarallax(document.querySelectorAll('.jarallax'), {
speed: 0.2,
videoPlayOnlyVisible: false,
videoLazyLoading: false
});

Video background is always playing automatically. The option videoPlayOnlyVisible allows you to play video only in case, the section is in the viewport. If it is false, the video will be always playing.