Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda