react-native-theoplayer icon indicating copy to clipboard operation
react-native-theoplayer copied to clipboard

Layout position incorrect when placed in container view

Open IjzerenHein opened this issue 3 years ago • 1 comments

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

image

where you would expect:

image

I only tested this on tvOS

Repository containing the example and workaround: https://github.com/IjzerenHein/ReactNativeTheoplayerKeyboardIssue

IjzerenHein avatar Aug 05 '22 12:08 IjzerenHein

@IjzerenHein Is this still an issue for you? Or can this ticket be closed?

wvanhaevre avatar Nov 06 '23 09:11 wvanhaevre

Closing this issue as there has been no recent activity.

tvanlaerhoven avatar Oct 31 '24 14:10 tvanlaerhoven