i have some problem with my app.
i was buliding hijaiyah aplication with PhoneGap and jquery mobile, i have some problem in it. actually this is working, but this is very delay to play another sound. here's html
<div data-role=page id=win8 >
<div data-role=header data-theme=b>
<a href="index1.html" data-role=button data-icon=arrow-l>Home</a>
<h1>Dal</h1>
</div>
<div data-role=content>
<p style="width:100%;text-align:center;"> <input type="image" onclick="playAudio('big_dal.mp3')" data-role="none" src=image/8.png /></p>
<div class=ui-grid-b>
<div class=ui-block-a><input type="image" data-role="none" src=image/8da.png />
<div data-role="button" data-mini="true" onclick="playAudio('8_da.mp3')">Play</div></div>
<div class=ui-block-b><input type="image" data-role="none" src=image/8di.png />
<div data-role="button" data-mini="true" onclick="playAudio('8_di.mp3')">Play</div></div>
<div class=ui-block-c><input type="image" data-role="none" src=image/8du.png />
<div data-role="button" data-mini="true" onclick="playAudio('8_du.mp3')">Play</div></div>
</div>
</div>
</div>
and here's the javascript
function playAudio(src) {
if (device.platform == 'Android') {
src = '/android_asset/www/' + src;
}
var media = new Media(src, success, error_error);
media.play();
}
function success() {
// ignore
}
function error_error(e) {
alert('mmmm, salah!');
alert(e.message);
}
what's the solution for this problem? i mean how to resolve this delay. this is so make me confused. thanks anyway. Hasan Fathy, sory for bad english.