0
votes

Is there any Listener to override methods of Videoview like

boolean canPause()
boolean canSeekBackward()

boolean canSeekForward()

int getBufferPercentage()

int getCurrentPosition()

int getDuration()

boolean isPlaying()

How to pause a video. For audio we use mediaController.setMediaPlayer. How we can use for video.

Basically my code for playing video is like this :

mediaController = new MediaController(activity);
mediaController.setMediaPlayer(videoView);
videoView.setVideoPath(filePath);

videoView.requestFocus();
videoView.start();
mediaController.show();
videoView.setMediaController(mediaController);

And also I want to know what is the difference between mediaController.setMediaPlayer
(videoView); and videoView.setMediaController(mediaController).
Can Anyone help me in sorting out thi issue.
Thanks in Advance.

1

1 Answers

0
votes

I am afraid you cant. You might have to write your own videoview by overriding the SurfaceView and creating a MediaPlayer instance. But in this case you would have to handle many factors like video dimension, playback, buffer etc...