Package org.red5.server.stream
Class SimplePlaylistController
- java.lang.Object
-
- org.red5.server.stream.SimplePlaylistController
-
- All Implemented Interfaces:
IPlaylistController
public class SimplePlaylistController extends Object implements IPlaylistController
Simple playlist controller implementation
-
-
Constructor Summary
Constructors Constructor Description SimplePlaylistController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
nextItem(IPlaylist playlist, int itemIndex)
Get next item to play.int
previousItem(IPlaylist playlist, int itemIndex)
Get previous item to play.
-
-
-
Method Detail
-
nextItem
public int nextItem(IPlaylist playlist, int itemIndex)
Get next item to play.- Specified by:
nextItem
in interfaceIPlaylistController
- Parameters:
playlist
- The related play list.itemIndex
- The current item index. -1 indicates to retrieve the first item for play.- Returns:
- The next item index to play. -1 reaches the end.
-
previousItem
public int previousItem(IPlaylist playlist, int itemIndex)
Get previous item to play.- Specified by:
previousItem
in interfaceIPlaylistController
- Parameters:
playlist
- The related play list.itemIndex
- The current item index. IPlaylist.itemSize indicated to retrieve the last item for play.- Returns:
- The previous item index to play. -1 reaches the beginning.
-
-