import sample from './sample.mp4';
<video className="videoTag" autoPlay loop muted>
<source src={sample} type="video/mp4" />
</video>
Thank the note that ‘autoplay’ should be changed to ‘autoPlay’ from Mr_Antivius.
This is an alternative way to play the video in React. It works for me. Remember that the sample.mp4 file is in the same directory of the JS file.