IS there anybody have run http live Streaming(discovered by Apple) on android device. I have some of Streaming Url. like "" www.abc/iphone/france24/allegro/fr/f24_fr.m3u8 "" type. My task is to make a app for android 3.0 OS type mobile. Can anybody help me to make it.
The topic is new in android market.So that there is not much help on internet. I have got one of sample code to run livestreaming on android device.but it doesnt run urls that i have. these url are effectively working on IPAD or IPHONE. Thanks
check out the issue in android bug report. replacing http with httplive worked for me. Here is the sample code below from the bug report
private void playVideo(Integer Media) {
doCleanUp();
try {
switch (Media) {
case Globals.TEST_HTTP:
path = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8";
break;
case Globals.TEST_HTTPLIVE:
path = "httplive://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8";
break;
}
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(path);
mMediaPlayer.setDisplay(holder);
mMediaPlayer.prepare();
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnVideoSizeChangedListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
} catch (Exception e) {
Log.e(TAG, "error: " + e.getMessage(), e);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With