Solved

CROSS DOMAIN POLICY

Posted on 2013-01-17
11
803 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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 …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 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

12 Experts available now in Live!

Get 1:1 Help Now