I've added an MP3 file to a slide show I'm making. I've added a timeline action telling it to start playing a few seconds after the show starts, but nothing happens. I also have an invisible button on the main stage with actions that should start the sound on Hover, Click or Enter Viewport. What's weird is that when the show ends, you can press a 'play again' button to repeat it. This time the show starts. Am I doing something wrong?
I'm not sure, but perhaps the audio is being blocked. It's actually something from the first Hype video…
…and the first on the channel. Basically, if the user doesn't actually click to allow sound, it could be blocked by the browser.
Here's how you can test…
If you're using Safari, there's a gear icon where the settings for a website can be changed. I have… 127.0.0.1 (which is where the Hype project is being served locally) …set to “Allow All Auto-Play” for the “Auto-Play” setting.
If you have that set to… “Stop Media with Sound” …which I think is the default, then that might be something to try. If you change nothing with your Hype project, but you change that setting to “Allow All Auto-Play”, and then it works — you found the problem.
(Although, you might want to switch that browser setting back to the default when you're done, so you can test your Hype projects as most people would see them.)
Then, you'll need to “Break the sound barrier” as explained with the “Coconut” template. That's basically adding a button that causes a sound effect to play… which should then allow auto-playing sounds to auto-play.
I'm not sure that's the problem, but that's what it… sounds …like.
Yes, I agree with Photics that this is an auto-play issue: audio will not play unless it is started from a mouse down, up, or click event. Basically browsers want to make sure that a user explicitly requested playback of audio. Therefore timeline actions or viewport actions are not good enough to start audio.
Note that once one audio has played on a page, all other audio is allowed to play or restart. Therefore some folks will require some interaction on the page that plays a quick silent audio file, and then all other audio can play on any other action desired.