I am building website with divi builder. I want to make website with video that plays automatically when mouse is over (hover) without clicking .
here is a example
I found about this web that explains about react hover video player
divi allows us to add JavaScript and jQuery if we add <script></script> ( tutorial is here
can I add this code following the website (react hover video player). But it is npm. Is it compatible with wordpress? please let me know where I can add this code in WordPress. I have been struggling for 2 days. Hope someone can help!!!
import HoverVideoPlayer from ‘react-hover-video-player’;
function MyComponent () {
return (
<HoverVideoPlayer
videoSrc=”path-to/your-video.mp4″
pausedOverlay={
<img src=”thumbnail-image.jpg” alt=”” />
}
loadingOverlay={
<div className=”loading-spinner-overlay” />
}
/>
);
}