package com.example.reproductordelistasmultimedia;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

public class Streamingtv_simple extends Activity {

        @Override protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.streamingtv);

            // LINK en formato rtsp, como rtsp://streamer1.streamhost.org:1935/salive/GMIalfah

            VideoView videoView = (VideoView) findViewById(R.id.video);
            MediaController mc = new MediaController(Streamingtv_simple.this);
            mc.setAnchorView(videoView);
            mc.setMediaPlayer(videoView);
            // Cargamos los enlaces provenientes de ListaCanalesTv
            Uri video = Uri.parse(ListaCanalesTv.setEnlaceTv());
            videoView.setMediaController(mc);
            videoView.setVideoURI(video);
            videoView.start();
        }
}