Playing audio on Smartface IO

80 Views Asked by At

I have been trying to play a sound on a click of a button and ive read everywhere and none of the solutions posted solved the problem.

I use the method stated on the docs website my file is an mp3 and its located in my resources/Sounds folder.

I have also read that there is a known issue in SMF. The only part that gets called in my playSound method below is the finished part

SMF.Multimedia.playSound("woop.wav", true, true, function() { alert("started to play..."); }, function() {alert("finished")});

I have the audio file located in resources/sounds folder I have also tried moving it around and I have tried different file formats but without any luck.

Does anyone know a working method to play audio or any concrete info regarding this bug in SMF

1

There are 1 best solutions below

5
AudioBubble On

Upload "woop.wav" into assets folder.Then use this code to play it.

SMF.Multimedia.playSound("woop.wav",true, false);

I tried both .mp3 and .wav files on Android,it works.Here is the official gudie for Multimedia.