Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html video tag play button overlay

$( document ).ready(function() {
var ctrlVideo = document.getElementById("video"); 
$('button').click(function(){
  if ($('button').hasClass("active")){
    
        ctrlVideo.play();
    
    $('button').html("Pause");
    $('button').toggleClass("active");
  } else {
    
        ctrlVideo.pause();
    
    $('button').html("play");
    $('button').toggleClass("active");
  }
});
});
Source by codeconvey.com #
 
PREVIOUS NEXT
Tagged: #html #video #tag #play #button #overlay
ADD COMMENT
Topic
Name
5+7 =