Personal I need to insert a video into my HTML after 5 seconds using JavaScript, before 5 seconds the video is not displayed. I got to put the video on the page using Javascript but tried to use the SetTimeOut function but without success. Can you give me tips on how to get the expected result? Below is my partial code.
HTML
< video id="newvideo" autoplay style="position: absolute; width: 480px;height: 270px; z-index: 2; top: 37px;left: 800px;cursor: pointer;">
</video>
Javascript
<script>
var video = document.getElementById("newvideo");
video.src="video-maxi.mp4";
video.onmouseover=function(){
video.volume=1;
console.log('mouseover')
} / Ativar som com MouseOver
video.onmouseout=function(){
video.volume=0;
console.log('mouseout');
} / Desativar som MouseOut
</script>