Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue in playing m3u8 file in android 3.2

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.

like image 526
Abhi Avatar asked Jan 25 '12 15:01

Abhi


1 Answers

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

like image 195
Chris Cashwell Avatar answered Nov 19 '22 17:11

Chris Cashwell