Menu icon Foundation
Modal with iframe video lazy load trouble

Hi

I am trying to lazy load youtube iframes into the reveal modals which seem to work well until the user closes the modal. The video loads and plays as expected but after closing the modal the video will replay in the background. Without the lazyload the modal correctly removes the iframe src.

Here is a link to a test page I've set up http://www.evdesign.co/lazyload/index.html

I have tried many ways of lazy loading the iframes, all with the same result.

Currently testing the code found here: http://codepen.io/SitePoint/pen/CKFuh

Any help would be greatly appreciated, Spent a lot of time on this and its driving me mad

Cheers
Chris

revealLazy loadVideomodaliframe

Hi

I am trying to lazy load youtube iframes into the reveal modals which seem to work well until the user closes the modal. The video loads and plays as expected but after closing the modal the video will replay in the background. Without the lazyload the modal correctly removes the iframe src.

Here is a link to a test page I've set up http://www.evdesign.co/lazyload/index.html

I have tried many ways of lazy loading the iframes, all with the same result.

Currently testing the code found here: http://codepen.io/SitePoint/pen/CKFuh

Any help would be greatly appreciated, Spent a lot of time on this and its driving me mad

Cheers
Chris