react-native-theoplayer
react-native-theoplayer copied to clipboard
Layout position incorrect when placed in container view
In certain layout setups, the THEOplayerView is not positioned correctly according to the flex-box styling rules.
example:
const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text}>
Press enter to show the on-screen keyboard
</Text>
<TextInput style={styles.textInput} placeholderTextColor="#888888" />
<THEOplayerView style={styles.video} config={CONFIG} source={SOURCE} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#333333',
},
text: {
fontSize: 40,
color: 'white',
marginBottom: 20,
},
textInput: {
width: 800,
fontSize: 40,
padding: 8,
},
video: {
marginTop: 50,
width: 640,
height: 400,
},
});
which produces the following layout:
note that the height of the video-player also appears clipped here

where you would expect:

I only tested this on tvOS
Repository containing the example and workaround: https://github.com/IjzerenHein/ReactNativeTheoplayerKeyboardIssue
@IjzerenHein Is this still an issue for you? Or can this ticket be closed?
Closing this issue as there has been no recent activity.