I try to use AR.Sound to trigger the music. It seems that it does not work on IOS. but I use the exactly same code on Android device, it works. Not sure why. Anybody got idea?
The code just use the same as from API document, only change the url.
var sound = new AR.Sound("http://www.myuri.com/sound.mp3", { onLoaded : function(){sound.play();}, onError : function(){ // alert the user that the sound file could not be loaded }, });
Thanks
A
Andreas Schacherbauer
said
about 10 years ago
Hi,
is the sound file a local or remote resource?
Best regards
Andreas
J
Jay Chen
said
about 10 years ago
Hi Andreas
It is a local mp3 file. The url is like "assets/abc.mp3"
Thanks
A
Andreas Schacherbauer
said
about 10 years ago
do you have a whitespace in eather your project name or in the local path where the .mp3 file is lcoated?
Jay Chen