Hide video & make a clickable play button icon on header

I would like to add a clickable play button icon in my header. When someone clicks the icon the hidden video starts playing. Either by popping up or that I can resize the video to my preferences.

How do I do?

Thanks!

Topic video-header videos Wordpress

Category Web


You can do by that way.

   <div id="thevideo" style="display:none; padding: 0px;">
        <center>
        <video onclick="this.play();" preload="auto" width="600" height="370">
            <source src="http://edigi.co/Impatto_Branding_Agency-Large.mp4" type="video/mp4"/>
        </video>
        </center>
    </div>
 <script>
$(document).ready(function() {
    $('.custom-th').click(function() {
        $('.custom-th').fadeOut('fast', function() {
            $("#thevideo").css("display","block");
            $("video").click();
            });
        });
    });
</script>

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.