title: How can I scale video in ExoPlayer-V2 - Play Video In Full Screen
body: <p>I am playing video from <code>URL</code> on <code>Exoplayer</code>, it stretching the video on resizing/on using <code>resize_mode</code> as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video. </p>
  
  <p>I want to do scale type <code>CENTER_CROP</code> like we do in <code>TextureSurface</code> as mentioned in <strong>image2</strong> but I am getting output as <strong>image1</strong></p>
  
  <p>I have tried following example </p>
  
  <p><a href="https://github.com/google/ExoPlayer#" rel="noreferrer">Exoplayer Demo Example</a></p>
  
  <p>My Output <strong>(Img 1)</strong> and Expected Output <strong>(Img 2)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ENZxO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ENZxO.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>exoplayer layout code</p>
  </blockquote>
  
  <pre><code>  &lt;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" /&gt;
  </code></pre>
  
  <p>With this line <code>app:resize_mode="fill"</code> it  fit the video in screen but stretch vertically,
  So how can I solve this .</p>