I am trying to stream video in video view over HTTP. and my code is as shown below. I am getting a white space between the video. I want to play video in whole screen ... can anyone suggest what to do?
MediaController mc = new MediaController(VideoViewActivity.this);
mc.setAnchorView(mVideoView);
mc.setMediaPlayer(mVideoView);
Uri video = Uri.parse(path);
mVideoView.requestFocus();
mVideoView.setMediaController(mc);
mVideoView.setVideoURI(video);
mVideoView.start();
This is how i have coded to play the video. Below Image shows while space.
Tap the video you'd like to watch. At the bottom of the video player, tap full screen .
android.widget.VideoView. Displays a video file. The VideoView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the video so that it can be used in any layout manager, and provides various display options such as scaling and tinting.
By the help of MediaController and VideoView classes, we can play the video files in android.
Set this for your VideoView
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With