I'm fairly new to React Native development, and I'm trying to include a video player in my mobile app. I created the application with create-react-native-app
and have been viewing it in Expo by running npm start
.
However, when I try to use packages like react-native-video
, react-native-video-controls
, and react-native-video-player
, I get the following warning: "Warning: Native component for "RCTVideo" does not exist." Example usage:
import VideoPlayer from 'react-native-video-controls';
export default class App extends React.Component {
render() {
return (
<View>
<VideoPlayer source={{uri: './media_files/Intro'}}/>
</View>
);
}
}
When I look up RCTVideo, I find solutions saying I should add RCTVideo.xcodeproj
to my XCode project. As far as I know, this suggests that I should have ejected the application before trying to run video. Is this correct? And is there any way around that?