Video - have a GIF preview play when hovering over a video

Is this possible? Could it be achieved by layering widgets or custom code?

Looking to achieve something similar to the video previews in this website -

You can add custom thumbnails to R/m video widget. Maybe you can upload a GIF as the thumbnail?

with build in RM tools this might not work. Maybe with the shots widget and “play on hover”.
In general on your example page it is not gifs, but short videos. Also a gif you cannot trigger to “play” it plays on its own. so forget about using gifs.

I think the cleanest approach would be to use your own code.
Insert all previewvideos as html5 video and set up a small jaavascript that plays the videos on hovering itself and stop it if not.

how to set this up you could find all neccessary codestuff e.g. on stackoverflow and codepen.
Also I would suggest to host the videofiles on your own server. But vimeo, like in your example would also work.