title: How to change the video displaying orientation in expo-av?
body: <p>I'm using <a href="https://docs.expo.io/versions/latest/sdk/video/" rel="noreferrer"><code>expo-av</code></a> to display videos. The videos are played in <code>Portrait</code> and i'm trying to display the video depending on the <strong>device orientation</strong>. My code is :</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Video } from 'expo-av';
  import * as ScreenOrientation from 'expo-screen-orientation';
  import NavigationHelper from '../../../../Helpers/NavigationHelper';
  
  export default class VideoScreen extends Component {
    render() {
      const { route } = this.props;
      const { videoUri } = route.params;
  
      if (!videoUri) {
        NavigationHelper.back();
      }
  
      return (
        &lt;ScrollView style={styles.container}&gt;
          &lt;Video
            source={{ uri: videoUri }}
            rate={1.0}
            volume={1.0}
            isMuted={false}
            resizeMode={Video.RESIZE_MODE_CONTAIN}
            shouldPlay
            isLooping
            useNativeControls
            style={{ width: 300, height: 300, alignSelf: 'center' }}
            onReadyForDisplay={() =&gt; { const naturalSize = ScreenOrientation.Orientation.PORTRAIT ? { orientation: 'portrait' } : { orientation: 'landscape' }; }}
          /&gt;
        &lt;/ScrollView&gt;
      );
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>I've seen that <code>onReadyForDisplay</code> is  function to be called when the video is ready for display. The function is passed a dictionary with the following key-value pairs:
  <code>naturalSize</code>: a dictionary with the following key-value pairs:
  <code>orientation</code>: a string describing the natural orientation of the video data, either <code>portrait</code> or <code>landscape</code>.  I've used <code>expo-screen-orientation</code> to get the device orientation.</p>
  <p>How can i rotate the video depending on the device orientation ?</p>