Solved

CROSS DOMAIN POLICY

Posted on 2013-01-17
11
800 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now