Is there anything you would change about my code, and if so, what?

It might well do. And supposing they happen to be somewhere quiet, like a hospital waiting room, or next to a sleeping baby? After that lovely “surprise”, how do they know how to turn it off? In those circumstances, most people will leave the page and never return. Even without those circumstances, I would leave a page and never return if it played music I could find no way to stop.

And yes, before you explain it to me, I do know that mousing over the same bar will stop it, but that is not immediately clear.

I’m trying to get you to look at your page from the point of view of a visitor.

3 Likes