Search code examples
androidvideo-streamingjmfhttp-streaming

Android Video Streaming


I need HTTP/RTSP Video Streaming with Android. Any Ideas ? Is that possible to go with JMF with Android ? Any Working examples ?

Already tried with http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/

Its not working with my case. Are there any specific types of videos that Android can stream ? Thanks.


Solution

  • You don't necessarily need JMF. Android has built in support for HTTP/RTSP video streaming.

    Try this:

    String LINK = "type_here_the_link";
    setContentView(R.layout.mediaplayer);
    VideoView videoView = (VideoView) findViewById(R.id.video);
    MediaController mc = new MediaController(this);
    mc.setAnchorView(videoView);
    mc.setMediaPlayer(videoView);
    Uri video = Uri.parse(LINK);
    videoView.setMediaController(mc);
    videoView.setVideoURI(video);
    videoView.start();