Expo Video fullscreen rotation with native controls on Android not working

74 views Asked by At

Expo Video fullscreen rotation with native controls on Android not working. The application orientation is set to portrain the the app.json.

In iOS, it works perfectly, the app is in portrait and when video is played in fullscreen, auto rotation is enabled. But in Android, even on fullscreen mode, the orientation is locked into portrait.

How do I enable auto rotation in Android the same in iOS? Thanks in advance.

Here is my code

import { View} from 'react-native'
import React from 'react'

import {Video} from 'expo-av'

export  function VideoPlayer(props) {
     
  
    const {videoURL} = props;

  return (
    <View>
      {/* Video Component */}
      <Video 
        source={{uri: videoURL}}
        style={{
          width: '100%', 
          aspectRatio: 16 / 9, 
          alignSelf:'center', 
          borderRadius: 10,
          backgroundColor: "black"
        }}
        useNativeControls 
        resizeMode="contain"
        hideControlsTimeoutMillis={5000} 
      />
    </View>
  )
} 
0

There are 0 answers