Oct. 28, 2009Shaq015
Hi!
I have JW FLV Player and it works fine, but not in IE8. There comes error:
HTML Parsing Error: Unable to modify the parent container
element before the child element is closed (KB927917)
I read somewhere that error comes where javascript is put in div... So im wondering how can i change my code...
<script type='text/javascript' src='/player/swfobject.js'></script>
<div id='mediaspace'>KevJumba</div>
<script type='text/javascript'>
var so = new SWFObject('/player/player.swf','mpl','255','395','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://gdata.youtube.com/feeds/api/users/kevjumba/uploads');
so.addVariable('frontcolor','0D507A');
so.addVariable('lightcolor','0000CC');
so.addVariable('screencolor','0000CC');
so.addVariable('playlist','bottom');
so.write('mediaspace');
</script>
Thanks for help
Oct. 28, 2009Zachary Ozer
Which version of SWFObject are you using? Can you post a link to the page demonstrating the error?
Oct. 28, 2009Shaq015
I was using 1.5.
Now i changed first line to :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
and now it works as it should! Thank you anyway, that tip answered my problem!
I have another question...
Can you set default picture for video player... So before you click there it would be picture(logo all over the video box) and when you click on it, it plays normaly?
Oct. 28, 2009Shaq015
HAhahaha! (probably aint funny :/ )
IT didnt work, it worked once, and now it does not work anymore :(
Any tips?
thanks
Oct. 29, 2009Shaq015
anyone?
Oct. 29, 2009hobbs
I highly recommend that you load swfobject v2.2 from Googles CDN using this code:
<script src="http://www.google.com/jsapi"></script>
<script>
google.load('swfobject', '2.2');
</script>
Then place this Flash content embedding code in the head element of your HTML document:
<script type="text/javascript">
var flashvars =
{
'file': 'http://gdata.youtube.com/feeds/api/users/kevjumba/uploads',
'frontcolor': '0D507A',
'lightcolor': '0000CC',
'screencolor': '0000CC',
'playlist': 'bottom',
'id': 'playerID'
};
var params =
{
'allowscriptaccess': 'always',
'allowfullscreen': 'true'
};
var attributes =
{
'id': 'playerID',
'name': 'playerID'
};
swfobject.embedSWF('/player/player.swf', 'player', '255', '395', '9.0.124', false, flashvars, params, attributes);
</script>
And place this HTML division element in the body element of your HTML document where you want the player to appear:
<div id="playercontainer" class="playercontainer" ><a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>
Until somebody fixes the Forum, do a search & replace in your code editor to replace all of the backslashes in front of the single & double quote symbols.
Oct. 29, 2009Shaq015
Thank you very much!
Now i rechecked and it works as it should! Thank you also for taking your time and filling those fields(atributes,params....)
Regads
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.