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

playlist not ready when onReady is called

Your docs say: "playlist is loaded when onReady is called"

However this is not the case.
is undefined.

Workaround is a setTimeout delay of 100ms (surely works for every client?), which you stated here:

Also stated that this should be fixed in JW 6.12, which is not.

live example:,js,console,output

The reason we need this:
We want to add specific tracking to Google Analytics using your API events. We also want to add the title of the video to each tracking event to see in GA which video caused the event.

As far as I know I can only get the title with:
(we have only one file present in playlist)

The workaround seems to work but I'm not sure if this will do for each client.
Additionally now we can't track the autostart via onPlay() since the title is not defined yet. And after 100ms the autostart won't fire onPlay() anymore.

We need JW 6 as fallback for IE8 and IE7 so this needs to work.

1 Community Answers


JW Player Support Agent  
0 rated :


I was able to get your event to log the playlist array when I wrapped the console.log() method in a function. Here is the code that worked for me:

jwplayer().onReady(function() {console.log(’onReady: ’ + jwplayer().getPlaylist());});

Please let me know if you need any more help or have any other questions.

Thank you!

This question has received the maximum number of answers.