Open ghost opened 6 years ago
@vivekebics There is interface "PlayerSelector", it is feed by a list of Players and asked to select from there some player to start playback. You can simply returns all Player from the list.
Here Is an example of creating a custom PlayerSelector and set it to the RecyclerView.
Also, playing all possible players is bad practice, you are warned :).
@eneim Playing all the players is bad practice. If i want to show all the CCTV Footage in Android TV. How to achieve these ? Do we have any other possibilities ? Please let me know.
@vivekebics What is your use case by the way? If you want all the visible Video to start playback, you can have a custom "PlayerSelector", from "select" method you can just return all the player. It will use all players to play.
@eneim My use case CCTV Camera Monitoring in Android TV
@vivekebics try the following code for your container:
PlayerSelector SELECT_ALL = new PlayerSelector() {
@NonNull @Override public Collection<ToroPlayer> select(@NonNull Container container,
@NonNull List<ToroPlayer> items) {
return items;
}
@NonNull @Override public PlayerSelector reverse() {
return this;
}
};
container.setPlayerSelector(SELECT_ALL);
How to play all the visible item in recyclerview automatically ?