sinanisler logo

Play or Pause Toggle on Disabled Video Controls

when video controls are disable it plays automatically but if you don’t want that you want to click play and keep the controls hidden anyway with this method you can play or pause videos with native .js


window.onload = function() {
    document.querySelectorAll(".case-video").forEach(function(video) {
        video.addEventListener('click', function() {
            this.paused ? : this.pause();


Leave the first comment