Load next page after html5 video finishes
HTML
<p>Nhấn nút Play và chờ Video kết thúc</p>
<video id="myVideo" controls width="550" height="300">
<source src="http://grochtdreis.de/fuer-jsfiddle/video/sintel_trailer-480.mp4" type="video/mp4" />
</video>
<div>
<br/>
<b>Kế tiếp: <font color="red"><span id="timer"></span></font> <font color="blue">Thành phố ngàn cây</font></b>
</div>
<script>
var aud = document.getElementById("myVideo");
aud.onended = function() {
setTimeout(function(){ window.location.href = ['http://timvn.blogspot.com/2015/04/thanh-pho-ngan-cay.html']}, 16000);
var hou = 0;
var sec = 15;
setInterval(function(){
var a = new Date();
document.getElementById("timer").innerHTML = hou +" : " + sec ;
sec--;
if(sec == 00)
{
hou--;
sec = 15;
if (hou == 0)
{
hou = 0;
}
}
},1000);
}
function resetTimer()
{
};
</script>