Android VideoView edit

Play video from URL with using VideoView

videoView.setVideoURI(Uri.parse("http://example.com/examplevideo.mp4"));
videoView.requestFocus();

videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
     @Override
     public void onCompletion(MediaPlayer mediaPlayer) {
     }
});

videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
    @Override
    public void onPrepared(MediaPlayer mediaPlayer) {
         videoView.start();
         mediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() {
               @Override
               public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
                     MediaController mediaController = new MediaController(ActivityName.this);
                     videoView.setMediaController(mediaController);
                     mediaController.setAnchorView(videoView);
               }
         });
    }
});

videoView.setOnErrorListener(new MediaPlayer.OnErrorListener() {
      @Override
      public boolean onError(MediaPlayer mediaPlayer, int i, int i1) {
           return false;
      }
});

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:

VideoView/
VideoView
Play video from URL with using VideoView
VideoView Create

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
211 VideoView
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close