Reputation: 1171
Facing problem while adding video to my App I have installed react-native-video
and have linked via react-native link
in project folder
import React, {Component} from 'react';
import {View, Text, StyleSheet} from 'react-native';
import {Video} from 'react-native-video';
import LightVideo from "./big_buck_bunny.mp4"
export default class App extends Component {
render() {
return (
<View >
<Text > React Native Video </Text>
<Video
source={LightVideo}
resizeMode="cover"
style={StyleSheet.absoluteFill}
/>
</View>
);
}
}
Error message image --> Screen shot of error message
Upvotes: 0
Views: 186
Reputation: 1006
Instead of default import, you are doing named import.
Use
import Video from 'react-native-video';
instead of
import {Video} from 'react-native-video';
Upvotes: 1