Check out example codes for "Background Video.module.css'". It will help you in understanding the concepts better.

Code Example 1

video.fullscreen { 
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -100;
  transform: translate(-50%, -50%);
}

Code Example 2

<video
  src="#defer-loading"
  poster="nice-default.jpg
  autoplay
/>

Learn ReactJs, React Native from akashmittal.com