I'm working on a cast web receiver application that shows an advert when the user pauses. On a Google TV, when the user presses the Google Assistant button on the remote, it shows dialogue at the top and pauses the current media. Because this isn't a true pause and the dialogue obscures a portion of the advert, we don't want the advert to appear (often because the voice command takes the user elsewhere and they don't see the ad, causing a false impression).
The web receiver is contained within the Google TV and cannot access OS functions. I can detect whether it's on a Google TV by seeing whether the media UI controls are an element in the DOM (<touch-controls>...</touch-controls>
). However, the DOM doesn't contain the Google Assistant dialogue, so I can't use that to detect whether the Google Assistant is active.
In this answer, CygnusOlor described a method to tell whether the Google TV is pausing by adding information to the customData
, but that doesn't solve the problem of determining when the Google Assistant is active. CygnusOlor also said that the pause commands from the remote and Google Assistant are indistinguishable, so that solution won't work for my needs.
Is there any way to check whether the Google Assistant dialogue is active? I am afraid that this is not possible, but someone may have some info. Thank you for your time!