Audio not working on my website — Del Mar

Click the button. Nothing. Here's the two-step diagnosis.

Hey — two things cause this almost every time. Either the MP3 file didn't make it into your deployed output, or the path in your HTML doesn't match where the file actually lives on the server. Both are fast to check.

Want a live diagnosis? Text PJ → 858-461-8054. Share your URL and we'll check the network requests directly.

Step 1: Is the file actually deployed?

F12 → Network tab → click your audio button. Watch for the HTTP request. If it says 404 — file not found on the server. Your build script didn't copy the assets/ folder into _site/.

Fix: add assets to your build copy loop and redeploy.

for dir in images css js public assets; do
  [ -d "$dir" ] && cp -r "$dir" _site/
done

Step 2: Is the path right?

Check what path your HTML uses: src="/assets/audio/pj-main.mp3". Then check where the file actually deployed: ls _site/assets/audio/. One missing folder name in the path = silence, no error.

If the file loads (200 OK) but still no sound

That's a browser autoplay block. Safari and Chrome require audio to be triggered by a direct user gesture. If your code starts playback on page load or via a timer — it'll be blocked silently. Wire it to an onclick instead.

Del Mar business — audio still broken? Text PJ at 858-461-8054 → 5 minutes, no ticket.
Text PJ
Text PJ
858-461-8054