Confirm MediaPlayer automatic retry on streaming HTTP error
I originally posted this question to the Android developers Google group a few days ago, but have yet to hear a response. Maybe someone on Stack Overflow can help?
I have an app which streams mp3s from the web, proxied through a local HTTP server. At times, this local proxy server returns an HTTP error. It seems that upon receiving this error during the prepare state, the MediaPlayer makes one more attempt to stream, sending another request to the URL specified in setDataSource().
From a thread, I'm calling MediaPlayer.prepare() once. But from the proxy thread, I can see that after sending an HTTP error response开发者_JS百科, another request for the same URL is made. Can someone confirm this behavior? I'm seeing this from the emulator running a 1.6 AVD.
Can I disable this automatic retry? Is there a specific HTTP error code that I can send that will prevent this retry?
Thanks!
精彩评论