Embedded vimeo play in viewport code not working

Hi everyone

I am designing a website with several looping videos at each section of the page. I have found some code that pauses any video on the page that isn’t currently in the viewport which can be found here: https://jsfiddle.net/ptc1qy0m/

I am struggling to replicate this in webflow. When looking at the exported code it adds several class names to the embedded iframe, not sure if this is causing the issue or not?

Thanks for any help in advance!


Here is my site Read-Only: View