Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

config.xml for plugins | JW Embedder | JW Player 5.4


Hello

With an old JW Player I used swfobject.js to embed and then remove as many common variables as possible from the page to an external xml file (config.xml) like this:

bc.. flashvars.config = 'http://mydomain.com/jwplayer/config.xml';



Is this still possible with 5.4 ?

If yes, what is the syntax to the external file ?

I tried this:

bc.. config: "http://www.globaltimoto.com/Nav/Movies/JWPlayer/config.xml",



but got a "Task Queue failed at step 0: Error #2048"

25 Community Answers

JW Player

User  
0 rated :

Sorry, to keep it short:

An explicit URL gives me Error #2048

bc.. config: "http://mydomain.com/jwplayer/config.xml",



And a document relative URL gives me Error #2148

bc.. config: "../jwplayer/config.xml",



The documentation on the longtail site at this page:
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12536/configuration-options#configxml

States:

All options can be listed in an XML file and then fed to the player with a single option:

config ( undefined )
location of a XML file with flashvars. Useful if you want to keep the actual embed codes short.

There is no further information about how to point to the file.

Am I doing something wrong ?

JW Player

User  
0 rated :

Here is a link to the offending page:
http://globaltimoto.com/pages/movie_okochokwa.html

And this link is to the old setup that still works using my old config.xml file.
http://globaltimoto.com/pages/movie_okochokwa_old.html

JW Player

User  
0 rated :

bc.. config: "http://globaltimoto.com/jwplayer/config.xml",




*Note: NO "www" in the URI!*

JW Player

User  
0 rated :

Hello RRHelptrin

Actually "no www in the URL" makes no difference. The htaccess files on the website in question resolve that.

In any case I tested the URL with www just in case, in fact the link given still has that method of usage in place. http://globaltimoto.com/pages/movie_okochokwa.html

Any other ideas ? :)

Ethan Feldman

JW Player Support Agent  
0 rated :

I get this Flash Debug Error:

Error #2044: Unhandled error:. text=Task Queue failed at step 0: Error #2048: Security sandbox violation: http://globaltimoto.com/jwplayer/player.swf cannot load data from http://www.globaltimoto.com/jwplayer/config.xml.

hmmmm ;)

JW Player

User  
0 rated :

Thank you Ethan !

For those of you who would like a less cryptic response.

It was not that the xml file could not be resolved but the swf file.

Where as the support file shows that a document relative URL can be used:

bc.. "../jwfplayer/player.swf"



which doesn't work either, I can certainly not use

bc.. "http://globaltimoto.com/jwfplayer/player.swf"



but MUST use:

bc.. "http://www.globaltimoto.com/jwfplayer/player.swf"

Ethan Feldman

JW Player Support Agent  
0 rated :

Thanks, that is the issue. You should probably look up 301 re-directs on Google, it will help your site out a lot.

JW Player

User  
0 rated :

I think my host has been messing with my .htaccess file.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ahh…got it.

JW Player

User  
0 rated :

Nope according to my host I don't need to set a redirect for resolving globaltimoto.com to www.globaltimoto.com or any other URI that exists on the site without "www" prefixed.

But both

bc.. "http://globaltimoto.com/jwfplayer/player.swf"



and

bc.. "http://www.globaltimoto.com/jwfplayer/player.swf"



appear as broken links in a browser.

Yet the 2nd instance will get the player running, but the 1st not.

Does this really have anything to do with 301 re-directs ?

And this doesn't answer why it can't be document relative instead either which would be easier to manage eg:

bc.. "../jwplayer/player.swf"



Or is that just a limitation we have to live with ?

Ethan Feldman

JW Player Support Agent  
0 rated :

Ahhh, that is because the links are wrong.

http://globaltimoto.com/jwfplayer/player.swf is wrong.

Make it – http://globaltimoto.com/jwplayer/player.swf

You had an F there ;)

JW Player

User  
0 rated :

Doh !

But ok, http://globaltimoto.com/jwplayer/player.swf loads if I type it in the browser address bar

but not if it is in the JW Embedder setup, that doesn't work.

So how is that to do with 301 re-directs ?

Ethan Feldman

JW Player Support Agent  
0 rated :

So then in your code, reference that file as the “flashplayer” and it should work. If it doesn’t please provide a link.

JW Player

User  
0 rated :

This page:
http://globaltimoto.com/pages/test.html

points to:
http://globaltimoto.com/jwplayer/player.swf

and gives an error:#2048

but this page:
http://globaltimoto.com/pages/movie_okochokwa.html

points to:
http://www.globaltimoto.com/jwplayer/player.swf

and works.

Ethan Feldman

JW Player Support Agent  
0 rated :

Again, this is because you don’t have 301-re-directs set up.

Error #2044: Unhandled error:. text=Task Queue failed at step 0: Error #2048: Security sandbox violation: http://globaltimoto.com/jwplayer/player.swf cannot load data from http://www.globaltimoto.com/jwplayer/config.xml.



This is because you are loading the player.swf without www but loading a config file that has www.

If you aren't going to set up the redirects on your site, you will need to create a crossdomain.xml file here - http://www.globaltimoto.com/crossdomain.xml

JW Player

User  
0 rated :

OK Ethan

Thanks.

According to my host with or without "www" resolves to the same location ie. same domain.

Is it something in the player or flash that makes the decision not to accept this standard ?

P.S. sorry to drag this on, I'm just eager to learn.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np. Yes it does resolve to the same domain. Ask your host to set up a 301 re-direct on your site. It is important to do.

JW Player

User  
0 rated :

Ethan

Again

Is it something in the player or flash that makes the decision not to accept the standard resolution of the domain ?

What is the point of doing a 301 re-direct if the host already resolves non www URI ?

Ethan Feldman

JW Player Support Agent  
0 rated :

The player does not do this, this is up to the browser. It is very bad practice to not have a 301 re-direct set up.

JW Player

User  
0 rated :

Hi Ethan, but the point is that the host keeps telling me,

"why set up a 301 since we already resolve all non www to the domain ?"

Isn't it possible that if you setup a re-direct for something that is already managed in the root of the domain, that some sort of cyclic event will take place ?

Also if I point the browser to a non www location the URI is resolved as suggested by the host. But if I do it via the player setup then it doesn't, so is that really the browser or the player or something else ?

I'm not very clear on this at all.

Ethan Feldman

JW Player Support Agent  
0 rated :

The player does not control 301 re-directs.

If you site can be accessed with and without the “WWW” that is bad. Bottom line.

JW Player

User  
0 rated :

Really, why is that bad Ethan ?

Ethan Feldman

JW Player Support Agent  
0 rated :

If you don’t have 301 Redirects set up, when Google indexes your site, it will think that www.yoursite.com and yousite.com (without the www) are two separate sites. This is bad for SEO.

More information – http://www.webmarketingnow.com/tips/301-redirects.html

301 redirects are a common web practice and should be a standard thing that any webmaster does.

JW Player

User  
0 rated :

Ethan thank you for holding my hand on that one. :)

Ethan Feldman

JW Player Support Agent  
0 rated :

No problem :)

This question has received the maximum number of answers.