在JW PLAYER 6中显示当前播放项目的文件名

Im using http://support.jwplayer.com/customer/portal/articles/1439570-example-loading-new-playlists this for updating the playlist via buttons , and need to display the currently playing file in an input box (for the viewer to copy) , I've tried the getPlayListItem() and had no luck .. what i need is to display the Currently playing playlist , and once a user changes the playlist for it to display that one.. and vise-versa .

What could i do to accomplish this?

Thanks.

This is documented on the JWplayer Javascript Api reference,

.on('playlistItem')

Fired when the playlist index changes to a new playlist item. This event occurs before the player begins playing the new playlist item.

Event attributes:

  • index (Number): Zero-based index into the playlist array (e.g. 0 is the first item).
  • playlist (Array): The new playlist; an array of playlist items.