Search code examples
androidvideo-streamingandroid-mediaplayerbuffering

How to speed up MediaPlayer buffering on Android


Hi I'm developing an application that uses Android MediaPlayer to play a background video usually of 30 seconds length.

With some videos that are less than 5-7MB the Player starts immediately, but when the video size goes over 10-15MB the video takes over 30 seconds before playing.

My question is: is there a way to speed up Android native MediaPlayer Buffering in order to play the first frame of the video as soon as it is available like YouTube?

Thanks in advance


Solution

  • Don't know much about android native MediaPlayer but got similar problems using ExoPlayer and solve it by using LoadControl. If you don't find any solution with MediaPlayer maybe think about use ExoPlayer. Here is the link for discussion about DefaultLoadControl:

    https://github.com/google/ExoPlayer/issues/2438