title: how to play local mp4 video in react native
body: <p>Here In my code I am trying to play video from my local . I have stored one mp4 video in my code file. I have imported it where I have to play it . I am passing correct value but video is not coming on screen .
  Only on blank screen is coming .</p>
  <p>export const TRAININGVIDEO = require('./tutorialvid.mp4')</p>
  <pre><code>import Video from 'react-native-video';
  import { TRAININGVIDEO, USER_LOGIN } from '../../images';
  
  const deviceHeight = Dimensions.get('window').height;
  
  
  export default class TrainingAndGuide extends Component {
    constructor(props) {
      super(props)
      this.state = {
        isLoading: false,
        title: &quot;Training Guide Video&quot;,
        icon: 'settings',
        iconType: 'MaterialCommunityIcons',
      }
    }
  
    render() {
      const { updateResponse, navigation, trainigVideos } = this.props;
      const { title, icon, modalVisible } = this.state;
      return (
        &lt;ImageBackground source={BG} style={{ width: '100%', height: '100%' }} resizeMode=&quot;cover&quot;&gt;
          &lt;View&gt;
            &lt;Header title={title} icon={icon} navigation={navigation} /&gt;
          &lt;/View&gt;
        
            &lt;View style={{
              alignItems: 'center',
              justifyContent: 'center',
              backgroundColor: '#fff',
              width: &quot;100%&quot;,
              height: '50%'
            }}&gt;
  
              &lt;Video source={{ TRAININGVIDEO }}   // Can be a URL or a local file.
                ref={(ref) =&gt; {
                  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.backgroundVideo} /&gt;
  
            &lt;/View&gt;
         
        &lt;/ImageBackground&gt;
  
      )
  
  
    }
  }
  
  var styles = StyleSheet.create({
    backgroundVideo: {
      position: 'absolute',
      width: &quot;100%&quot;,
      height: &quot;50%&quot;
    },
  });
  </code></pre>