Question

I want to introduce a feature in which the user can select a tv channel and can see this channel on his mobile device.

Anyone know about this live tv channel streaming. If yes than pl help me.

Was it helpful?

Solution

I use following code to play Live Streaming Channel in videoview.

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();

You need to play rtsp format for play channels in video. So Here is list of some Channels with rtsp format is used to play live streaming channels.

Also note that Live streaming required fast internet connection, will get blur video if you are on 2g connection.

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