Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!