Android MediaPlayer makes TEN requests if gets response with error?
0
down vote
favorite
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.