Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

JW7 player fails to Embed


Hi There,

The file below is named: jw7.html and I have it in an AWS S3 bucket with the other relevant JW7 files. I have an AWS Cloudfront distribution of this bucket.

1/When I launch https://d1q5prbh825lra.cloudfront.net/jw7.html with a browser the jw7 player works perfectly. You can confirm this for yourself as I have left it setup.

2/Unfortunately when I embed the jw7.html file into a webpage I get a red rotating ring and the file doesn't play.

3/When I substitute the jw7 player with a jw6 player in the html file below below it all works perfectly.

Any ideas why the JW7 player fails when embedded............Thanks Murray

<HTML>
<HEAD>

<script type='text/javascript' src='https://d1q5prbh825lra.cloudfront.net/jwplayer.js'></script>
<script>jwplayer.key="moCaUOD96kAfffT15NaurYZfpyQYrJgXBZZyFA==";</script>

</HEAD>

<BODY>

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "rtmp://s21el67fdvhs3s.cloudfront.net/cfx/st/sample.mp4"
});
</script>

</BODY>
</HTML>



10 Community Answers

mark

User  
0 rated :

Do not serve the JW script through Cloudfront.
Use only an S3 bucket location not Cloudfront.
The .swf file is forbidden access because you haven't setup the origin access passthrough for the file crossdomain.xml ( if indeed you have one) to go from the cloudfront to the S3

Just change the URL from the cloudfront URl to the S3 URL of the JW script location and it should work.

murrayhills

User  
0 rated :

Hi Mark,

I think I did what you suggested. I replaced:
https://d1q5prbh825lra.cloudfront.net/jwplayer.js
with:
https://s3-ap-southeast-2.amazonaws.com/murray-jw7/jwplayer.js
in the jw7.html file.

but unfortunately the jw7.html file still fails when embedded.

What else can I try???

Thanks................Murray


mark

User  
0 rated :

It's working now that you changed it on my computer

mark

User  
0 rated :

Also, you should change the rtmp to rtmpe since you'r loading over https

murrayhills

User  
0 rated :

Hi Mark,

This is a puzzle for me because I can't get it working when embedded. So I will run through it again. I have renamed my html file to test1.html which is shown below.

1/When I launch https://d1q5prbh825lra.cloudfront.net/test1.html with a browser the jw7 player works perfectly. You can confirm this for yourself as I have left it setup.

2/Unfortunately when I embed the test1.html file into a webpage I get a red rotating ring and the file doesn't play.

Are you saying you can get point 2/ above working??

Please advise.................Thanks Murray

<HTML>
<HEAD>
<script type='text/javascript' src='https://s3-ap-southeast-2.amazonaws.com/murray-jw7/jwplayer.js'></script>
<script>jwplayer.key="moCaUOD96kAfffT15NaurYZfpyQYrJgXBZZyFA==";</script>
</HEAD>

<BODY>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "rtmpe://s21el67fdvhs3s.cloudfront.net/cfx/st/sample.mp4"
});
</script>
</BODY>

</HTML>


murrayhills

User  
0 rated :

Hi Mark,

Just one more thing. This is the link to the failed embed.

http://primesecurity.co.nz/test1.html

I look forward to finding out where I'm going wrong.

Thanks..................Murray

mark

User  
0 rated :

I didn't quite understand what you meant by embed into page. I don't understand why you give me one page working but the problem page was somewhere else.
Anyhow, I can see now that you are loading scripts ( on the second page) over https but the page itself is over http - this won't work, they need to be both https or both http
If this domain does not have a SSL certificate then you will have to revert to loading the scripts over http including reverting back to rtmp not rtmpe
Also, there is no DOC TYPE in the head of page, please fix that

murrayhills

User  
0 rated :

Hi Mark,

I was just using a separate html page for convenience to check the html code before embedding it into a php page.

Anyhow, it all works now that I have changed the loading of scripts to http. So my final successful html file which I now call test2.html is:

<!doctype html>
<HTML>
<HEAD>
<script type='text/javascript' src='http://s3-ap-southeast-2.amazonaws.com/murray-jw7/jwplayer.js'></script>
<script>jwplayer.key="moCaUOD96kAfffT15NaurYZfpyQYrJgXBZZyFA==";</script>
</HEAD>

<BODY>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "rtmp://s21el67fdvhs3s.cloudfront.net/cfx/st/sample.mp4"
});
</script>
</BODY>

</HTML>

and this link link works:
http://primesecurity.co.nz/test2.html

Thanks you so much Mark for all your help.

Best Regards....................Murray

mark

User  
1 rated :

You're welcome Murray. Glad you have it sorted

Samantha

User  
0 rated :

I was just looking at your JW7 player fails to Embed | JW Player website and see that your website has the potential to get a lot of visitors. I just want to tell you, In case you didn't already know... There is a website service which already has more than 16 million users, and the majority of the users are interested in websites like yours. By getting your site on this network you have a chance to get your site more popular than you can imagine. It is free to sign up and you can find out more about it here: http://jawaidali.com/redirectURL/5d - Now, let me ask you... Do you need your website to be successful to maintain your business? Do you need targeted visitors who are interested in the services and products you offer? Are looking for exposure, to increase sales, and to quickly develop awareness for your site? If your answer is YES, you can achieve these things only if you get your website on the service I am talking about. This traffic service advertises you to thousands, while also giving you a chance to test the service before paying anything. All the popular blogs are using this network to boost their traffic and ad revenue! Why aren’t you? And what is better than traffic? It’s recurring traffic! That's how running a successful site works... Here's to your success! Read more here: http://bbqr.me/4fx6

This question has received the maximum number of answers.