YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.player.PlayerVolumeKeys Class Reference

The hardware volume keys on the receivers page, best effort (decision D32): if exactly one player of YAACC is active (playing or paused) and it plays to a remote receiver (a UPnP renderer, an OpenHome device, an FCast receiver, a Snapcast group or a Sendspin player) that can be asked for its volume, the keys change that receiver's volume by {@value STEP} percent per press and a short message shows the receiver and the new volume (the system's volume bar does not appear for a key that was taken). More...

Collaboration diagram for de.yaacc.player.PlayerVolumeKeys:
Collaboration graph

Static Public Member Functions

static Player target (Collection<? extends Player > players)
 
static int step (int currentPercent, boolean up)
 The volume in percent after a press: one step up or down, between 0 and 100.
 
static boolean onKeyDown (final Context context, final boolean up, Collection<? extends Player > players)
 

Static Public Attributes

static final int STEP = 5
 Percent per key press.
 

Detailed Description

The hardware volume keys on the receivers page, best effort (decision D32): if exactly one player of YAACC is active (playing or paused) and it plays to a remote receiver (a UPnP renderer, an OpenHome device, an FCast receiver, a Snapcast group or a Sendspin player) that can be asked for its volume, the keys change that receiver's volume by {@value STEP} percent per press and a short message shows the receiver and the new volume (the system's volume bar does not appear for a key that was taken).

With no active player, with more than one, or when the one that is active plays on this phone, the keys are the system's, as before: a local player uses the phone's own stream, which the system already handles. A Snapcast group that has the focus on the page comes first (de.yaacc.browser.VolumeKeyHosts). Only players of YAACC are considered: nothing is changed on a receiver that another sender plays.

Member Function Documentation

◆ onKeyDown()

static boolean de.yaacc.player.PlayerVolumeKeys.onKeyDown ( final Context context,
final boolean up,
Collection<? extends Player > players )
static
Parameters
uptrue for the volume up key
Returns
true if a receiver takes the key (the volume is changed on a worker thread, the message shows afterwards); false leaves the key to the system
Here is the call graph for this function:

◆ target()

static Player de.yaacc.player.PlayerVolumeKeys.target ( Collection<? extends Player > players)
static
Returns
the one active player if it is remote and has a volume, else null (no player, more than one, a local one: the system's keys)

Referenced by de.yaacc.player.PlayerVolumeKeys.onKeyDown().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: