I am trying to autoplay a video when rendered, but only once. On the hover effect, I would like it to play the video with a loop. I have tried to use event.target.play() on mouseOver but have had no luck.
Any help would be greatly appreciated :)
<video
className="videos"
autoPlay={true}
onMouseOver={event => event.target.play()}
onMouseOut={event => event.target.pause()}
muted={true}
src={prompt}>
</video>