Go
Not registered? Sign up!

External config xml does not work.

Google Translate
5 posts | return to the Setup Problems forum | get the rss feed for this thread

Nov. 06, 2009Wouter

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?

Nov. 06, 2009hobbs

 
<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.

Nov. 06, 2009Wouter

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

Nov. 06, 2009hobbs

 
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>

Nov. 07, 2009Wouter

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.

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? 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.