I have a flash player on my webpage that autoplay.The problem is that the video starts playing before other content on the page has loaded.I want make to wait till the webpage has loaded or after a maximum of 2 seconds
<object id="flowplayer" width="640" height="360" data="/flowplayer-3.2.18.swf" type="application/x-shockwave-flash">
<param name="allowfullscreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashvars" value='config={"clip":"URL goes here", "plugins": {"controls": {"autoHide" : false} }}' />
To start, I think that disabling the
autoplay
of your flowplayer can be the easiest way to avoid your problem. For theautoplay
option, take a look here.If you want always use javascript to load your flash content after some time, you can use, as you have already mentioned, the
display:none
like this :CSS :
And then, for javascript, when the page is loaded :
Or using Jquery :
And using a timeout :
Hope that can help.