Solved

CROSS DOMAIN POLICY

Posted on 2013-01-17
11
810 Views
Last Modified: 2013-01-17
Hello experts
I'm using jwplayer to show fl files from youtube.
I'm getting the following error:
task queue failed at step 5 playlist could not be loaded
look:
http://www.petalaki.gr/%CE%BA%CE%B5%CF%81%CE%B4%CE%AF%CF%83%CF%84%CE%B5-%CE%AD%CE%BD%CE%B1-ipad-4-16gb/1468

Looking at the doc's i got this:
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12541/crossdomain-file-loading-restrictions/

I tried to add a crossdomain.xml file including:
 <?xml version="1.0"?>  
    <cross-domain-policy>  
    <allow-access-from domain="*" />  
    </cross-domain-policy>
But is doesn't work

I read somewhere that i can use cfheader and Access-Control-Allow-Origin: *
Any help?
0
Comment
Question by:Panos
  • 6
  • 5
11 Comments
 
LVL 15

Expert Comment

by:Tomarse111
ID: 38786680
I found this in another thread on a  forum:

The issue here is that you can't put http://www.youtube.com/results?search_query=apm+bar%C3%A7a&aq=0 as the file flashvar, as it is just a YouTube Search Query. That will not work.

Refer to the YouTube API Developer Guide - http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html

http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-embedding/13344/task-queue-failed-at-step-5-playlist-could-not-be-/

This seems to be a similar problem to the one that you are having
0
 
LVL 15

Expert Comment

by:Tomarse111
ID: 38786686
This may help:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/15994/playing-a-youtube-video/

The video on youtube must be allowed to be played externally as well
0
 
LVL 2

Author Comment

by:Panos
ID: 38786688
Hi.
In source code you can see the youtube url.
where is the problem?
https://www.youtube.com/tv?vq=medium#/watch?v=xkcuSfquQRY&mode=transport
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 15

Expert Comment

by:Tomarse111
ID: 38786701
Also I knocked up a quick test below and that works fine:


<html>
<head>
<title>Test</title>
</head>

<body>   
   
 <div id="mediaplayer">JW Player goes here</div>
</div>
<script type="text/javascript" src="http://www.petalaki.gr/media/jwplayer.js"></script>

<script type="text/javascript">
  jwplayer('mediaplayer').setup({
    'flashplayer': 'http://www.petalaki.gr/media/player.swf',
    'id': 'playerID',
    'width': '480',
    'height': '360',
    'file': 'http://www.youtube.com/watch?v=xkcuSfquQRY',
    'controlbar': 'bottom'
  });
</script>
   
</body>
</html>

Open in new window


SO think it may with one of your other attributes:
0
 
LVL 2

Author Comment

by:Panos
ID: 38786705
Tomarse111
///The video on youtube must be allowed to be played externally as well

Is there any comment on the youtube page if the file is allowed to be played externally ?
0
 
LVL 2

Author Comment

by:Panos
ID: 38786708
hmmm
you tested with a http request. can you try a https?
0
 
LVL 15

Expert Comment

by:Tomarse111
ID: 38786721
Hiya

Tested against https and put all of your attributes back in. The below works for me:

<html>
<head>
<title>Test</title>
</head>
<body>     
 <div id="mediaplayer">JW Player goes here</div>
<script type="text/javascript" src="http://www.petalaki.gr/media/jwplayer.js"></script>
<script type="text/javascript">
	var file = 'http://www.petalaki.gr/media/preview.jpg';
	jwplayer("mediaplayer").setup({
		'autostart': true,
		file: "https://www.youtube.com/watch?v=xkcuSfquQRY",
		image: "http://www.petalaki.gr/media/preview.jpg",
		'width': '580',
		'height': '420',
		'controlbar': 'bottom',
		'skin': 'http://www.petalaki.gr/media/skins/grungetape/grungetape.zip',
		'modes': [
			{type: 'flash', src: 'http://www.petalaki.gr/media/player.swf'},
			{type: 'html5'},
			{type: 'download'}
		]
	});
</script>   
</body>
</html>

Open in new window


Problems seems to be with your URL:

http://www.youtube.com/tv?vq=medium#/watch?v=xkcuSfquQRY&mode=transport

Does not work but

https://www.youtube.com/watch?v=xkcuSfquQRY

Does work
0
 
LVL 2

Author Comment

by:Panos
ID: 38786731
the url is https and is working. take a look:
https://www.youtube.com/tv?vq=medium#/watch?v=xkcuSfquQRY&mode=transport
0
 
LVL 15

Accepted Solution

by:
Tomarse111 earned 500 total points
ID: 38786744
Yep, I can see it works when you click on it but I do not believe you can include a /tv youtube link in jwplayer or any other player.

As you can see from the links above, the use the same actual video, the only difference is one is /watch and the to the other is /tv. IN fact the below works as well.

Works when embedded - https://www.youtube.com/watch?v=xkcuSfquQRY&vq=medium&mode=transport

Doesn't work when embedded - https://www.youtube.com/tv?vq=medium#/watch?v=xkcuSfquQRY&mode=transport

both are the same video though, just different ways of referencing it / viewing it.
0
 
LVL 2

Author Comment

by:Panos
ID: 38786757
Yes.
Thank you very much for your great help.
0
 
LVL 2

Author Closing Comment

by:Panos
ID: 38786762
thank you
regards
panos
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question