Play video while "mouse over" or hover


Is it possible to play a video only while the mouse hovers over the video area?

Thanks a lot.

(james koh) #2

sometimes it is better to google if it is about only javascript.
here is what i found.


Thanks @jameskoh

You could run a function ‘On Mouse Over’ using Hype’s built in Actions to run .play or .pause actions on the video. This article explains how to control video playback with JavaScript: Creating Play & Pause Buttons for Video

(Bas) #4

I use this in my video

On mouse over this code:

var mediaElement = document.getElementById('participationvideo');;

On mouse out:

var mediaElement = document.getElementById('participationvideo');

And of course you need to create the java function, give it a name and call it under the mous actions…

Hope this helps.