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

Do someone have an example of the JS API to display 1 video?


Dear people,

Who have an example for me for embeding just 1 vid in HD by default? Or who can create it, tell me the cost :)

Thanks in advance, M

15 Community Answers

George

JW Player Support Agent  
0 rated :

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://content.jwplatform.com/libraries/7J1pdIcs.js"></script>

</head> <body> <div id="container">Loading Video…</div> <script> var playerone = jwplayer("container"); playerone.setup({ file:"http://content.jwplatform.com/videos/PxnoM5gE-720.mp4" width:"100%", aspectratio:"16:9", mediaid:"PxnoM5gE", image:"http://content.jwplatform.com/thumbs/PxnoM5gE-720.jpg", title:"KUNG FURY", description:"It takes a cop from the future to fight an enemy from the past.", }); </script></body> </html>

m...

User  
0 rated :

Wauw, really thanks!! iam going to work on this :) Thanks again!!

George

JW Player Support Agent  
0 rated :

Anytime!

m...

User  
0 rated :

So people just to be sure.

I put this in the header of the website:

<script src="http://content.jwplatform.com/libraries/7J1pdIcs.js"></script>

Than i place this where i want the video:

<div id="container">Loading Video…</div> <script> var playerone = jwplayer("container"); playerone.setup({ file:"http://content.jwplatform.com/videos/oSE9unir-s1RPcHE9.mp4" width:"100%", aspectratio:"16:9", mediaid:"oSE9unir", image:"
http://content.jwplatform.com/thumbs/oSE9unir-1280.jpg", title:"Digital COnnect", description:"It takes a cop from the future to fight an enemy from the past.", }); </script>

And replace file, mediaID, image, title and description in to my own. Did i forgot something?

Thanks in advance, M

George

JW Player Support Agent  
0 rated :

That sounds about right, just make sure to upload your videos to your JW Player account if you want to receive analytics and get a valid media ID.

Else, you can point the file to any external url but no analytics until you actually add it to your account and get a media ID (either as a file upload or a external url).

https://support.jwplayer.com/
https://developer.jwplayer.com/jw-player/

for more info

m...

User  
0 rated :

Yeah only its not working :( dont understand.

This is my code:

<div id="container">Loading Video…</div> <script> var playerone = jwplayer("container"); playerone.setup({ file:"http://content.jwplatform.com/videos/oSE9unir-s1RPcHE9.mp4" width:"100%", aspectratio:"16:9", mediaid:"oSE9unir", image:"
http://content.jwplatform.com/thumbs/oSE9unir-1280.jpg", title:"Digital Connect", description:"test description.", }); </script>

Should be working right?

George

JW Player Support Agent  
0 rated :

I would have to see a live webpage that is hosted online to tell

m...

User  
0 rated :

its here: http://goo.gl/DeO1Bt

George

JW Player Support Agent  
0 rated :

Awesome sause, You’re missing a comma after the file:"" decleration

m...

User  
0 rated :

a comma after decleration? do i have a file called decleration? :D iam searching for it but its not in the sourcecode haha where you find this file?

George

JW Player Support Agent  
0 rated :

Here’s the corrected script tag:
<script> var playerone = jwplayer("container"); playerone.setup({ file:"http://content.jwplatform.com/videos/oSE9unir-s1RPcHE9.mp4", width:"100%", aspectratio:"16:9", mediaid:"oSE9unir", image:" http://content.jwplatform.com/thumbs/oSE9unir-1280.jpg", title:"Digital Connect", description:"Test description.", }); </script>

m...

User  
0 rated :

Thanks you so much man :) works perfect now!! so i keep this script with me :)

Just 2 questions ahead:

1. Now its seems there is a watermark in the middle, is there a way to remove this?
2. Is there a overview of the the players (links as below) so for example other links which will result in other players?

<script src="http://content.jwplatform.com/libraries/7J1pdIcs.js"></script>

Thanks in advance, M

George

JW Player Support Agent  
0 rated :

This would be the document you’d want to read. You’re probably using my trial library, you can switch out the script with the one in the Players section of your dashboard.

https://support.jwplayer.com/customer/en/portal/articles/2160275-introduction-to-the-jw-player-dashboard

m...

User  
0 rated :

George,

Thanks man!! That did both the tricks. Your a big help!! Without, i could not have done it. Thanks!!

Best regards, M

George

JW Player Support Agent  
0 rated :

Anytime M

This question has received the maximum number of answers.