I am playing video from URL
on Exoplayer
, it stretching the video on resizing/on using resize_mode
as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video.
I want to do scale type CENTER_CROP
like we do in TextureSurface
as mentioned in image2 but I am getting output as image1
I have tried following example
My Output (Img 1) and Expected Output (Img 2)
exoplayer 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" />
With this line app:resize_mode="fill"
it fit the video in screen but stretch vertically,
So how can I solve this .
TextureSurface
scale type CENTERE_CROP ? – Contract