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

Integrate JW platform player in javascript API


Hello Warm greetings,

I am trying to implement jw player using Javascript api. I have premium account of JWPlatform. I have created a player in JWPlatform account. Now I want to integrate that player in javascript api, is it possible?

Thanks.

5 Community Answers

Remco van Bree

JW Player Support Agent  
0 rated :

Yes. This is possible. See here for example an example of how to make the player pause 1 second before the end of the video:

bc.<script type="text/javascript" src="http://content.bitsontherun.com/players/urwfoBna-6PwRGXqS.js"></script>

<script type="text/javascript"> jwplayer().onTime( function(object) { if(object.position > object.duration - 1) { this.pause(); } } ); </script>

mjpz

User  
1 rated :

Here the script you have included is

src="http://content.bitsontherun.com/players/Key-Player.js"

where
Key is the video key
Player is the player key

so this will be used to play one video using that player.

My scenario is like

I need to use the player that I have created using platform account, using javascript api to play multiple videos, so that I will have all properties like skin, hls etc of that player automatically.

I think we need to use flashplayer property in script, but I am not getting how to map that flashplayer url to the player that I have created in platform account.

Hope I am making sense.

Thanks.

Remco van Bree

JW Player Support Agent  
0 rated :

No, the flashplayer property has nothing to do with it. You would need to look into the jwplayer.load() call. The easier way to do that would be by using playlists.

mjpz

User  
0 rated :

Sorry if I am making discussion annoying.

I know how to use playlist, and implemented also, in that case I need to mention the skin, width, height etc through javascript only.

My requirement is I will create a player from platform account, so I should get skin, width, height property directly without mentioning in the javascript and I should be able to add multiple videos through playlist from javascript.

In short player properties should come from platform account and playlist should be from javascript.

Thanks

Remco van Bree

JW Player Support Agent  
0 rated :

This is not how the platform players are designed to work, so that is not possible.

This question has received the maximum number of answers.