The player role seen from the client (this app as a player that servers play to): what it says (client/hello with the player@v1 support object, client/state with the player object) and what it reads of a server (server/command for the player, stream/start, stream/clear, the binary audio chunk).
More...
|
| class | AudioChunk |
| | The audio chunk (the body after the message id): timestamp, send-ahead and the audio.
|
| |
| class | Command |
| | A command for the player of server/command.
|
| |
| class | Offer |
| | One audio format the player offers: the codec (pcm or flac), the rate, the channels and the bit depth.
|
| |
| class | StreamStart |
| | The format of a stream to the player of stream/start.
|
| |
|
| static String | clientHello (String name, String productName, boolean unpairedAccess, List< Offer > formats, long bufferCapacity, List< String > roles) |
| |
| static String | clientHello (String name, String productName, boolean unpairedAccess, List< Offer > formats, long bufferCapacity, List< String > roles, de.yaacc.sendspin.pairing.CodePairingClient.Offer codes) |
| | As above; codes adds the code-based pairing methods the client offers (the formats of the dynamic flow, the static flow): the descriptors of supported_pair_methods (spec, "client/hello pair-method descriptor").
|
| |
| static String | clientState (boolean available, int volume, boolean muted, int outputDelayMs, int requiredLeadTimeMs, int minBufferMs, List< String > commands) |
| | client/state with the player object.
|
| |
|
static String | clientStateUnavailable () |
| |
| static Command | parseCommand (JSONObject p) throws ProtocolException |
| |
| static StreamStart | parseStreamStart (JSONObject p) throws ProtocolException |
| |
|
static boolean | clearsPlayer (JSONObject p) throws ProtocolException |
| | True if a stream/clear or stream/end concerns the player: it names the player role or no role at all.
|
| |
|
static Long | clearFrom (JSONObject p) throws ProtocolException |
| | The from_timestamp of a stream/clear (everything from that time on), null for everything buffered.
|
| |
| static AudioChunk | parseAudioChunk (byte[] body) |
| |
The player role seen from the client (this app as a player that servers play to): what it says (client/hello with the player@v1 support object, client/state with the player object) and what it reads of a server (server/command for the player, stream/start, stream/clear, the binary audio chunk).
Everything read from the network is bounded and checked. Pure.
◆ clientHello() [1/2]
| static String de.yaacc.sendspin.session.PlayerMessages.clientHello |
( |
String | name, |
|
|
String | productName, |
|
|
boolean | unpairedAccess, |
|
|
List< Offer > | formats, |
|
|
long | bufferCapacity, |
|
|
List< String > | roles ) |
|
static |
- Parameters
-
| formats | PCM formats as {sample rate, channels, bit depth}, in the order of preference |
| bufferCapacity | the bytes the player can hold (buffer_capacity) |
| roles | the roles it offers, for example player@v1 |
The commands the player takes are not in the hello: the current wire schema puts them in the client/state player object (the reference library rejects other values at the hello level; found against it, 2026-11-25).
Referenced by de.yaacc.sendspin.session.PlayerMessages.clientHello().
◆ clientHello() [2/2]
| static String de.yaacc.sendspin.session.PlayerMessages.clientHello |
( |
String | name, |
|
|
String | productName, |
|
|
boolean | unpairedAccess, |
|
|
List< Offer > | formats, |
|
|
long | bufferCapacity, |
|
|
List< String > | roles, |
|
|
de.yaacc.sendspin.pairing.CodePairingClient.Offer | codes ) |
|
static |
As above; codes adds the code-based pairing methods the client offers (the formats of the dynamic flow, the static flow): the descriptors of supported_pair_methods (spec, "client/hello pair-method descriptor").
Null: the Pairing PSK only.
◆ clientState()
| static String de.yaacc.sendspin.session.PlayerMessages.clientState |
( |
boolean | available, |
|
|
int | volume, |
|
|
boolean | muted, |
|
|
int | outputDelayMs, |
|
|
int | requiredLeadTimeMs, |
|
|
int | minBufferMs, |
|
|
List< String > | commands ) |
|
static |
client/state with the player object.
- Parameters
-
| requiredLeadTimeMs | how far ahead of the play time a chunk has to arrive at least |
| minBufferMs | the audio the player wants to hold at least |
◆ parseAudioChunk()
| static AudioChunk de.yaacc.sendspin.session.PlayerMessages.parseAudioChunk |
( |
byte[] | body | ) |
|
|
static |
- Returns
- the chunk, or null if the body is too short to hold the two numbers
◆ parseCommand()
| static Command de.yaacc.sendspin.session.PlayerMessages.parseCommand |
( |
JSONObject | p | ) |
throws ProtocolException |
|
static |
- Returns
- the command for the player, or null if the message is for no player role; a malformed one is a protocol error
◆ parseStreamStart()
| static StreamStart de.yaacc.sendspin.session.PlayerMessages.parseStreamStart |
( |
JSONObject | p | ) |
throws ProtocolException |
|
static |
- Returns
- the format, or null if the start is for no player role
The documentation for this class was generated from the following file:
- /github/workspace/yaacc/src/main/java/de/yaacc/sendspin/session/PlayerMessages.java