document.querySelector and test the functionality by publishing the site.To resolve the issue of YouTube video sound continuing after closing a pop-up modal in Webflow, you'll need to properly configure the modal's close action to stop the video playback.
Here's an inline explanation: Use document.querySelector to select the video iframe and call the pause method or set the src to an empty string when the modal close button is clicked.
Ensure the YouTube video inside a Webflow modal stops playing after closing by adding custom JavaScript that targets the iframe element and controls its playback state when the modal is dismissed.