I found this script here on the site. it serves to give play and pause in Html 5 videos.
But it seems to have an error, the click and pause effect only works if you have 1 video on the page, if you have 2 videos the effect only happens on the first, the second video is necessary to play on the native button of the player that is a little below. Someone would know it, so that the effect happens in all the videos you have on the page?
Video 01
<video id="videoID" preload="metadata" controls="controls" width="100%" height="100%">
<source src="http://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.mp4"type="video/mp4" />
<source src="http://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.mp4"type="video/mp4" /></video>
Video 02
<video id="videoID" preload="metadata" controls="controls" width="100%" height="100%">
<source src="http://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.mp4"type="video/mp4" />
<source src="http://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.mp4"type="video/mp4" /></video>
--------------------
Script
--------------------------------
<script>
var v = document.getElementById('videoID');
v.addEventListener(
'play',
function() {
v.play();
},
false);
videoID.oncontextmenu = function(){ return false; };
v.onclick = function() {
if (v.paused) {
v.play();
v.controls=true;
} else {
v.pause();
v.controls="";
}
};
</script>