What is MediaPlayer.OnInfoListener "code 703"?

I am launching a stream through MediaPlayer . When buffering starts, code 701 is called. When buffering ends, code 702 starts.

All codes are on this link .

However, MediaPlayer.OnInfoListener first issues code 703, which I cannot find anywhere else. Here is the code and debug output.

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

Logcat:

 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 code 703 thrown through MediaPlayer.OnInfoListener ?

+8
android android-mediaplayer live-streaming
source share
1 answer

Code 703 should be MEDIA_INFO_NETWORK_BANDWIDTH : "Past Bandwidth" ( source ).

It's not a mistake. This is a status code for information about what is happening in the media. If you look at the source code of AwesomePlayer , I can see that it sends MEDIA_INFO_NETWORK_BANDWIDTH if the data stream cache is low, which will eventually happen if you suddenly disconnect your Internet connection. Then it pauses playback and starts trying to load some more data, which is indicated by the message MEDIA_INFO_BUFFERING_START (code 701).

+13
source share

All Articles