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

184
Vistas
How can I use javascript to change the current playback position on audio player?

enter image description here

I'm trying to use javascript to change the playback position of the podcast currently playing on the pocketcasts website. Here's what the html looks like for the player controls section of the website: enter image description here

I don't really know what to try because I don't know javascript all that well, but I've tried:

document.querySelector("#root > div > div > div.styled__LayoutWrapper-sc-5ijxxa-1.bFiLsA > div.styled__LayoutFooter-sc-5ijxxa-0.kyfyug > div > div.controls > div.controls-center > div.SeekBarstyled__SeekBarWrapper-sc-1osf66u-0.rvojN.seek-bar > div.tracks > div.knob-bar > div").setAttribute('style', 'left: 100.4878px');

And it only changes the visual of where the current time knob is on the slider, but it doesn't change the actual time. How can I change the actual current playback time?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Don't change the position of the knob. Just change the playback time of the audio element.

document.querySelector('audio').currentTime

(of course make sure to select the element properly since there may be several)

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