How to stop playing webgl game in html code block?

Hello,
I have a webgl game embedded from itch io in an html code block.
It is hidden and collapsed by default, and when user presses a button it shows and expands and the html properly loads and the game runs.
When the user presses the button again the html element properly hides and collapses, but the game is still running and the sound is playing.
I’d like the game to stop running.
How would I achieve this?
Thanks! :slight_smile:

Do you put any code inside the html widget or just use a URL source?
Do you want it to pause or to stop (meaning, next time it’ll start from the beginning)?

Thx for the reply! I’m embedding my html5 game from itch io.
Here’s the code I put in it.

<iframe src="game_URL_is_here?color=333333" allowfullscreen="" width="100%" height="100%" frameborder="0"><a href="another URL here">Play on itch io</a></iframe>

I’d like to it stop completely and hopefully release all it’s data from memory.

It looks like you created an iframe inside Wix iframe. Is it true? You added an embedded widget, which is an iframe, and you put the

@jonatandor35 Thx for the info, I didn’t realize I was putting an iframe in an iframe. is there a way to reference the iframe that the html code is in inside the html code itself?
Ideally I would like to be able to disable the iframe in the DOM and also enable it again without a page refresh.
But maybe removing it from the DOM and requiring page refresh is the only way?
I appreciate your help. :slight_smile: