title: how to handle local video files Reactjs
body: <p>I need some help to handle local video files in reactjs... can't resolve ./assets/video.mp4 error... tried every possible direction..</p>
  <p>the idea behind this is to make a full screen video like <a href="https://www.w3schools.com/howto/howto_css_fullscreen_video.asp" rel="nofollow noreferrer">https://www.w3schools.com/howto/howto_css_fullscreen_video.asp</a>
  but with Reactjs.</p>
  <p>video.js</p>
  <pre><code>       import React from 'react';
  
         class Video extends React.Component {
         render(){
            return(
               &lt;div className=&quot;myVideo&quot;&gt;
                   &lt;video controls autostart autoPlay src={this.props.src} type={this.props.type}/&gt;
              &lt;/div&gt;
               )
             }
           }
  
           export default Video;
  </code></pre>
  <p>index.js</p>
  <pre><code>      import React,{Component} from 'react';
  import ReactDOM from 'react-dom';
  import Video from './video';
  import Robin from './assets/Robin.mp4'
  
  const VIDEO = {
    src:Robin,
    type:'video/mp4'
   };
  
  class App extends Component {
     constructor(props){
       super(props)
       this.state = {
         src: VIDEO.src,
         type:VIDEO.type
       }
     }
  
     render(){
       return(
         &lt;div&gt;
           &lt;Video src={this.state.src} type={this.state.type}/&gt;
         &lt;/div&gt;
       )
     }
  
  }
  ReactDOM.render(&lt;App /&gt;, document.getElementById('root'));
  </code></pre>
  <p>console error:</p>
  <blockquote>
  <p>./src/index.js Module not found: Can't resolve './assets/*.mp4' in
  'C:\Users\sanjs\Desktop\landing-video\src'</p>
  </blockquote>