hi,
i have a video and i created custom controls for this video.
i want to show custom controls,when mouse is over then hide controls,when mouse is out.
i wrote some code for this but it makes this even once.the second and more hovers,controls remains hidden.
here is my code:
function initializePlayer()
{
control=document.getElementById("controls");
control.addEventListener("mouseover",hoverVideo,false);
}
window.onload=initializePlayer;
function hoverVideo(e)
{
control.style.visibility="visible";
control.addEventListener("mouseout",hideVideo,false);
}
function hideVideo(e)
{
e.preventDefault();
control.style.visibility="hidden";
}
how can i solve this problem?