title: How to resize video without changing it's aspect ratio?
body: <pre><code>  constructor(props) {
      super(props);
      this.state = {
          screenWidth: Dimensions.get('window').width,
          heightScaled: null,
      };  
    }   
  
  &lt;View style={styles.videoView}&gt;
         &lt;Video 
            source={video}
            ref={(ref) =&gt; { this.player = ref }}  
            repeat={true}
            resizeMode={"contain"}
            style={{
                width: this.state.screenWidth,
                height: this.state.heightScaled,
             }}
            onLoad={response =&gt; {
                  const { width, height } = response.naturalSize;
                  const heightScaled = height * (this.state.screenWidth / width);
  
                  response.naturalSize.orientation = "horizontal";
                  this.setState({ heightScaled: heightScaled });
            }}
         /&gt;
  &lt;/View&gt;
  </code></pre>
  
  <p><strong>styles</strong></p>
  
  <pre><code>videoView: {
    flex: 1,
    width: Dimensions.get('window').width,
    height: 350
  }
  </code></pre>
  
  <p>I'm fetching video from api and then using it in a video component using <code>react-native-video</code>. I don't know how I can resize my video to fit in a view without stretching the video.</p>
  
  <p>Here is the result of the above code.</p>
  
  <p><a href="https://i.stack.imgur.com/jpdrR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jpdrR.png" alt="enter image description here"></a></p>
  
  <p>I don't want my video to cross the red line I marked in the image.
  Please help me. I'm stuck on this problem from the past 3 days.</p>