Package com.castlabs.sdk.channels
Class ChannelManager
- java.lang.Object
-
- com.castlabs.sdk.channels.ChannelManager
-
public class ChannelManager extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceChannelManager.ListenerCallback interface that can be added to the manager.
-
Constructor Summary
Constructors Constructor Description ChannelManager(List<Bundle> channelConfigurations, PlayerView playerView, int cacheSize)Initialize the channel manager with a list of Intent Bundles that will be used to open playback sessions (seePlayerController.open(Bundle))
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentChannelIndex()voidselectChannel(int index)Selects the channel at the given index and attaches it to the player view.voidsetListener(ChannelManager.Listener listener)Set a listener to this manager
-
-
-
Constructor Detail
-
ChannelManager
public ChannelManager(@NonNull List<Bundle> channelConfigurations, @NonNull PlayerView playerView, int cacheSize)Initialize the channel manager with a list of Intent Bundles that will be used to open playback sessions (seePlayerController.open(Bundle))- Parameters:
channelConfigurations- The channel configsplayerView- The player viewcacheSize- The cache size per side. The final cache will be 2*cacheSize+1
-
-
Method Detail
-
setListener
public void setListener(@Nullable ChannelManager.Listener listener)Set a listener to this manager- Parameters:
listener- The listener
-
getCurrentChannelIndex
public int getCurrentChannelIndex()
- Returns:
- The current channel index or -1
-
selectChannel
public void selectChannel(int index)
Selects the channel at the given index and attaches it to the player view.- Parameters:
index- The index
-
-