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

205
Vistas
how to move the thumb of an input type="range" dynamically (for a custom video player controls) in javascript?

trying to figure out how to write the JS part to let the slider move with the time passed! help me figure out how to go about this code below.

i have canceled the controls attribute from the video tag so make a custom controls for the video. made a custom controls using fontawesome icons and wibkit slider thumb and track. i cant figure out how to manipulate the custom controls for the slider dynamically with JS.

const VisVideo = document.querySelector("video");
const range = document.querySelector("input");

const play = document.querySelector(".play");
const pause = document.querySelector(".pause");
const stoper = document.querySelector(".stop");
input[type="range"]{
  -webkit-appearance: none;
   width: 100%;
   background:transparent;
}
 
input[type="range"]::-webkit-slider-thumb{
    -webkit-appearance: none;
    height: 18px;
    width: 8px;
    border-radius: 2px;
    border: none;
    background-color: lightgrey;
    cursor: pointer;
    padding-left: 1px;
    margin-top: -6px; 
    box-shadow: 1px 1px 1px #111;
}
input[type="range"]::-webkit-slider-runnable-track{
    width: 100%;
    height: 5px;
    margin: 0 0.2rem;   
    cursor: pointer;
    background: rgb(63, 93, 228);
    box-shadow: 1px 1px 1px #111;
<body>
<div class="screen">
  <img src="poster.png"/>
  <video class="video">
       <source src="gone.mp4" />
  </video>
 </div>

 <div class="play ">
    <i class="fa-solid fa-play"></i>
 </div>
 <div class="pause ">
    <i class="fa-solid fa-pause"></i>
 </div>
 <div class="stop ">
    <i class="fa-solid fa-stop"></i>
 </div>
<input type="range" step="1" min="0" max="100" value="0" />
</body>

about 4 years ago · Juan Pablo Isaza
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