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

129
Visualizações
Undetectable and Unblocked auto-play

Auto play getting muted in both firefox and chrome. How can we code, so it won't get blocked by browsers.

My Code :

  <audio id="audio1" src="https://notificationsounds.com/storage/sounds/file-sounds-1217-relax.mp3" autoplay="">
  <script>
     a = document.getElementById('audio1');
     
     a.onended = function(){setTimeout("a.play()", 1000)}
  </script>
almost 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is a browser feature and it is enforced by a policy. Your page must have some continuous activity in order to do so.

As suggested by the comments, you can indeed wait for onClick events in order to trigger your playback.

Technically speaking, the referenced document says that for a developer standpoint of view you can alter them to perform specific tests:

You can disable the autoplay policy entirely by using a command line flag: chrome.exe --autoplay-policy=no-user-gesture-required. This allows you to test your website as if user were strongly engaged with your site and playback autoplay would be always allowed.

You can also decide to make sure autoplay is never allowed by disabling MEI and whether sites with the highest overall MEI get autoplay by default for new users. Do this with flags: chrome.exe --disable-features=PreloadMediaEngagementData, MediaEngagementBypassAutoplayPolicies.

almost 4 years ago · Santiago Trujillo 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