I have the same problem. I am looking for a solution but havenβt found anything.
My code is:
$('#button').click(function{ media = new Media('/android_asset/www/sonidos/trans/sound.m4a', play, error); }); function play(){ media.play(); } function error(err){ alert(err.code); }
If I do this, the sound does not play, and I always get a warning with 0. This does not match the error code from mediaError.
Testing and testing I'm doing code works with the following code:
$('#button').click(function{ media = new Media('/android_asset/www/sonidos/trans/sound.m4a', play, error); media.play(); }); function play(){ ; } function error(err){ ; }
I know this is not the right way, but I cannot find another solution.
PD Sorry for my bad english.
source share