Hello
I am trying to implement a playback on hover function with javascript on a Cornerstone page.
The page is supposed to look different from the rest of my site:
http://www.moloton.com/martin-test2/
I’ve declared a class for the video player, ‘video1’, and tried using this javascript in the Cornerstone customizer to make it work:
var figure = $(".video1").hover( hoverVideo, hideVideo );
function hoverVideo(e) {
$(‘video1’, this).get(0).play();
}
function hideVideo(e) {
$(‘video1’, this).get(0).pause();
}
But it doesn’t seem to work. What am I doing wrong? I’ve tried a lot but it seems like there is something in Cornerstone that overrides it. I’ve also tried this with ‘.mejs-overlay-play’. It would be alright if it was a code that was universal for all videos.
Thank you so much beforehand
All the best,
Linus