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

151
Visualizações
browser won't remember user interaction when going between local websites

I am making a website with a video that I want to autoplay with sound. On most websites, if you click a link to another part of the site it remembers the user interaction and allows autoplay. However, right now it is local (aka the url is C:\\ ...), so going between 2 different .html files makes the browser reset its user interaction check.

Is there any way to fix this without placing my entire site online?

minimum reproducible example:

link.html:

<!doctype html>
<html>
<body>
<a href="file:///C:/ ... /mainSite.html">Click to go to other site</a>
</body>
</html>

mainSite.html:

<!doctype html>
<html>
<audio id="player" autoplay controls>
    <source src="https://www.appsloveworld.com/wp-content/uploads/2018/10/640.mp4" type="video/mp4">
</audio>
</body>
</html>

NOTE: it should work like so:

User goes to link.html, clicks it and gets redirected to mainSite.html. The browser remembers user clicking link in link.html, and since both sites are from the same source, (my pc), the audio autoplays.

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