com.bramosystems.oss.player.core.client
Interface PlaylistSupport

All Known Implementing Classes:
Auto, Capsule, Chromeless, CustomAudioPlayer, CustomVideoPlayer, DivXPlayer, DivXPlayer, FlashMediaPlayer, FlashMediaPlayer, FlatVideoPlayer, MatrixSupport, Native, NativePlayer, Player, PlayerWrapper, PlaylistManager, PlaylistSupport, QuickTimePlayer, QuickTimePlayer, VLCPlayer, VLCPlayer, WinMediaPlayer, WinMediaPlayer, YouTube

public interface PlaylistSupport

Interface for players that have client-side playlist support.

Since:
1.0
Author:
Sikiru Braheem

Method Summary
 void addToPlaylist(java.util.List<MRL> mediaLocators)
          Adds the media locators to the players' playlist.
 void addToPlaylist(MRL mediaLocator)
          Adds the media locator to the players' playlist.
 void addToPlaylist(java.lang.String... mediaURLs)
          Adds the media at the specified URLs to the players' playlist.
 void addToPlaylist(java.lang.String mediaURL)
          Adds the media at the specified URL to the players' playlist.
 void clearPlaylist()
          Removes all entries in the players' playlist
 int getPlaylistSize()
          Returns the number of entries in the playlist
 boolean isShuffleEnabled()
          Checks if this player is in shuffle mode.
 void play(int index)
          Play playlist entry at the specified index
 void playNext()
          Plays the next item in the playlist
 void playPrevious()
          Plays the previous item in the playlist
 void removeFromPlaylist(int index)
          Removes the entry at the specified index from the players' playlist.
 void setShuffleEnabled(boolean enable)
          Enables or disables players' shuffle mode.
 

Method Detail

setShuffleEnabled

void setShuffleEnabled(boolean enable)
Enables or disables players' shuffle mode.

Parameters:
enable - true to enable shuffle, false otherwise

isShuffleEnabled

boolean isShuffleEnabled()
Checks if this player is in shuffle mode.

Returns:
true if player is in shuffle mode, false otherwise.

addToPlaylist

void addToPlaylist(java.lang.String mediaURL)
Adds the media at the specified URL to the players' playlist.

In respect of the same domain policy of some plugins/browsers, the URL should point to a destination on the same domain where the application is hosted.

Parameters:
mediaURL - the URL of the media.

addToPlaylist

void addToPlaylist(java.lang.String... mediaURLs)
Adds the media at the specified URLs to the players' playlist.

The player chooses ONLY ONE of the mediaURLs it supports.

In respect of the same domain policy of some browsers, the URLs should point to a destination on the same domain where the application is hosted.

Parameters:
mediaURLs - the alternative URLs of the same media (probably in different formats).
Since:
1.3

addToPlaylist

void addToPlaylist(MRL mediaLocator)
Adds the media locator to the players' playlist.

Parameters:
mediaLocator - specifies alternative URLs of the same media
Since:
1.3

addToPlaylist

void addToPlaylist(java.util.List<MRL> mediaLocators)
Adds the media locators to the players' playlist.

Parameters:
mediaLocators - list of alternative URLs of the same media
Since:
1.3

removeFromPlaylist

void removeFromPlaylist(int index)
Removes the entry at the specified index from the players' playlist.

Parameters:
index - the index of the playlist entry.

clearPlaylist

void clearPlaylist()
Removes all entries in the players' playlist


playNext

void playNext()
              throws PlayException
Plays the next item in the playlist

Throws:
PlayException - if there are no more entries in the playlist to be played. Especially if we've advanced to the end of the playlist. Note: A player with a negative loop count (i.e. set to play forever!) may not throw this exception

playPrevious

void playPrevious()
                  throws PlayException
Plays the previous item in the playlist

Throws:
PlayException - if there are no more entries in the playlist to be played. Especially if we've gotten to the beginning of the playlist. Note: A player with a negative loop count (i.e. set to play forever!) may not throw this exception

play

void play(int index)
          throws java.lang.IndexOutOfBoundsException
Play playlist entry at the specified index

Parameters:
index - number of the playlist entry
Throws:
java.lang.IndexOutOfBoundsException - if index is outside the bounds of the playlist

getPlaylistSize

int getPlaylistSize()
Returns the number of entries in the playlist

Returns:
number of entries in the playlist


Copyright © 2009-2011. All Rights Reserved.