I successfully made an m3u8 video partially played on the Android 2.3.3 emulator, the problem is that the http connection between the emulator and the server is weak, it quite often drops the network packet and gets "Could not find the serial number XXX in the new playlist" and SocketTimeoutException in a few seconds. I do not have a real device for testing, but someone said that this is a bug of the Emulator, and should be fine on the real device.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String httpLiveUrl = "httplive://your_media_file.m3u8"; setContentView(R.layout.media_player); videoView = (VideoView) findViewById(R.id.myVideoView); videoView.setVideoURI(Uri.parse(httpLiveUrl)); videoView.setMediaController(new MediaController(this)); videoView.requestFocus(); videoView.start(); }
source share