Disable autostart/autoplay HTML5 video tag

How to change autoplay off?

Just a simple javascript will help you to disable autoplay feature of video tag in HTML5

<video src="video.mp4" preload="metadata" controls="controls" id="mediaVideo_007" poster="video-poster.jpg"></video>
<script >
  var vid = document.getElementById("mediaVideo_007");
  vid.volume = 0.50;
  $('#mediaVideo_007').click(function() {
  $('#mediaVideo_007').get(0).play()
});	
</script>
  • Remember to remove autoplay param from video tag
  • Set and unique class id of video
  • Make sure the video file, video url play normally.