I'm using the MediaPlayer with a m3u8 audio stream. This results in a log error message: Error(1, -1010)
The first argument seems ok when I look at the error codes: https://github.com/android/platform_external_opencore/blob/master/pvmi/pvmf/include/pvmf_return_codes.h
Only -1010
, is strange.
When I use the apple video m3u8
url it's working great! This is the url:
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
The code I'm using is simple:
MediaPlayer mediaPlayer = new MediaPlayer();
try {
mediaPlayer.setDataSource("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8");
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.prepare();
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.setOnErrorListener(this);
mediaPlayer.setOnCompletionListener(this);
mediaPlayer.start();
} catch (IllegalArgumentException e1) {
e1.printStackTrace();
} catch (IllegalStateException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
Does anyone know if there is a limitation for audio only streams? I used multiple formats and different extensions.
Other question: does anyone have an URL of an m3u8 audio stream, so I can test other streams?