Package com.castlabs.sdk.channels
Class ChannelManager
java.lang.Object
com.castlabs.sdk.channels.ChannelManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface that can be added to the manager. -
Constructor Summary
ConstructorsConstructorDescriptionChannelManager(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
Modifier and TypeMethodDescriptionintvoidselectChannel(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 Details
-
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 Details
-
setListener
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
-