title: Android VideoView with MediaController - how to disable seeking while streaming
body: <p>If playing a video from the device, the media player knows its exact lenght and fast-forwarding through the video by moving the thumb in the mediacontroller seekbar is seemless.
  If playing a streaming video from the internet, the length of the video is unknown and seeking using the thumb causes the video to stop responding.</p>
  
  <p>I want to know how can I disable the thumb until the video is fully buffered? Then show it and enable fast-forwarding.</p>
  
  <p>Following is my video player code:</p>
  
  <pre><code>    setContentView(R.layout.layout_fragment_video_fullscreen);
      vvVideoFullscreen = (VideoView) findViewById(R.id.vvVideoFullscreen);
      rlVideoFullscreen = (RelativeLayout) findViewById(R.id.rlVideoFullscreen);
      videoUri = Uri.parse(video.getUrl());
      vvVideoFullscreen.setVideoURI(videoUri);
      mediaController = new MediaController(this);
      mediaController.setMediaPlayer(vvVideoFullscreen);
      mediaController.setAnchorView(vvVideoFullscreen);
      vvVideoFullscreen.setMediaController(mediaController);
      vvVideoFullscreen.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
  
          @Override
          public void onPrepared(MediaPlayer mp) {
              progressDialog.dismiss();
              rlVideoFullscreen.setVisibility(View.VISIBLE);
              vvVideoFullscreen.start();
              mediaController.show(3000);
          }
      });
  
  vVideoFullscreen.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
  
          @Override
          public void onCompletion(MediaPlayer mp) {
              finish();
  
          }
      });
  
      vvVideoFullscreen.setOnTouchListener(new View.OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              if (event.getAction() == MotionEvent.ACTION_UP) {
                  if (vvVideoFullscreen.isPlaying()) {
  
                      vvVideoFullscreen.pause();
                      mediaController.hide();
  
                  } else {
  
                      vvVideoFullscreen.start();
                      mediaController.show();
  
                  }
  
              }
              return true;
          }
  
      }); // End of setOnTouchListener
  </code></pre>