How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?

In WordPress (3.8.1) and JW Plugin (v2.1.2) with JW Player (v5), I need to read off the items contained in the Playlists of the JWPlayer Plugin.

Normally

The JWPlayer Plugin works like this, via Shortcode:

Read More
[jwplayer playlistid="1234"]

.. then a Video Player will be being rendered on the Page, together with a Playlist inside.


What i want to do (The Customizing)

So now how do i customly do by myself .. if i want to know (or pull out) the items inside a Playlist, by using its playlistid or 1234.

Lets say in a totally New Page (without using JWPlayer Shortcodes), i will use my own Custom Shortcode, like:

[playlistitems id="1234"]

(The id is the ID of JWPlayer “existing” Playlist)
Then The New Page will be showing (just list down) the Items inside, like:

- intro.mp4
- chapter-1.mp4
- chapter-6.mp4
- wrapup.mp4

.. something like that which needs to be done by my custom module (or) functions.


In more simple words:

  • I want to list down the Items inside the JWPlayer’s playlist (by using its ID)
  • How does JWPlayer reads a Playlist. Then i may need to clone its function.

Thank you.

Related posts

Leave a Reply

1 comment

  1. Got it, after making a Custom Shortcode (this can be found on standard WP docs), then by direct calling one of JW player’s function, from the Template File, like:

    generate_playlist( '1234' );
    

    It will then return a complete Array of the JW Playlist Object, so we can parse it out.