I made a layer that shows up by clickin a button. On that layer I have embedded Youtube video. If you click play on the video, but decide to close the layer the sound from the Youtube video keeps playing.

Is there a way to get rid of this problem? I would really like to use layers to have youtube videos, but it's not so convenient for the user because they would need to stop the youtube video manually by themselves before closing the layer. And 99% user will only close the layer and wonder why the audio from the video is still playing and get annoyed.

Thanks!