Question

I am trying to play apple test stream video (.m3u8) in Android.

This is the link: http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8

But I am not able to play it in Android 3.2.

This is the code I have used to play the video:

void playVideo(String url) 
{
    String  link=url;
    Log.e("url",link);
    MediaController mc = new MediaController(this); 
    mc.setMediaPlayer(videoview); 
    videoview.setMediaController(mc);
    videoview.setVideoURI(Uri.parse("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8")); 
    videoview.requestFocus(); 
    videoview.start();    
}

Please, suggest me the way to play m3u8 file in different Android versions.

Was it helpful?

Solution

Have you tried vitamio? It's an extension framework that does everything (and then some) that MediaPlayer does, including m3u8 streams.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top