0
votes

I am using limejs with phonegap and facing a problem about sound

Lime.audio.Audio: After following this link of google group on stack overflow (thanx KenWong) sound is playing on my iphone but it is not playing on my android.

Although the sound is working in google chrome but when I integrate the same code with phoneGap and execute it for android I hear no Sound.

        var welcomeSound = new lime.audio.Audio('assets/sounds/accordion.mp3');
        if(welcomeSound.isLoaded() && !welcomeSound.isPlaying()){
            alert('loaded');
            welcomeSound.play();

        }
  • I checked the isLoaded() function. it is not loading the sound for
    android. is there any other way to load and play the sound properly for android.

  • i also simply try the phonegap sound api it is working well alone but I want to use the limejs.audio.Audio functionality.

  • is there limitations of limejs.audio.Audio for android.

  • I also try the different sound formats (like: .mp3, .ogg, .wav, .aac) for android. but still facing the same issue with limejs audio.

  • :) all the sounds are working in google chrome on my MAC but not working on Android browser.

  • and similarlyvery strange one is that sounds are not playing on MAC safari but playing smoothly on iphone safari.

1

1 Answers

0
votes

Lime.js creates and audio element to play your sound. Sadly the audio element is broken in the Android WebView which is used by PhoneGap. You will want to look at using the PhoneGap Media class instead.

http://docs.phonegap.com/en/1.3.0/phonegap_media_media.md.html#Media