I've spent couple of hours trying to debug this and at this point I am certain that jquery and flashembed conflict somehow and cause unexpected loading timings/events. In our projects we heavy rely on jquery and so far we didn't have any problems with flowplayer.js and jquery. Until today.
We had to embed flowplayer as wmode=transparent and the hell broke loose! Instead of nice player I was getting transparent white loading wheel in firefox:
http://www.nivas.hr/pub/flowbugs/3.1.3/wmode-firefox.jpg
http://www.nivas.hr/pub/flowbugs/3.1.3/wmode-opaque.jpg
This works:
$(document).ready(function() {
flowplayer(".player", {src:"flowplayer.commercial-3.1.3.swf"});
})
But setting wmode:'transparent' screws things up badly (gives loading circles):$(document).ready(function() {
flowplayer(".player", {src:"flowplayer.commercial-3.1.3.swf", wmode:'transparent'});
})
I think it's a TIMING issue, because I've put couple of alerts(); before flowplayer call and damn thing showed up.MANY hours later I found out that this will show flowplayer in wmode=transparent in firefox every time in a simple example file (this however didn't work when I implemented it in one large site we are building):
<script type="text/javascript" src="flowplayer-3.1.4.min.js"></script>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
flashembed.domReady(function() {
$f(".player", {bgcolor:'#112233', src:"flowplayer.commercial-3.1.3.swf",wmode:'transparent'}, { });
Notice the order of js load - flowplayer, then jquery. IF you put jquery first - wmode=transparent fails! And swf is loaded on flashembed domready, and not jquery's $(document).ready(function() (jquery dom ready fails!).I think I browser every page on flowplayer.org which mentions jquery, and there is no info which lib should be loaded first, or which dom ready should be used.
I guess all those problems only occur when using wmode transparent or opaque, so it isn't easy to spot.
Any feedback would be greatly appriciated. Right now I am using <object> and <embed> tags again to embed flash.
Best regards
Neven | nivas.hr