Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
trying to remove controls when I hover over video

I'm trying to remove my controls on my video to not show at all so that the video just plays on loop like a GIF without the controls ever displaying. Any suggestions P.s. please ignore the StackOverflow error when running snippet. thank you.

function hideControls() {
    document.getElementById('text');
    video.removeAttribute("controls");
    }
video {
    display:inline-block;
    margin: 25px;
    width: 280px;
    height: 280px;
    background-color: rgba(255, 255, 255, 0);
    box-shadow: 0px 7px 8px  10px rgba(0, 255, 255, 0.328);
    
}
video:hover{
    width:290px;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0px 7px  20px  25px rgba(247, 44, 234, 0.526);
    

}
<video id="text" controls loop autoplay="autoplay"  onmouseover="hideControls()" 
        title="to do list">
            <source src="toDoListVideo.mov" class="project">
        </video>

about 4 years ago · Santiago Gelvez
3 Respuestas
Responde la pregunta

0

I am not sure, but I belive that you have <video controls>, but you need <video controle="False">

about 4 years ago · Santiago Gelvez Denunciar

0

I removed the "controls" by removing the control word on HTML, like so: **Also note that setting controls="false" can't happen as it is a boolean variable and would have no value on HTML. Thank you for your help however. :D

<video id="text" loop autoplay="autoplay"  onmouseover="hideControls()" 
        title="to do list">
            <source src="toDoListVideo.mov" class="project">
        </video>

about 4 years ago · Santiago Gelvez Denunciar

0

Hope this helps

You forgot to store document.getElementById('text') into the variable video hence causing your issue

I also added a listener showControls that adds back the video controls on mouse out

function hideControls() {
    const video = document.getElementById('text');
    video.removeAttribute("controls");
}
 
function showControls() {
    const video = document.getElementById('text');
    video.setAttribute("controls", true);
}
video {
    display:inline-block;
    margin: 25px;
    width: 280px;
    height: 280px;
    background-color: rgba(255, 255, 255, 0);
    box-shadow: 0px 7px 8px  10px rgba(0, 255, 255, 0.328);
    
}
video:hover{
    width:290px;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0px 7px  20px  25px rgba(247, 44, 234, 0.526);
}
<video id="text" controls loop autoplay="autoplay" onmouseover="hideControls()" onmouseout="showControls()" 
        title="to do list">
    <source src="https://www.w3schools.com/html/mov_bbb.mp4" class="project">
</video>

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda