Search code examples
exoplayerexoplayer2.x

How to read the current effective resolution for the Exoplayer?


I am looking into the Exoplayer and the stream with better resolution scales down when bandwidth is shrinking.

Is there an interface where I can read the real resolution currently used by the Exoplayer?


Solution

  • ExoPlayer has a method to get the video size:

    VideoSize videoSize = player.getVideoSize();
    

    The VideoSize instance contains the video width and height.