Stop YouTube video using external button

Hi.

I am trying to stop a YouTube video from running after closing a Lightbox.
I tried using these codes which I found in the forum.
But it’s not working. Can someone assist please?

<script>
  $(document).ready(function() {
  	var src = $('#yalevideo').children('iframe').attr('src');
  	$('.overlay-close-wrapper').click(function() {
    	$('#yalevideo').children('iframe').attr('src', ' ');
  	});
    $('#yalebtn').click(function() {
    	$('#yalevideo').children('iframe').attr('src', https://youtu.be/l8ahH3FPCM);
  	});
  });
</script>

Anyone able to help?

2 weeks passed. Still no one able to respond? :sob::sob::sob: