• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help "Android MediaPlayer makes TEN requests if gets response with error"

Android MediaPlayer makes TEN requests if gets response with error - how to avoid this

  • Poll1

    Votes: 0 0.0%
  • Poll2

    Votes: 0 0.0%

  • Total voters
    0

Oleh

Lurker
In my app I have VideoView and it has onErrorListener:
private MediaPlayer.OnErrorListener mErrorListener = new MediaPlayer.OnErrorListener() {
@override
public boolean onError(MediaPlayer mp, int what, int extra) {
if (!retry()) {
tryAnotherLink();
}
return true;
}
};
So, in logs I see IOException after 20 mls, but onErrorListener returns me an error after about 15 seconds and by Fidler I can see ten requests with this the same link. My question is : How to get answer from Android MediaPlayer after receiving first bad response or how to detect it. Or maybe there is an opportunity to decrease number of requests.
 
Back
Top Bottom