I found many possible solutions to this problem in StackOverflow, but it does not seem to solve it for me. I am trying to play an mp3 file in my Cordova application (3.5) usingorg.apache.cordova.media@0.2.10
var sound = new Media('audio/el/hello.mp3');
sound.play()
But it just won’t play, and I get the following error in LogCat
MediaPlayer error (1, -2147483648)
I tried serving the folder locally and the following steps point to the same file
var sound = new Media('http://10.0.2.2:9999/www/audio/el/hello.mp3');
sound.play()
This suggests that this is not because the file has an encoding problem.
I was unable to use the latest version of the plugin mediabecause the event devicereadynever fires.
Update . I just tried unzipping the files to persistent storage and playing them there, and I get the same error.
. AudioPlayer.java, , www , FileNotFoundException f == "www/el/hello.mp3"
fd = this.handler.cordova.getActivity().getAssets().openFd(f);
, assets, .