/    Sign up×
Community /Pin to ProfileBookmark

Auto play video when mouse is over (hover)

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 https://www.motionvfx.com/store%2Cmtuber-2%2Cp2670.html?page=2

I found about this web that explains about react hover video player https://www.npmjs.com/package/react-hover-video-player

divi allows us to add JavaScript and jQuery if we add <script></script> ( tutorial is here https://divi.space/tutorials/how-to-add-javascript-and-jquery-to-divi/ )

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” />
}
/>
);
}

https://divi.space/tutorials/how-to-add-javascript-and-jquery-to-divi/

to post a comment
CSSHTMLJavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@VITSUSAJan 20.2021 — Click on the mentioned hyperlink it will more helpful to you -

https://www.wpzoom.com/documentation/reel/reel-autoplay-video-on-hover/
Copy linkTweet thisAlerts:
@yunakokimamaauthorJan 24.2021 — Thank you! I looked at the website. The video becomes a little dark when mouse is on hover. I want to clear video like this https://www.renderforest.com/templates or https://promo.com/?force-hp=1&utm_content=unified_homepage

Can you show me which javascript they use. I want to do the same with the website.
×

Success!

Help @yunakokimama spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...