Sound / Audio in RIV files not playing in browser
Hello,
I am new to RIVE, and am trying to create a simple animation with a sound loop. I have the sound being triggered on ENTRY of my State Machine on START. The sound works within RIVE app timeline, but when I go to publish or share the link, the sound is not playing, but the animation is.
What is the trick to get sound to play? I have verified that the sound file is embedded in the RIV file and format is set to SAME AS SOURCE.
I am embedding the file using the iframe embed code, but also the Share Link does not play the sound either:
https://rive.app/s/bAdWYxmomEib64Xfz9bQKg/
Most browsers won't allow you to play audio without some sort of user interaction. Otherwise ads try to shout at everyone. :) The only sure way to get around this is by adding a play button.
Thanks I just realized this after looking into the console:
22The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. <URL>