sandalone sandalone - 1 year ago 185
Android Question

What is MediaPlayer.OnInfoListener "code 703"?

I am running a stream via

. When buffering starts, the code 701 is thrown. When buffering ends, the code 702 is thrown.

All codes are found on this link.

first throws the code 703, which I cannot find anywhere. Here is the code and debug output.

mPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() {
public boolean onInfo(MediaPlayer mediaPlayer, int i, int i2) {
Log.d(TAG, "MediaPlayer.OnInfoListener: " + i);
return false;


12-29 13:40:54.995: DEBUG/StreamingService(13811): MediaPlayer.OnInfoListener: 703
12-29 13:40:55.000: DEBUG/StreamingService(13811): MediaPlayer.OnInfoListener: 701
12-29 13:41:09.055: DEBUG/StreamingService(13811): MediaPlayer.OnInfoListener: 702
12-29 13:41:10.770: DEBUG/StreamingService(13811): MediaPlayer.OnCompletionListener

What is the code 703 thrown via

Answer Source

Code 703 ought to be MEDIA_INFO_NETWORK_BANDWIDTH : "Bandwidth in recent past" (source).

This isn't really an error. It's a status code for information about what's going on in the media framework. Looking at the AwesomePlayer source code I see that it sends out MEDIA_INFO_NETWORK_BANDWIDTH if the stream data cache is running low, which would eventually happen if you suddenly disable the internet connection. It'll then pause playback and start trying to buffer some more data, which is indicated by a MEDIA_INFO_BUFFERING_START message (code 701).