Solved

CROSS DOMAIN POLICY

Posted on 2013-01-17
11
816 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.

751 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