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

143
Views
How can I sync audio and video perfectly in JS?

I'm developing a stream player, I decided to turn off the audio of the video and create individual audios with the languages (audios separately) but the audio never sync. See below:

• Synchronizing the audio based on the video (I'm using the playing event, because timeupdate and progress don't work very well)

video.onplaying = function(){ audio.currentTime = Math.round(video.currentTime)}

• Getting the difference between the currentTime of the audio and the video (if it is synchronized)

video.ontimeupdate = function () {
  document.title = video.currentTime - audio.currentTime; // it oscillates between 0.0535555 and 0.0756795 (Not synchronized)
}

I know it seems to want a lot, because I delay it and very little, but there is a way to sync perfectly. (I don't know how the big streams do to get all the languages ​​but this was the personal way I found to solve this)

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