Stralo
Stralo

Reputation: 474

How to change Android VideoView content color when data isn't ready

I'm working on a video player app, and I'm using a VideoView to show the videos. The videos are obtained from a url like so

videoView.setVideoURI(videoUri);
videoView.start();

When there's no internet connection, the videoView just looks all black on the screen. I would like to change this default black screen to another image.

Any tips on how to accomplish this would be much appreciated.

Thanks!

Upvotes: 0

Views: 829

Answers (1)

KishuDroid
KishuDroid

Reputation: 5451

Now when your video is playing hide the placeholder and when your network is off hide the videoview

Upvotes: 1

Related Questions