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

163
Visualizações
How to autoplay the saavan link in html audio tag?

I have welcome.html file in that i have one audio tag inside that source attribute i am adding link from the jio-saavan but it's not playing when the webpage is opened but in console i am getting following error..

Error on console

welcome.html:28 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
<audio  autoplay id="my_audio">
  <source src="https://docs.google.com/uc?export=download&id=11wfYWiukbIZJQnDL385jQs2SGQA5ESbL" type="audio/mpeg">
</audio>
<script>
document.getElementById('my_audio').play();
</script>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The error is telling you clearly that you can't start an audio (or even a video if not muted) if the user haven't interacted with the page before.

Some links to better help you understand the policy on autoplay:

  • https://developer.chrome.com/blog/autoplay/
  • https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/
  • https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability
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