bux23
10/10/2016 - 9:37 AM

HTML video play on click - crossbrowser

HTML video play on click - crossbrowser

jQuery("video").click(function (e) {
    if(e.offsetY < (jQuery(this).height() - 36)) // Check to see if controls where clicked
    {
        if(this.paused)
            this.play();
        else
            this.pause();
    }
});