Cornerstone hover video javascript

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

Nevermind, I got it working.

Still need help on responsive size for section like in my last post!

I want the section to zoom in even when changing width of the browser so that the overflow is never shown!
Like the background on this page: https://www.cstemplates.com/fullscreen-section/
Or on this one: http://mnesticpressure.leegamble.net/

On my page the width of the section lower so much so that it shows the overflow:

thank you again

Hello There,

Thanks for writing in! Please keep in mind that the video width is relative to the height. The height of the section on the other hand is dependent to the height of the column contents. Are you referring to the empty spaces shown in the image below?

What you have in mind may be possible with some custom JS that will alter the height as you resize the browser. Regretfully it could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this.

Thanks for understanding. Take care!