How do I check if game is hidden?

General Question:

How do I check to see if the game is hidden? I see the check for “Game has just resumed”. But i don’t see a check for the game going to that hidden state in the first place.

My specific problem:

Because of how GDevelop, Safari, and HTML5 treat videos I have to do some very “wonky” things to get videos to work across all devices (specifically for an iPad). One of them is to use a video with absolutely no audio attached to it all, upload the audio as a separate isolated file, and sync the two using an object timer on the video. (using video duration or current time doesn’t work).

So everything works fine as long as the person uses my built-in pause button on that video scene. But if they visit or open a new tab for a long period of time (greater than sixty seconds), then things get out a sync. What I need is way to detect if the game is no longer visibile or essentially in a “paused” state. I could use this answer, but that is global listener and I really only want it for this one scene where I have my video. Plus I don’t want to have to edit my code every single time I make a small update and need to export it.

I want to simply be able to say:

IF: game is hidden

THEN: pause the sound of channel 10, pause the video “MyVideo”, pause the object timer “customVideoObjectTimer” on “MyVideo”