Welcome to Help center

We are here to help

Video player: Youtube

Follow

video-youtube.png

HTML for placeholder:

            <div class="youtube-overlay">
                <img src="assets/images/btn-youtube.png" alt="btn-youtube">
            </div>
    

 

HTML for player:

            <iframe id="iframeYoutube"
                src="https://www.youtube.com/embed/IM-yYn6i_58"
                allowfullscreen>
            </iframe>
        

 

Js

    var iframeVideo = document.getElementById("iframeVideo");
    if (iframeVideo) {
       document.querySelector(".video-overlay").onclick = function () {
          this.style.display = "none";
          iframeVideo.setAttribute('src',
             'https://player.vimeo.com/video/10260175?title=0&byline=0&portrait=0?rel=0&autoplay=1');
       };
    }
Top
Powered by Zendesk