because the videoview does not show me anything

0

This is the code but it does not show me anything but the app closes

VideoView video;

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

    video = (VideoView)findViewById(R.id.pantallaVideo);
    video.setMediaController(new MediaController(this));
    video.setVideoPath("http://192.168.15.214/PruebaConexion/S01E01.mkv");
    video.start();
}

The error you give me is the following

  

MediaPlayer: setDataSource: IOException!   uri = link

and this other error

  

dalvikvm: Could not find class 'android.os.PersistableBundle',   referenced from method   com.example.erick.reproducingvideo.MainActivity.access $ super

PS: I have the server in my computer and the video is in mkv format

    
asked by Erick Raul Marquez 14.07.2016 в 00:32
source

1 answer

0

Please note that the .mkv format is supported on Android 4.0+, H.264 video codecs and AAC audio.

link

But in your case for the error IOException ensures that the url: link can be read correctly and the file exists.

    
answered by 14.07.2016 в 04:52