I am playing the MP4 in android phone with the below code:
VideoView videoView = (VideoView) findViewById(R.id.VideoView);
// Set video link (mp4 format )
File file2 = new File("/sdcard/Alone.mp4");
Uri video = Uri.fromFile(file2);
videoView.setVideoURI(video);
videoView.start();
But while i playing this video, before starting of that video i seen one black screen for 0.2 or 0.3 second.
I dont want that black screen to appear.
So for that what should i have to do ? I want is, while i play the video, there should be only screen of the video, no any other black screen should be there before playing it ?
Thanks.
The cause of 'Black Screen' can be due to compression issues or read/write errors or file format changes or corruption or virus attack etc. In all these situations, the world's best video repair software like Stellar Repair for Video can only work like wonders.
What Causes Black Screen When Playing Videos? The corrupted file is the main reason that the windows screen turns black. A variety of factors can cause the issue. This includes header issues, video file transfer errors, issues with the video's codecs, and the list goes on.
My solution to this problem was this line:
videoView.setZOrderOnTop(true);
This changes the black screen with a momentary transparent video. You can easily fix this other issue by setting an ImageView with the first video frame behind the VideoView.
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