Http Live Streaming on Android 4 (Ice Cream Sandwich)

I would like to play a link to direct direct http (.m3u8) on Android. Could you let me know how to write code for this (snippet)?

I tried the following (in the Activity onCreate event), but it did not work (says Cant play video):

VideoView vv = new VideoView(this); Uri uri =Uri.parse("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"); vv.setVideoURI(uri); setContentView(vv); 

Note: using emulator for testing thanks for the help

+7
source share
2 answers

Try the following:

  String httpLiveUrl = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"; videoView.setVideoURI(Uri.parse(httpLiveUrl)); videoView.setMediaController(new MediaController(this)); videoView.requestFocus(); videoView.start(); 

OR

Try using the VitaMio media player

HTTP live broadcast (M3U8), for Android 2.1 +

edit : VitaMio player is dead


I think this will work very well on the device itself, since it works in HoneyComb, the emulator can sometimes be broken.

+3
source

It seems like this may not be fully supported in the emulator. This works fine on the ICS device.

+1
source

All Articles