4

I'm using an ExoPlayer to show videos, currently I just maintain the aspect ratio as default but this isn't ideal as I want the videos full screen.

        for (Listener listener : mListeners) {
        listener.onVideoSizeChanged(width, height, pixelWidthHeightRatio);
    }

I've tried setting the video to take the entire width of the screen however this just stretches and distorts the video. Any idea how to scale the video up while maintain its height:width ratio?

Antonio Gravano
  • 153
  • 1
  • 11

1 Answers1

0

try adding this lines

 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); //will hide the status bar
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); //will rotate the screen
Space
  • 133
  • 1
  • 2
  • 12