开发者

video view issue in android

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 sta开发者_开发问答rting 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜