Modal window with Youtube video stop playing the video

I have problems with playing a Youtube video in Magneto 2.2 Store using a modal pop-up to display the video.

Here's what I use for the modal window:

The problem is that after closing the modal mode, the video continues to play.
I've tried removing the iframe, but it ends up deleting all iframes if there is more than one modal on a cms page.
This is to say:

    $ (". action-close"). click (function () {
$ ("iframe"). remove (); //For the safety

Thanks in advance !!