How to get streaming bitrate with MediaPlayer?

Viewed 1280

I'm developing a stream video app in Android with MediaPlayer. The problem is that I need to show the current bitrate, but I haven't found any valid suggestions on how to do get it?

Here is how I'm setting the video url to play:

    mediaPlayer = new MediaPlayer();
    try {
        mediaPlayer.setDataSource(VIDEO_PATH);
        mediaPlayer.prepare();
        mediaPlayer.init();
    } catch (IOException e) {
        e.printStackTrace();
    }

I don't know if the only way to get that working is using ExoPlayer (which I've read it may be possible)

Any suggestions?

Thanks!

1 Answers
Related