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

144
Visualizações
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
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