
Running JS on second video on playlist starting
We've spent the last day or so trying to work this out and haven't had any luck so far. We're trying to make some JS get fired only when the second video in a playlist is played. We've tried the following:
jwplayer().on('playlistItem', function (index, playlist)
if (index == 1) {
// do stuff
}
});
and
jwplayer().on('playlistItem', function (obj) {
if (obj.index == 1) {
//do stuff
}
});
Neither seem to be running the code - has anyone got any ideas what we're doing wrong?
Thanks.