0
People need to insert a video into my HTML after 5 seconds using Javascript, before 5 seconds the video is not displayed. I even put the video on the page using Javascript but tried to use the Settimeout function but without Exito. Can you give me tips on how to get the expected result ? Below follows 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>