I get this error when playing a streaming audio in Android:
MediaPlayer(658): error (1, -2147483648)
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(url);
mediaPlayer.prepareAsync();
I get this error when playing a streaming audio in Android:
MediaPlayer(658): error (1, -2147483648)
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(url);
mediaPlayer.prepareAsync();
I don't know about playing streams but I was getting the same error from trying to play a file residing on the device. The solution was that the MediaPlayer didn't have the right permissions to read the video file. This article helped me out tremendously. http://www.weston-fl.com/blog/?p=2988
I was also getting the same error on Froyo & Gingerbread. In higher Androids the same video played well. Finally after a lot of research, tried changing the Https Url to Http Url & Bingo. It resolved my issue. I was using amazon S3 server so that simply replacing the "https" in url with "http" was sufficient.
videoUrl= videoUrl.replaceFirst("https", "http");
PS: For supporting older versions if you are using H.264 make sure videos are Baseline encoded.
After many try/error tests, for me has worked using full path on "new Media(...)", like this:
var mySound = new Media('file:///android_asset/www/sound/mysound.mp3');
S.
From the information you provided it is not possible to tell what is wrong exactly. You use prepareAsync() method, have you registered onPreparedListener? The prepareAsync method returns immediately, without onPreparedListener you do not have information when it is ready to start playing.
The other possibility is an error in your URL, or unsupported streaming protocol...