Showing posts with label jwplaylist. Show all posts
Showing posts with label jwplaylist. Show all posts

Friday, June 30, 2017

How to get the url of the currently playing video of a playlist in JWPlayer 7?

In case you are a JWPlayer fan (like me), you will most probably reach a point where you'd have to use their API. I am talking mostly about the "JW Player JavaScript API Reference".

I have recently been trying to get all of the sources (.mp4 files of the same video, each with different quality) of the currently playing video item from a playlist with multiple videos (2 or more video items). I have searched a lot online no how to do that but no real help was provided as you see in the link below:

How do I get the filename of the currently playing item from a playlist containing more than one?

But nothing was helpful, so I had to dig through JWPlayer's API and find out myself how to do it in the Playlist section here. It is definitely very easy and the trick is to simply under their API and use it properly. The code uses JQuery so make sure you import it.

Here is the full code (playlistVideoLinks.js):


Here is the minified code (playlistVideoLinks-min.js):



Share: