0

I've been having some problems making a webpage of mine play music as a background.

I have seen this thread: How to make audio autoplay on chrome However none of the solutions seem to work.

I've been using a blank HTML so I know it's not the fault of any other elements messing around and I know it works on Firefox because it does.

I also did try to load like a nifty little loading screen that I got from codepen to see if it plays if I put it after some stuff and it still does not work.

I've also tried the W3Schools version and variations of it where I add an audio tag and a source tag with a .ogg and .mp3 file.

At this point I've got to ask, how do some websites do this for Chrome Browsers?

Trideep
  • 51
  • 8
  • you need user to interact with Document(click, tab etc.) to play audio. – sandeep joshi Oct 11 '20 at 13:22
  • Got it, but then how to some sites manage to play an audio clip without you needing to interact with their webpage like https://rwatgg.com/ for example – Trideep Oct 11 '20 at 15:26
  • i ctrl+clicked on your link and I didn't click on that newly opened tab. so I don't hear anything. it only starts playing when I click on that tab(interacted) – sandeep joshi Oct 11 '20 at 15:33
  • i think this should help you regarding [autoplay policies](https://stackoverflow.com/questions/64295222/playjoin-is-undefined-unexpected-end-of-input-and-files-not-importing-correctl?noredirect=1#comment113695085_64295222) – sandeep joshi Oct 11 '20 at 15:33
  • 1
    ahh you're right, I didnt realize clicking on a tab constitutes as an action. Thank you :) – Trideep Oct 11 '20 at 16:38

0 Answers0