STATE_STOPPED
STATE_STOPPED = 201
No music playing, but not paused.
This is a rare state, but can be encountered after an upgrade, or if the queue was cleared
Allows interaction with the groups of speakers.
Although sometimes a Controller is synonymous with a Speaker, when speakers are grouped together only the coordinator can receive events (play/pause/etc)
getStateDetails() : \duncan3dc\Sonos\Interfaces\StateInterface
Get attributes about the currently active track in the queue.
seek(\duncan3dc\Sonos\Interfaces\Utils\TimeInterface $position) : self
Seeks to a specific position within the current track.
\duncan3dc\Sonos\Interfaces\Utils\TimeInterface | $position | The position to seek to in the track |
useStream(\duncan3dc\Sonos\Tracks\Stream $stream) : self
Play a stream on this controller.
\duncan3dc\Sonos\Tracks\Stream | $stream | The Stream object to play |
useLineIn(\duncan3dc\Sonos\Interfaces\SpeakerInterface|null $speaker = null) : self
Play a line-in from a speaker.
If no speaker is passed then the current controller's is used.
\duncan3dc\Sonos\Interfaces\SpeakerInterface|null | $speaker | The speaker to get the line-in from |
getSpeakers() : array<mixed,\duncan3dc\Sonos\Interfaces\SpeakerInterface>
Get the speakers that are in the group of this controller.
addSpeaker(\duncan3dc\Sonos\Interfaces\SpeakerInterface $speaker) : self
Adds the specified speaker to the group of this Controller.
\duncan3dc\Sonos\Interfaces\SpeakerInterface | $speaker | The speaker to add to the group |
removeSpeaker(\duncan3dc\Sonos\Interfaces\SpeakerInterface $speaker) : self
Removes the specified speaker from the group of this Controller.
\duncan3dc\Sonos\Interfaces\SpeakerInterface | $speaker | The speaker to remove from the group |
getQueue() : \duncan3dc\Sonos\Interfaces\QueueInterface
Get the queue for this controller.
exportState(boolean $pause = true) : \duncan3dc\Sonos\Interfaces\ControllerStateInterface
Grab the current state of the Controller (including it's queue and playing attributes).
boolean | $pause | Whether to pause the controller or not |
restoreState(\duncan3dc\Sonos\Interfaces\ControllerStateInterface $state) : self
Restore the Controller to a previously exported state.
\duncan3dc\Sonos\Interfaces\ControllerStateInterface | $state | The state to be restored |
interrupt(\duncan3dc\Sonos\Interfaces\UriInterface $track, integer $volume = null) : self
Interrupt the current audio with a track.
The current state of the controller is stored, the passed track is played, and then when it has finished the previous state of the controller is restored. This is useful for making announcements over the Sonos network.
\duncan3dc\Sonos\Interfaces\UriInterface | $track | The track to play |
integer | $volume | The volume to play the track at |