I'm trying to create a custom video playback, which has a video view and media controller:
VideoView mVideoView =(VideoView) findViewById(R.id.videoView);
mVideoView.setVideoURI(uri);
MediaController mMediaController = new MyMediaController(this);
mMediaController.findFocus();
mMediaController.setEnabled(true);
mMediaController.setAnchorView(mVideoView);
mVideoView.setMediaController(mMediaController);
Problem is that: when I programmatically change value of seekbar:
mVideoView.pause();
mVideoView.seekTo(newValue);
MediaController doesn't update these changes immediately. It updates only after I touch it again. Can anybody tell me the right way to update state of media controller? Thanks a a lot!
for this you have to set an handler that is call after every one second like below code-
and when you start playing music paste this line of code
hope it will solve your problem.