0

in my app, i am playing live video in Video View. i want to play Video after some time thats way i am using SeekTo() of video view. when i play video it will move as per time which i give but problem is after some time it will play from starting not from SeekTo time. Below is my code.

              getWindow().setFormat(PixelFormat.TRANSLUCENT); 

                          Uri video = Uri.parse(videourl);                 
                          videoView.setVideoURI(video);
                          videoView.requestFocus();
                 videoView.setOnPreparedListener(new OnPreparedListener() 
                          {

                              public void onPrepared(MediaPlayer mp) 
                              {                      
                                  progressDialog.dismiss();    
                                  videoView.seekTo(5000);
                                  videoView.start();

                              }
                          });    

Does any body have Solution or idea for my problem Please send me.. Thank You.

Hasmukh
  • 4,632
  • 2
  • 30
  • 44

1 Answers1

0

You can use seekTo after actual playing of video is started. call it after videoView.start();

Ashwin N Bhanushali
  • 3,872
  • 5
  • 39
  • 59