Estoy tratando de renderizar video en un componente React Native usando react-native-video v5.2.0 . Recibo el siguiente error. Estoy usando la CLI nativa de reacción en OSX. La aplicación falla al intentar importar la biblioteca, línea:
import Video from 'react-native-video';El error:
Uncaught Error undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode')Captura de pantalla:
El código:
import React from 'react'; import {View, Text} from 'react-native'; import styles from './styles'; import Video from 'react-native-video'; const Post = () => { return ( <> <View style={styles.container}> <Text>Post</Text> <Video source={{ uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4', }} // Can be a URL or a local file. ref={ref => { this.player = ref; }} // Store reference onBuffer={this.onBuffer} // Callback when remote video is buffering onError={this.videoError} // Callback when video cannot be loaded style={styles.video} /> </View> </> ); }; export default Post;