I am having a little problem with the toolbox’s “run javascript”. Basically what I need to create is a notification sound when a new order arrives. I followed the instructions given in this post: https://forum.bubble.io/t/sound-alerts-request/4848/25
I set the workflow (run javascript) to run when the Popup opens.
If I open the Popup by clicking the button the sound always plays (iPad & Desktop).
When the Popup opens when condition is met - it works most of the time on desktop & never on iPad.
This is so strange. Maybe it is the browser blocking random sounds from websites.
Does anyone know how to solve this? I would be very thankful…
I think it’s indeed the Safari browser on iPad blocking the sound: It will likely be blocked on all WebKit browsers, including Safari on macOS or Chrome on iOS. Reason for this is Apple made the decision to prevent sounds from autoplaying (same goes for videos with sound!).
As far as I know, playing sound IS still allowed when there’s some form of user interaction, for example, clicking a button. So, something you could try is putting the javascript Workflow in a “When Element is clicked” in stead of “When Popup is opened”.
Also, make sure the iPad is not on Mute, of course, hah.
Thank you for your help. I believe you saved me quite a bit of time - I would not have stopped trying to make it work. I guess I have to find another solution.