We need help with custom code on a freshly finished project https://alreadyeverything.co.uk
There is an audio player on each page with lottie animation, which remembers the on/off state in the cookie.
In Chrome if you click on any link in the menu, on a newly loaded page autoplay works, but as you just land on a site for the first time it blocks the autoplay. What we’d like is to make it autoplay even if you first land on the site or refresh the page. I noticed that if I interact with the website more it starts doing that too, but not if you just first see this site.
For Safari, I couldn’t find any workaround for autoplay at all. Apart from showing a banner to enable autoplay in site settings, which doesn’t feel that slick. Although some people claim they used howler.js to hack autoplay restriction, I didn’t have any luck with it.
I’m happy to share what I have so far for you to use in your projects, but would love some genius code help to finish this.
P.S: If you want to say “omg don’t autoplay” please restrain. The client wants it, and the music is very gentle, not something screaming in your face. There must be some way to do it.
Here is my site Read-Only: LINK