<html>
<head>
<style>
</style>
<script>
$(document).ready(function(){
playVid();
$('#NextBut').hide();
$('#PrevBut').hide();
});
</script>
</head>
<body>
<video width="600" onended="myFunction()" id="myVideo">
<source src="DubImages/Malaysia ad.mp4" type="video/mp4">
</video>
<script>
var vid = document.getElementById("myVideo");
function playVid() {
vid.play();
}
function myFunction() {
setInterval(function(){ NextPage(true); }, 1000);
setInterval(function(){ $('#NextBut').show(); }, 1000);
}
</script>
</body>
</html>
This code working in a desktop browser but in mobile, it's not working, please help. playVid() I am calling once document load complete cross checks my code is correct or wrong. the function is not working.