How do you detect that a Flash plugin has been temporarily disabled, or, conversely, detect that it has been enabled due to Chrome's "click-to-play" feature?
Chrome's new "click-to-play" feature detects plugins that are not visibly significant and pauses them. Chrome displays a "play" button over the plugin, a user may click the "play" button to activate the plugin. (reference: https://productforums.google.com/forum/#!topic/chrome/xPcpRBzyPcc)
Here's a screenshot of it in action (notice white play buttons):
You can see in this screen shot that it has paused a video-player (right column). That video player has HTML5-based controls overlaying a Flash-based video player. So, there's no way for a user to click the play-button as the entire SWF is purposefully covered by HTML5-based play/pause controls.
What I need is to detect when the SWF has been paused by the "click-to-play" feature so I can disable the controls and make the SWF interactive.
ExternalInterface
are still available though the SWF is paused. It actually responds like it's playing and does not return an error. <object>
to > 700x400px. "Click-to-play" does not pause a SWF of this size. So, I tried using -webkit-transfor: scale(0.5)
to use CSS to scale it back to desired size. Chrome calculates the final rendered size and pauses the SWF regardless.stage.frameRate
returns correct value (it's not set to 0 to pause the SWF for instance)In writing up this question I found an answer, decided to post here anyways in case others need help with this issue.
For the benefit of others who are looking for the rules around Flash blocking stuff,please see them below:
At least one of the above criterias need to be met, in order to get the content marked as Essential and not get Auto-Paused. Although, I have seen few deviations and Chrome hasn't made any public announcement on the rules yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With