\duncan3dc\Sonos\CloudPlayer

Represents an individual Sonos speaker.

Summary

Methods
Properties
Constants
__construct()
getId()
getRoom()
getVolume()
setVolume()
adjustVolume()
isMuted()
mute()
unmute()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$id
$room
$api
N/A

Properties

$id

$id : string

Type

string

$room

$room : string

Type

string

Methods

__construct()

__construct(string  $id, string  $room, \duncan3dc\Sonos\Cloud\Interfaces\ClientInterface  $api) 

Create an instance of the Speaker class.

Parameters

string $id

The ID of the speaker

string $room

The room name the speaker is in

\duncan3dc\Sonos\Cloud\Interfaces\ClientInterface $api

getId()

getId() : string

Get the ID of this speaker.

Returns

string

getRoom()

getRoom() : string

Get the room name of this speaker.

Returns

string

getVolume()

getVolume() : integer

Get the current volume of this speaker.

Returns

integer —

The current volume between 0 and 100

setVolume()

setVolume(integer  $volume) : void

Adjust the volume of this speaker to a specific value.

Parameters

integer $volume

The amount to set the volume to between 0 and 100

adjustVolume()

adjustVolume(integer  $adjust) : void

Adjust the volume of this speaker by a relative amount.

Parameters

integer $adjust

The amount to adjust by between -100 and 100

isMuted()

isMuted() : boolean

Check if this speaker is currently muted.

Returns

boolean

mute()

mute() : void

Mute this speaker.

unmute()

unmute() : void

Unmute this speaker.