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();
精彩评论