Created
June 26, 2023 14:07
-
-
Save johnmccole/b105c180ff56fb75c31c8f84bd308aa2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// User clicks to play | |
<video playsinline controls preload disablePictureInPicture poster="" controlslist="nodownload" style="cursor: pointer;"> | |
<source src=" type="video/mp4"> | |
</video> | |
// Autoplay | |
<video id="backgroundVideo" class="parallax-video" autoplay="autoplay" playsinline muted loop preload disablePictureInPicture controlslist="nodownload"> | |
<source src="" type="video/mp4"> | |
</video> | |
<script> | |
var bgVideo = document.getElementById('backgroundVideo'); | |
bgVideo.muted = true; | |
bgVideo.play(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment