ImageView, MediaController, MediaPlayer

videoView = (VideoView) findViewById(R.id.video_view);
mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
videoView.setMediaController(mediaController);
Uri uri = Uri.parse(video_uri);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
  @Override
  public void onPrepared(MediaPlayer mp) {
    videoView.start();
  }
});

MediaPlayer ()pdf

Leave a Reply

Your email address will not be published. Required fields are marked *