Videos continuing to play sound after closing a Lightbox can be a common experience in Webflow. You can resolve this by ensuring the video stops or pauses when exiting the Lightbox. Here’s how to approach it:
```javascript
<script>
document.addEventListener('DOMContentLoaded', function() {
var lightboxLinks = document.querySelectorAll('.w-lightbox');
lightboxLinks.forEach(function(link) {
link.onclick = function() {
setTimeout(function() {
var closeButton = document.querySelector('.w-lightbox-close');
closeButton.addEventListener('click', function() {
var iframe = document.querySelector('iframe');
if (iframe) {
var src = iframe.src;
iframe.src = src; // Reset the source to stop the video
}
});
}, 500);
}
});
});
</script>
```
To stop a video noise after exiting a Lightbox in Webflow, utilize custom JavaScript to reset the video source upon closing the Lightbox. Insert the code in the Before </body> tag section of the Page Settings. Ensure to test the changes for effectiveness.