3
votes

I'm developing an Android application (radio, streaming music), and for some streams, I getting the following error in console:

error (1, -2147483648)

Does it mean that Android only supports a few media formats and I can't do anything with it?

I can't reencode streams, because I use external sources.

Source code:

if (radio && typeof radio.stop != 'undefined') {
  radio.stop();
  radio.release();
}
radio = new Media(data.link);
radio.play();

There is all source code that working with Media class (phonegap).

logcat:

07-21 00:19:29.313: D/DroidGap(280): onMessage(onNativeReady,null)
07-21 00:19:29.313: D/DroidGap(280): onMessage(onPageFinished,file:///android_asset/www/index.html)
07-21 00:19:29.932: I/Database(280): sqlite returned: error code = 14, msg = cannot open file at source line 25467
07-21 00:19:30.183: D/DroidGap(280): onMessage(networkconnection,3g)
07-21 00:19:31.331: D/DroidGap(280): onMessage(spinner,stop)
07-21 00:19:36.343: D/Cordova(280): onPageFinished(file:///android_asset/www/index.html#radio)
07-21 00:19:36.343: D/CordovaWebView(280): >>> loadUrlNow()
07-21 00:19:36.343: D/DroidGap(280): onMessage(onNativeReady,null)
07-21 00:19:36.343: D/DroidGap(280): onMessage(onPageFinished,file:///android_asset/www/index.html#radio)
07-21 00:19:37.492: D/dalvikvm(280): GC_FOR_MALLOC freed 3015 objects / 521248 bytes in 67ms
07-21 00:19:46.012: D/Cordova(280): onPageFinished(file:///android_asset/www/index.html)
07-21 00:19:46.012: D/CordovaWebView(280): >>> loadUrlNow()
07-21 00:19:46.012: D/DroidGap(280): onMessage(onNativeReady,null)
07-21 00:19:46.012: D/DroidGap(280): onMessage(onPageFinished,file:///android_asset/www/index.html)
07-21 00:19:49.472: D/Cordova(280): onPageFinished(file:///android_asset/www/index.html#radio)
07-21 00:19:49.472: D/CordovaWebView(280): >>> loadUrlNow()
07-21 00:19:49.472: D/DroidGap(280): onMessage(onNativeReady,null)
07-21 00:19:49.472: D/DroidGap(280): onMessage(onPageFinished,file:///android_asset/www/index.html#radio)
07-21 00:20:11.273: D/dalvikvm(280): GC_FOR_MALLOC freed 3595 objects / 570336 bytes in 76ms
07-21 00:20:19.254: E/MediaPlayer(280): error (1, -2147483648)
07-21 00:20:19.254: E/MediaPlayer(280): Error (1,-2147483648)

Streams: webcast.emg.fm:55655/europaplus64.mp3, 92.53.112.250:8100/rr_aac?type=.flv

1
code: if ( radio && typeof radio.stop != 'undefined' ) { radio.stop(); radio.release(); } radio = new Media(data.link); radio.play(); - Artem Bondarenko
Could you include some more of your source code in your question? What you've provided isn't enough to gain context as to what's going wrong. Also, could you provide logcat output? - Makoto
This link might help you stackoverflow.com/questions/9162022/… - shoren

1 Answers

0
votes

See documentations: http://docs.phonegap.com/en/2.7.0/cordova_media_media.md.html#Media

I had the same error but after updates my code like in the documentations all works fine.