V
V
vohaha2015-10-25 17:27:37
JavaScript
vohaha, 2015-10-25 17:27:37

How to determine if the "click to play" option for Flash is enabled via js?

The task is to make a preview image for flash if the browser has "click to play" for the flash plugin. That is, similar to the video tag with the poster attribute ( codepen.io/anon/pen/NGYdpY ). Maybe there is some best practice for this case...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mark Doe, 2015-10-25
@vohaha

For example, you can create a script on the page, and a certain flag (let's call it isFlashShown), which is equal to zero by default. Then, after loading the script, run something like the following code

setTimeout(function(){
   if(!isFlashShown){
       //показываем постер
   }
},2000);

And in the flash movie, in turn, when loading using getUrl or ExternalInterface , immediately change the isFlashShown flag to true when the movie starts. Then, if the flash is not displayed (the flag will not change accordingly) - it is possible to show a banner

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question