Check out example codes for "html play video on hover". It will help you in understanding the concepts better.

Code Example 1

In HTML Document:
<video width='500' height='150'
       onmouseenter='VideoController(true, this)'
       onmouseleave='VideoController(false, this)'
       src="Videos/test.webm" loop>
  Your browser does not support the video tag.
</video>

In CSS:
const VideoController = function(isHovering, videoElement)
{
	if (isHovering == true)
    {
        videoElement.play();
    }
    else if (isHovering == false)
    {
        videoElement.pause();
    }
}

Learn ReactJs, React Native from akashmittal.com