Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

External config xml does not work.

4 replies [Last post]

Hi. When i put the flashvars in de page code it works. But when i put it in the config xml file it doesnt. Talking about the link display vars. I am using JWPlayer 4.3.132. My config xml file is named config.xml.php.

Without config xml and working:

<script type="text/javascript" src="http://www.mysite.com/swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("http://www.mysite.com/player.swf","ply","520","410","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=http://www.mysite.com/media/video.flv&image=preview.jpg&skin=nacht4.swf&link=http://www.google.nl&linkfromdisplay=true&displayclick=link&linktarget=_blank");
s1.write('flashbanner');
</script>

With config xml and not working:

<script type="text/javascript" src="http://www.mysite.com/swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("http://www.mysite.com/player.swf","ply","520","410","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=http://www.mysite.com/media/video.flv&image=preview.jpg&skin=nacht4.swf");
s1.addVariable('config','http://www.mysite.com/config.xml.php');
s1.write('flashbanner');
</script>

config xml code:

<config>
<volume>50</volume>
<bufferlength>0</bufferlength>
<link>http://www.google.nl</link>
<linkfromdisplay>true</linkfromdisplay>
<displayclick>link</displayclick>
<linktarget>_blank</linktarget>
</config>

Very weird. Any suggestions?

 
<linkfromdisplay>true</linkfromdisplay>is a v3 player flashvar, not supported by the v4 player.

See: http://developer.longtailvideo.com/trac/wiki/FlashVars#Behaviour

Other than that, your player code and your configuration file look OK.

You will have to post a link to your Test Page so someone can help you further. We can't guess.

Huh where's my reply?? well heres the testpage again:

http://www.soppermedia.com/testplayer/

and the config from the test page is config.xml with this code:

<config>
<volume>50</volume>
<bufferlength>0</bufferlength>
<link>http://www.google.nl</link>
<displayclick>link</displayclick>
<linktarget>_blank</linktarget>
</config>

without the linkfromdisplay var but it still doesnt work

 
Plays OK for me:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">

  <head>

    <title>Testing.</title>

    <script src="http://www.soppermedia.com/testplayer/swfobject.js"></script>

  </head>

  <body>

    <div id="flashbanner"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>

    <script type="text/javascript">
      var s1 = new SWFObject("http://www.soppermedia.com/testplayer/player.swf", "ply", "520", "410", "9.0.124", "#FFFFFF");
          s1.addParam("allowscriptaccess",   "always");
          s1.addParam("allowfullscreen",     "true");
  s1.addVariable("file",             "http://www.soppermedia.com/testplayer/video.flv");
          s1.addVariable("image",            "http://www.soppermedia.com/testplayer/preview.jpg");
          s1.addVariable("config",           "http://www.soppermedia.com/testplayer/config.xml");
          s1.write('flashbanner');
    </script>

  </body>

</html>

Yea that does work, thats weird. The change that worked was defining the file and preview image as individual variables instead of the vars in a parameter... it means the same but somehow this made the change. Thanks.