I play video from my server on Exoplayer
, but it stretches the video when resizing and the inability to maintain the aspect ratio of the video.
I want to make the scale type CENTER_CROP
, as in TextureSurface
I tried the following example
Exoplayer Demo
My conclusion (Img 1) and the expected result (Img 2)

My layout code
<com.google.android.exoplayer2.ui.SimpleExoPlayerView android:id="@+id/player_view" android:layout_width="match_parent" android:layout_height="match_parent" app:resize_mode="fill" />
Using this line app:resize_mode="fill"
it fills the video on the screen, but is stretched vertically. So how can I solve this.
source share