Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CROSS DOMAIN POLICY

Posted on 2013-01-17
11
Medium Priority
?
855 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

886 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