Autoplay YouTube video on mouse hover in thumbnail

I have seen some theme offer autoplay youtube and Vimeo videos on thumbnail mouse hover. Here is some example Mayosis - Digital Marketplace WordPress Theme by TeconceTheme | ThemeForest and VidoRev - Video WordPress Theme by beeteam368 | ThemeForest, How can I enable it for other site?