The servers that the client settings (the listen test, later the renderer client) offer to choose from (task 11.7): the servers of the Snapcast server list (typed in, found on the network, remembered) and the one that was used last, each once.
More...
|
| class | Choice |
| | One choice.
|
| |
| enum | Source |
| | Where a choice comes from. More...
|
| |
|
| static List< Choice > | of (List< SnapcastServerListModel.Row > rows, String lastUsed) |
| |
| static String | prefill (List< Choice > choices) |
| | What the address field of the client settings may be filled with when it is empty (S67): the first choice, but only when the user made it: the server used last, a typed-in server or a remembered one.
|
| |
|
|
static final int | MAX_CHOICES = 17 |
| | The most choices: every server of the list and the last used one.
|
| |
The servers that the client settings (the listen test, later the renderer client) offer to choose from (task 11.7): the servers of the Snapcast server list (typed in, found on the network, remembered) and the one that was used last, each once.
Pure Java; the dialog only shows the choices and puts the text of the chosen one into its address field, which the client checks again as for any typed address.
-
The target is the address the user chose. A choice carries the host of its row (a number or the name the user typed), never anything the network said about itself. The client connects to the stream port, which is not the control port of the list (the default 1704 against 1705), so a choice names the host and leaves the port to the client's default; the last used text keeps the port the user typed.
-
Once. Two rows with the same host (two control ports) lead to the same stream port, so they are one choice.
-
Names are display text. Cleaned and cut again, as in the server list; a name that looks like an address changes nothing, and the label starts with the host (
10.0.0.9 (Living room)), so a name such as 192.168.1.5 can not stand in front of the real address.
-
No prefill from the network.
prefill fills an empty field only with a server the user made known (last used, typed in, remembered), never with one that was only found.
-
Link-local IPv6. A found or remembered server at an
fe80:: address is not offered: the text of a choice has no scope id, so the client could not connect to it (a dual-stack phone may resolve such an address first). One the user typed in stays a choice. A found or remembered server is offered with the default stream port 1704 whatever stream port it announced (the announced stream port of _snapcast._tcp is browsed for the report only); another stream port has to be typed.
-
Order. The last used first, then the typed-in servers, the remembered ones, the found ones, each by address.
◆ of()
| static List< Choice > de.yaacc.snapcast.ui.SnapcastServerChoices.of |
( |
List< SnapcastServerListModel.Row > | rows, |
|
|
String | lastUsed ) |
|
static |
◆ prefill()
| static String de.yaacc.snapcast.ui.SnapcastServerChoices.prefill |
( |
List< Choice > | choices | ) |
|
|
static |
What the address field of the client settings may be filled with when it is empty (S67): the first choice, but only when the user made it: the server used last, a typed-in server or a remembered one.
A server that was only found on the network is never prefilled (announcements are not authenticated): the user has to choose it. The order of of puts the user's own servers first, so a found server can only be first when there is none.
- Returns
- the text for the field, or null for nothing
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/snapcast/ui/SnapcastServerChoices.java