astro-embed
astro-embed copied to clipboard
Request/bug: pause playing the Youtube player when closing the modal
Hey,
The problem I have is the following:
- I embed the YouTube player into a modal (using DaisyUI)
- I open the modal and click play on the YouTube video
- I close the modal but the video keeps playing.
This is not how it should behave I think. This does not happen in React, for example. It should pause/stop the video instead when the modal is closed.
I don’t think this is related to this package? All this package does is embed an image that, when clicked, loads the standard YouTube <iframe>. If you’re using a <dialog>, you probably need to listen to the close event and stop playback I’d guess?