I am trying to play a video in my app. It has to be embedded.
I went through the \"Play Video Files in Android\" thread.
I am able to play my video using Vi
I have solved the problem:
1.
To remove the continue/pause buttons remove the media controller. For the looping issue
put OnCompletionListener so that when the video reaches the end, it starts again:
videoView.setOnCompletionListener(
new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
videoView.start();
}
});
2.
To resize the video, override method onMeasure() in VideoView like this:
public class MyVideoView extends VideoView {
public MyVideoView(Context context) {
super(context);
}
@Override
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
{
setMeasuredDimension(480,800);
}
}