Page 1 of 1

Javascript sound media not working?

Posted: Sun Mar 31, 2019 9:14 pm
by bernadet
Hi there,

I know the version history on the app store says the latest version is Aug 2018- but has anything been changed with the code for ARIS since last fall (November or later)? I’ve encountered a really bizarre bug/hiccup.

In the latest version of my French game Explorez I’ve made a lot of game elements that are either hidden on the map or are triggered by timers to fill the gaps while students are walking between locations. I also put javascript in these to both make a sound and vibrate so that students would be aware they had encountered a game element.

This worked fine last term & on the devices that downloaded ARIS last term for testing the javascript inserted sound is still working in Explorez. On the 7 devices that we’ve downloaded the app onto just this term (Feb/March) the sound doesn’t work. The javascript is partially being “read” because the devices vibrate, but there’s no sound…

Before sending I figured I better also try uploading new sounds to see if this fixed the issue. Now any new audio files I upload aren’t playing. The weirdest thing is that ONLY my old audio files are working with the original media ID. I made a testing sound game and uploaded audio files. When I insert the media ID (new media) from this game, I get nothing. But if I put in the media ID (old media) from the other game Explorez, even though this doesn’t match the ID in the Testing Sound game, it plays the sound in this test game…

Any help appreciated.


Re: Javascript sound media not working?

Posted: Wed Apr 03, 2019 11:40 am
by djgagnon
We are checking into it. Look for an update shortly.

Re: Javascript sound media not working?

Posted: Mon Apr 08, 2019 9:47 am
by bernadet
Great to hear! Thanks David :)

Re: Javascript sound media not working?

Posted: Thu Apr 11, 2019 11:53 am
by mtolly
We've researched this, and it seems that playing a sound via JS will only work if the sound file has already been downloaded onto the device. This explains why it’s working on your older installations, and with existing sound files but not new ones. We will plan on fixing this in the app so calling “prepareAudio” and/or “playAudio” downloads the file if needed, but as a short-term fix you can turn on the “Preload Media” checkbox in the ARIS Editor game settings. This should ensure that all files are downloaded to the device on game load.