Hello fellow Bricksters
I am facing some issues in Safari and Firefox with an audio that needs to be autoplayed.
Let me explain the scenario, in case someone can help me understand what’s going on and how to solve it:
The web is a bit different of a standard website, and it is designed to be more like an online exhibition. So the steps that the user follow to enter the “exhibition” are:
- Page 1 - A simple page that welcome the user with an “Enter” button. The user is advised that when clicking the Enter button a new page will open where there will be some sound/audio on.
- Page 2 - An introduction to the exhibition. Here’s where I have a Bricks native Audio element that should autoplay with a voice narrating an introduction to the exhibition.
- Page 3 - The actual homepage with all the content.
So far, so good. And with Chrome everything works perfectly!
However, in Safari and in Firefox, the audio is not autoplaying when entering to the second page.
I added the second page so the user interacts with the website before going to a page that contains an autoplayed audio. But that doesn’t solve the issue.
What I get in Firefox, for example, is this error in the Console:
Uncaught (in promise) DOMException: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Any ideas on how to solve this?
Thaaaanks!!
PS: If anyone need the link to the site to inspect it, just private message me and I can send you.
PS2: I am not sure if this is a How To or a Bug. If it’s on the wrong place, I can move it where it would suit better!