|
YAACC - UPNP Client and Server
|
How one player continues after an item: repeat (off, all, one) and shuffle (off, on). More...

Classes | |
| enum | RepeatMode |
| What happens when an item has ended. More... | |
Public Member Functions | |
| RepeatMode | getRepeat () |
| boolean | isShuffle () |
| PlayMode | withRepeat (RepeatMode newRepeat) |
| PlayMode | withShuffle (boolean newShuffle) |
| PlayMode | nextRepeat () |
| PlayMode | toggleShuffle () |
| String | toUpnpPlayMode () |
| boolean | equals (Object o) |
| int | hashCode () |
| String | toString () |
Static Public Member Functions | |
| static PlayMode | of (RepeatMode repeat, boolean shuffle) |
| static PlayMode | fromSettings (boolean replayPlaylist, boolean shuffle) |
| static PlayMode | fromPreferences (SharedPreferences preferences, String replayKey, String shuffleKey) |
| Reads the two settings (defaults as in the settings screen: replay off, shuffle off). | |
| static PlayMode | fromUpnpPlayMode (String upnpPlayMode) |
Static Public Attributes | |
| static final String | UPNP_NORMAL = "NORMAL" |
| static final String | UPNP_SHUFFLE = "SHUFFLE" |
| static final String | UPNP_REPEAT_ONE = "REPEAT_ONE" |
| static final String | UPNP_REPEAT_ALL = "REPEAT_ALL" |
| static final String | UPNP_RANDOM = "RANDOM" |
| static final PlayMode | NORMAL = new PlayMode(RepeatMode.OFF, false) |
| Repeat off, shuffle off. | |
How one player continues after an item: repeat (off, all, one) and shuffle (off, on).
Immutable, plain JVM. The two settings "replay playlist" and "shuffle music" only give the mode a new player starts with (fromSettings); after that the mode belongs to the player and is never written back.
The UPnP AVTransport state variable CurrentPlayMode knows five modes that cover the combinations (see toUpnpPlayMode()): the mapping is the one Home Assistant uses for its repeat and shuffle services.
|
static |
Reads the two settings (defaults as in the settings screen: replay off, shuffle off).
| replayKey | the key of the "replay playlist" setting |
| shuffleKey | the key of the "shuffle music" setting |
Referenced by de.yaacc.player.PlayModeSettings.defaultPlayMode().


|
static |
Referenced by de.yaacc.player.PlayMode.fromPreferences().

|
static |
| upnpPlayMode | a CurrentPlayMode value |
NORMAL, the modes yaacc does not have (DIRECT_1, INTRO), unknown values and null all give repeat off and shuffle off | PlayMode de.yaacc.player.PlayMode.nextRepeat | ( | ) |

| PlayMode de.yaacc.player.PlayMode.toggleShuffle | ( | ) |
| String de.yaacc.player.PlayMode.toUpnpPlayMode | ( | ) |
CurrentPlayMode value of UPnP AVTransport: repeat one is REPEAT_ONE (with or without shuffle, the protocol has no combination), repeat all REPEAT_ALL or, with shuffle, RANDOM (endless shuffle); shuffle alone is SHUFFLE (every item once in random order) and nothing is NORMAL