Class MultiControllerPlaylist.Builder
java.lang.Object
com.castlabs.android.player.playlist.MultiControllerPlaylist.Builder
- Enclosing class:
- MultiControllerPlaylist
Builder for 
MultiControllerPlaylist- 
Constructor SummaryConstructorsConstructorDescriptionCreates an instance of the Builder.Builder(PlayerView playerView) Creates an instance of the Builder.
- 
Method SummaryModifier and TypeMethodDescriptionbackPlayers(int backPlayersCount) Sets the number of "back players".forwardPlayers(int forwardPlayersCount) Sets the number of "forward players".get()Constructs theMultiControllerPlaylist.itemChangeFlags(int itemChangeFlags) Sets the behaviour that will be applied when a new playlist item is about to be played.justEnableAnalyticsForCurrentItem(boolean justEnableAnalyticsForCurrentItem) If set to true the analytics sessions are just enabled for current item in the playlist.loop(boolean loop) Sets theloopflagnextItemThresholdMs(int nextItemThresholdMs) Sets thenextItemThresholdin milliseconds.playBackground(boolean playBackground) Sets the flag indicating whether or not to immediately start playing the background PlayerControllers.seekToDefaultPositionOnItemChange(boolean seek) Determines whether to seek to the default position of each item upon transitioning to it.
- 
Constructor Details- 
BuilderCreates an instance of the Builder.- Parameters:
- playerView- the PlayerView from which to use the- context.
 
- 
BuilderCreates an instance of the Builder.- Parameters:
- context- the Context to use when creating- PlayerControllerinstances.
 
 
- 
- 
Method Details- 
itemChangeFlagsSets the behaviour that will be applied when a new playlist item is about to be played.- Parameters:
- itemChangeFlags- flags to set
- Returns:
- the Builder
- See Also:
 
- 
listenerpublic MultiControllerPlaylist.Builder listener(@Nullable MultiControllerPlaylist.PlaylistListener listener) - Parameters:
- listener- the listener to set
- Returns:
- the Builder
 
- 
loopSets theloopflag- Parameters:
- loop- the looping flag
- Returns:
- the Builder
 
- 
nextItemThresholdMsSets thenextItemThresholdin milliseconds.- Parameters:
- nextItemThresholdMs- the next item threshold in milliseconds
- Returns:
- the Builder
 
- 
backPlayersSets the number of "back players". This is the number of concurrently maintained background players for past playlist items. Defaults to 0.- Parameters:
- backPlayersCount- the number of back players to use
- Returns:
- the Builder
 
- 
forwardPlayersSets the number of "forward players". This is the number of concurrently maintained background players for future playlist items. Defaults to 1.- Parameters:
- forwardPlayersCount- the number of forward players to use
- Returns:
- the Builder
 
- 
playBackgroundSets the flag indicating whether or not to immediately start playing the background PlayerControllers. If false, the PlayerController will be inpausedstate until it is attached.- Parameters:
- playBackground- whether to allow background playback or not.
- Returns:
- the Builder
 
- 
justEnableAnalyticsForCurrentItempublic MultiControllerPlaylist.Builder justEnableAnalyticsForCurrentItem(boolean justEnableAnalyticsForCurrentItem) If set to true the analytics sessions are just enabled for current item in the playlist.- Parameters:
- justEnableAnalyticsForCurrentItem- the value
- Returns:
- the Builder
 
- 
seekToDefaultPositionOnItemChangeDetermines whether to seek to the default position of each item upon transitioning to it. When false, each controller instance will simply continue from its last position if it hadn't been released when switching back to it.- Parameters:
- seek- seek to the default position of each item upon transitioning to it
- Returns:
- the Builder
 
- 
getConstructs theMultiControllerPlaylist.- Returns:
- an instance of MultiControllerPlaylist
 
 
-