Expo Video fullscreen rotation with native controls on Android not working


#1

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.

<Video
     source={{ uri: this.props.navigation.state.params.src }}
     rate={1.0}
     volume={1.0}
     isMuted={false}
     resizeMode={Video.RESIZE_MODE_CONTAIN}
     useNativeControls={true}
     style={styles.video}
     onError={this._onError}
     shouldPlay
     ref={(ref) => {
           this.player = ref
     }}
     />

#2

Hey @dealrtv,

Can you provide a small repro example of this as well as let me know what SDK version you are running? You could also try using the ScreenOrientation API to set it at orientation on a conditional basis. https://docs.expo.io/versions/v32.0.0/sdk/screen-orientation/

Cheers,

Adam


#3

Hey Adam. We are using “sdkVersion”: “32.0.0” already but the issue is still there. The ScreenOrientation is a nice solution but I only need to support landscape mode when Video is on fullscreen. There is no available event on Android to detect when the video is playing on fullscreen. We use native controls by the way.


#4

Got it, @dealrtv. I pinged another Expo team member about this and I’ll let you know when I find out more.


closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.