Player with playlist module (and playlist API)

Currently only support Yahoo MediaRSS.

Overview

The playlist widget is a tiny flash module for displaying list of media items (aggregated in various formats such MediaRSS).
Playlist module provide both API and user interface for displaying a list of media items and allow the user to play and navigate between items on the list.

The playlist module is a part of the KDP project and is intended to work as a KDP component.

Prerequisites

  • Kaltura integration - Create a Partner Id.
  • Playback Guide.
  • uiConf - XML User Interface configuration file.
  • KDP uiConf definitions and usage.
  • KalturaEntry Value Object.

Adding the Playlist to the KDP uiConf

To add the playlist component to the player uiConf, add the following line:

<Playlist id="playlistApi" k_path="playlist/PlaylistAPI.swf" width="100%" height="100%" />

The <Playlist> tag defines a new playlist component for the KDP to use.
Properties:

    The "id" attribute indicates how the playlist will be addressed within the kdp and from its API.
    The "k_path" attribute defines where the playlist swf file is located (in most cases "playlist/PlaylistAPI.swf" should be used).
    The width and height attributes determines the dimensions of the playlist user interface that will be shown in the KDP.

Playlist Parameters - flashVars

The playlist module provides configuration parameters that can be set through the object flashVars.

Name Description Data Type Default Value
k_pl_autoContinue Determines if the playlist widget should automatically move to the next item when the current item playing is done Boolean false
k_pl_autoInsertMedia Determines if a playlist should direct the player to show the first item thumbnail on first load Boolean true
k_pl_imageDuration Duration of time to display images in the playlist (msecs) uint 2500
k_pl_{i}_name
k_pl_{i}_url
A pair of properties that determines the playlist display name and the playlist source URL.
Each pair of name & URL constructs a single playlist.
{i} is a place holder for a sequential number, starting from 0.
Examples:

  • k_pl_0_name: "My Playlist"
  • k_pl_0_url: "http://www.kaltura.com/mrss/542"
  • k_pl_1_name: "Another playlist"
  • k_pl_1_url: "http://www.kaltura.com/mrss/455"
String -
k_pl_standAlone Determines if the playlist widget contains a playlist only, without a player within the same swf file Boolean false
k_pl_linkTarget Determines where links open up e.g. "_self", "_blank" String _blank
k_pl_enableItemLinks Whether to activate hyper-linking from the playlist items Boolean true

Public properties - Flash/JS API

Playlist module expose few parameters for use in integration.

Flash Name JavaScript Name Description Data type
playlistObjects
[Read-Only]
A list that contains all the loaded playlist objects Array of PlaylistVO
activePlaylist
[Read-Only]
getActivePlaylist The selected KalturaEntry object from the playlist PlaylistVO
selectedEntry
[Read-Only]
getSelectedEntry The currently displayed PlaylistVO object KalturaEntry

Public methods - Flash/JS API

Playlist module expose methods for use in integration.

Method signature Accessible from JavaScript? Description
playNextItem():void Yes Plays the next item in the playlist
playPrevItem():void Yes Plays the previous itemin the playlist
getPlaylistByIdx(idx:int):Object Yes Returns a PlaylistVO object by its index [0 for the leftmost]
selectPlaylistByIdx(idx:int):void Yes Selects a playlist by its index [0 for the leftmost]
addPlaylists(playlistVoList:Array):void Yse Appends one or more playlists.
If now playlists exist, the first playlist passed will be loaded.

playListObjects - an Array of one or more playlist objects that take the following form:

[

{

url: "http://www.yahoo.com/feeds/23452",    

name: "My Music"

},

...,

{

url: "http://www.yahoo.com/feeds/23453",

name: "My Music"

}

]

removePlaylists(startIdx:uint, endIdx:uint):void Yse Removes a range of playlists, indicated by their index, starting from 0 until (playlistObjects.length -1).

  • startIdx – The index of the first playlist to remove.
  • endIdx – The index of the last playlist to remove.

Events and Callbacks - Flash/JS API

Event Class Event Name Description JavaScript Callback
PlaylistAPIEvent playListEnd Last item in the playlist has finished to play k_playListEndHandler():void
PlaylistAPIEvent selectedItemChange An item from the list has been selected k_selectedItemChangeHandler():void
PlaylistAPIEvent activePlaylistChange A playlist has been selected k_activePlaylistChangeHandler():void

Value Object - Flash/JS API

Class Name Properties Description
PlaylistVO
  • name:String
  • imageUrl:String
  • description:String
  • entries:Array (of KalturaEntry)
A playlist that contains media items to play
KalturaEntry See API documentation A media item to play

0