Android VideoView black screen

前端 未结 22 2043
清歌不尽
清歌不尽 2020-11-27 12:55

I have been looking for a way to get rid of the nasty black initial screen on a VideoView before the start() method is run.

I have tried with background image on the

22条回答
  •  渐次进展
    2020-11-27 13:46

    For people still looking for answer for this, calling VideoView.start() and VideoView.pause() in succession inside onPrepared worked for me. I know this may not be the ideal way of achieving this however it might be the one with minimal workaround required in the code. Hope this works for you too.

    @Override
    public void onPrepared(MediaPlayer mp) {
        mVideoView.start();
        mVideoView.pause();
    }
    

提交回复
热议问题