for html5 video elements?
<script>
window.laytheme.on("newpageshown", function(){
jQuery('video').on('mouseenter', function(){
this.pause();
}).on('mouseleave', function(){
this.play();
})
})
</script>
Enter this css in "lay options" -> "custom css & html" -> "custom head content"
autoplay must be on
mute must be on
[image: 1743434842795-screenshot-2025-03-31-at-17.27.20.png]
this way the video will play at first and when you mouseover it pauses. then when you move mouse away it plays again