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.