Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Buffering in MediaPlayer

I am using MediaPlayer to play a video in my app. The video takes a while to buffer and the videoview is blank for that time.

Is there a way to start the buffering when the user is in the previous screen, so that when he comes to the video playing screen, the video is ready to play?

Thanks Chris

like image 374
Chris Avatar asked Feb 25 '26 15:02

Chris


1 Answers

MediaPlayer lets you register an OnPreparedListener and an OnBufferingUpdateListener.

like image 135
JRL Avatar answered Feb 28 '26 05:02

JRL



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!