Hi, recently I am working on playing an local audio on Android PhoneGap. It was working on the version 1.9.0 using the path prefixed with 'android_assets/www/'. Today I just feel it might be better for future work, I upgraded the PhoneGap version to 2.0.0, and the local audio play does not work any longer.I am pretty sure it was working last time on 1.9.0. I double-checked the logCat and there was no JS loading or syntax errors. The behavior is that no sound is going to be played, and the error handler will be invoked after I trigger the stop function. In addition, the audio given by a HTTP URL is fine. Apparently there is something messed up with the path.Here is my essential segment of code:function error_error(e) {alert('Audio Play Error.');alert(e.message);}function playAudio(src) {if (device.platform == 'Android') {src = '/android_asset/www/' + src;}my_media = new Media(src, success, error_error);$("#status_title").text('Sensing');$("#status_text").text('System is sensing the sensor... Press stop button when you want to stop this process.');$("#inner_start").hide();$("#inner_stop").show();my_media.play();}// play audio main function, callback function and exception handler$('#inner_start').live('vclick', function(e) {// alert('inner start tapped.');playAudio('Nokia_Tune_Dubstep_Edition.mp3');return false;});
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
../../data/data/com.ibm.filcontact/test.mp3
/data/data/com.ibm.filcontact/test.mp3
http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to