O
O
omazrv2015-12-18 19:19:31
Android
omazrv, 2015-12-18 19:19:31

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 the number of requests.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question