Mp3 is not playing when I preview in browser (142.2 KB) I have an unusual one - I have mp3 set to play on scene load - it doesn’t play if I hit the browser preview but it does play if I export
I opened an old project that I know worked and it also has stopped previewing the audio
Not sure what has changed

autoplay of audio and video in webenvironment is restricted -> on some browsers and mobile operating system more or less. google advises to start media by user-interaction. that would be a save way.

If your planning to include those exports into an app, the app-settings can allow the autoplay

Thanks Hans
The audio controlled by button clicks works fine and it used to work fine on scene load. Has this changed recently?
Does that mean I have to control all the audio with javaript now!

yeah, restrictions changed recently …

some audio-libraries like howler try to catch first touches/ clicks to register their audios and support autoplay that way … you can do it yourself too.

starting your page as webapp may also be of some help.

@jonathan will Hype register touches, clicks with purpose of enabling/support autoplay?

If you have a sound play in a mouse action then it will be allowed to play, along with any subsequent plays.

Hype doesn’t “prewarm” future audio on a first mouse event, but a technique you can use is to have an initial scene or first action button that will play a soundless audio file, and then you can use scene load/timeline actions for sounds as you’d like.

The browser autoplay restriction does not occur (at least with safari) when opening a file via a file:/// URL, so that’s probably why the export could play.

Thanks Jonathan. I use a different hype file for each page as a method of embedding into an elearning framework.

@jonathan I was wrong its only the click events that play on export also. I did try what you suggested with a pre-scene and it works but wont solve my issue since i use a different file for each page

Unfortunately browser limitations restrict autoplaying on a per-page basis.

If you have complete control over the browser/environment you can change the setting (say if this is used only in class labs), but if it is generally available on the internet then there’s no way around it.