I am using this code on video view to seek to custom position but it is working fine on samsung devices but on sony devices the video seeks to the start position(beginning)
I want to get video to the position where it was last time paused
Creating Video View:
VideoView mVideoPlayer.setVideoPath(ViDpath);
MediaController mCd = new MediaController(this);
mVideoPlayer.setMediaController(mCd);
mVideoPlayer.requestFocus();
Pause and Play works fine:
mVideoPlayer.pause();
mVideoPlayer.start();
This works abnormally:
mVideoPlayer.seekTo(anyCustomPosition);
Testing:
I tested it further on different devices.
- Moto X 2014 Lollipop: It works abnormally, sometimes video continues and sometimes it starts over.
- Samsung S4 KitKat: Works better but dont seeks to the exact position.
- Sony Xperia Z KitKat: Video always starts over(from the beginning).
Is there any alternate?
Or a way to fix it?