Javascript playlist change?

3 replies [Last post]
Joined: 11/05/2009
Points: 338

Has anybody figured out how to load a new playlist into a KDP with playlist module via javascript? I can't figure this out to save my life...

Joined: 01/27/2011
Points: 1

My understanding is that you can't with kdp 3.x. Based on the kdp docs, version 2.x had all kinds of stuff you could do with playlists. I was just looking at the playlistAPI plugin source code and found the following method in com.kaltura.kdpfl.plugin.component.PlaylistAPIMediator

override public function listNotificationInterests():Array
{
return [
DataProviderNotification.NEXT_ITEM,
DataProviderNotification.PREV_ITEM,
"mediaReady",
"playerPlayEnd",
"playlistPlayPrevious",
"playlistPlayNext",
"layoutReady",
"kdpEmpty",
"kdpReady"
];
}

I'm assuming the notifications listed are the only ones we have access to.

Joined: 11/05/2009
Points: 338

hmmm ok thanks trott. that seems like a pretty big oversight to me.

in the time since i wrote this post, i did find a workaround, albeit a not very elegant one for anyone who is interested. the gist of it is, when a user clicks the link to change the playlist, it triggers a javascript function that uses SWFObject to re-load the KDP with playlist module using the new playlist's entry ID. like i said, it's ugly, but it does work.

Joined: 08/20/2010
Points: 24

That does seem odd that it's not available.

If there is a "switch to playlist 0x_1234567" then it ought to be documented at http://www.kaltura.org/demos/kdp3/docs.html#sendnotification

I don't see it there ...

I need to do something similar this week so will be having a play here too ... will be interesting to see well this can be done without flashing etc while the KDP reloads.

@grobotwww.giantrobot.co.nz