I'm needing to rotate my video screen as soon as I press my video's fullscreen button in expo-av. My code is:
import { StatusBar } from 'expo-status-bar';
import * as React from 'react';
import { View, StyleSheet, Dimensions, } from 'react-native';
import { Video, } from 'expo-av';
const { width, height } = Dimensions.get('window');
export default function Playlist(){
const video = React.useRef(null);
const [status, setStatus] = React.useState({});
return(
<View style={styles.container}>
<StatusBar style='light' />
<View style={styles.containervideo}>
<Video
ref={video}
style={styles.video}
source={{
uri: 'http://168.232.157.7:65081/12Apostolos/video.m3u8',
}}
useNativeControls={true}
resizeMode="contain"
onReadyForDisplay={}
orientation="ladscape"
shouldPlay={false}
isLooping={false}
onPlaybackStatusUpdate={status => setStatus(() => status)}
/>
</View>
</View>
)
}
How can I rotate the video depending on device orientation? And I need it to rotate as soon as I press the full screen button.