How to detect when Chrome's “click-to-play” Flash blocking feature is currently active

后端 未结 3 1598
天命终不由人
天命终不由人 2021-02-13 16:09

Tracking state of Chrome\'s Click-to-play feature

How do you detect that a Flash plugin has been temporarily disabled, or, conversely, detect that it has been enabled

3条回答
  •  轮回少年
    2021-02-13 16:31

    Add an empty Flash file larger than 398x298 at the bottom of your page. I found once you have at least one Flash file above their minimum Chrome will not pause any of your Flash. You cannot hide this extra Flash file with CSS. Optionally use a javascript timeout (3 seconds) to hide the empty Flash file in case it messes with your page layout. I'm using swfObject for embedding.

提交回复
热议问题