Свойство | Type | Description | |
---|---|---|---|
$network | The network instance this Controller is part of. |
Méthode | Description | |
---|---|---|
__construct ( duncan3dc\Sonos\Speaker $speaker, |
Create a Controller instance from a speaker. | |
addSpeaker ( duncan3dc\Sonos\Speaker $speaker ) : static | Adds the specified speaker to the group of this Controller. | |
adjustVolume ( integer $adjust ) : static | Adjust the volume of all the speakers controlled by this Controller. | |
exportState ( boolean $pause = true ) : duncan3dc\Sonos\ControllerState | Grab the current state of the Controller (including it's queue and playing attributes). | |
getCrossfade ( ) : boolean | Check if crossfade is currently active. | |
getMediaInfo ( ) : array | Get the currently active media info. | |
getMode ( ) : array | Get the current play mode settings. | |
getNetwork ( ) : |
Get the network instance used by this controller. | |
getQueue ( ) : |
Get the queue for this controller. | |
getRepeat ( ) : boolean | Check if repeat is currently active. | |
getShuffle ( ) : boolean | Check if shuffle is currently active. | |
getSpeakers ( ) : duncan3dc\Sonos\Speaker[] | Get the speakers that are in the group of this controller. | |
getState ( ) : integer | Get the current state of the group of speakers. | |
getStateDetails ( ) : |
Get attributes about the currently active track in the queue. | |
getStateName ( ) : string | Get the current state of the group of speakers as the string reported by sonos: PLAYING, PAUSED_PLAYBACK, etc | |
interrupt ( duncan3dc\Sonos\Tracks\UriInterface $track, integer $volume = null ) : static | Interrupt the current audio with a track. | |
isCoordinator ( ) : boolean | Check if this speaker is the coordinator of it's current group. | |
isStreaming ( ) : boolean | Check if this controller is currently playing a stream. | |
isUsingQueue ( ) : boolean | Check if this controller is currently using its queue. | |
next ( ) : static | Skip to the next track in the current queue. | |
pause ( ) : static | Pause the group. | |
play ( ) : static | Start playing the active music for this group. | |
previous ( ) : static | Skip back to the previous track in the current queue. | |
removeSpeaker ( duncan3dc\Sonos\Speaker $speaker ) : static | Removes the specified speaker from the group of this Controller. | |
restoreState ( duncan3dc\Sonos\ControllerState $state ) : static | Restore the Controller to a previously exported state. | |
seek ( integer $seconds ) : static | Seeks to a specific position within the current track. | |
selectTrack ( integer $position ) : static | Skip to the specific track in the current queue. | |
setCrossfade ( boolean $crossfade ) : static | Turn crossfade on or off. | |
setMode ( array $options ) : static | Set the current play mode settings. | |
setRepeat ( boolean $repeat ) : static | Turn repeat mode on or off. | |
setShuffle ( boolean $shuffle ) : static | Turn shuffle mode on or off. | |
setState ( integer $state ) : static | Set the state of the group. | |
setVolume ( integer $volume ) : static | Set the current volume of all the speakers controlled by this Controller. | |
useLineIn ( duncan3dc\Sonos\Speaker $speaker = null ) : static | Play a line-in from a speaker. | |
useQueue ( ) : static | Set this controller to use its queue (rather than a stream). | |
useStream ( |
Play a stream on this controller. |
Méthode | Description | |
---|---|---|
getPlayMode ( string $type ) : boolean | Get a particular PlayMode. | |
setPlayMode ( string $type, boolean $value ) : static | Set a particular PlayMode. |
public __construct ( duncan3dc\Sonos\Speaker $speaker, |
||
$speaker | duncan3dc\Sonos\Speaker | |
$network |
public addSpeaker ( duncan3dc\Sonos\Speaker $speaker ) : static | ||
$speaker | duncan3dc\Sonos\Speaker | The speaker to add to the group |
Résultat | static |
public adjustVolume ( integer $adjust ) : static | ||
$adjust | integer | A relative amount between -100 and 100 |
Résultat | static |
public exportState ( boolean $pause = true ) : duncan3dc\Sonos\ControllerState | ||
$pause | boolean | Whether to pause the controller or not |
Résultat | duncan3dc\Sonos\ControllerState |
public getCrossfade ( ) : boolean | ||
Résultat | boolean |
public getMediaInfo ( ) : array | ||
Résultat | array |
public getNetwork ( ) : |
||
Résultat |
protected getPlayMode ( string $type ) : boolean | ||
$type | string | The play mode attribute to get |
Résultat | boolean |
public getQueue ( ) : |
||
Résultat |
public getShuffle ( ) : boolean | ||
Résultat | boolean |
public getSpeakers ( ) : duncan3dc\Sonos\Speaker[] | ||
Résultat | duncan3dc\Sonos\Speaker[] |
public getStateDetails ( ) : |
||
Résultat | Track data containing the following elements |
public getStateName ( ) : string | ||
Résultat | string |
public isCoordinator ( ) : boolean | ||
Résultat | boolean |
public isStreaming ( ) : boolean | ||
Résultat | boolean |
public isUsingQueue ( ) : boolean | ||
Résultat | boolean |
public next ( ) : static | ||
Résultat | static |
public play ( ) : static | ||
Résultat | static |
public previous ( ) : static | ||
Résultat | static |
public removeSpeaker ( duncan3dc\Sonos\Speaker $speaker ) : static | ||
$speaker | duncan3dc\Sonos\Speaker | The speaker to remove from the group |
Résultat | static |
public restoreState ( duncan3dc\Sonos\ControllerState $state ) : static | ||
$state | duncan3dc\Sonos\ControllerState | The state to be restored |
Résultat | static |
public selectTrack ( integer $position ) : static | ||
$position | integer | The zero-based position of the track to skip to |
Résultat | static |
public setCrossfade ( boolean $crossfade ) : static | ||
$crossfade | boolean | Whether crossfade should be on or not |
Résultat | static |
protected setPlayMode ( string $type, boolean $value ) : static | ||
$type | string | The play mode attribute to update |
$value | boolean | The value to set the attribute to |
Résultat | static |
public setShuffle ( boolean $shuffle ) : static | ||
$shuffle | boolean | Whether shuffle should be on or not |
Résultat | static |
public useLineIn ( duncan3dc\Sonos\Speaker $speaker = null ) : static | ||
$speaker | duncan3dc\Sonos\Speaker | The speaker to get the line-in from |
Résultat | static |
public useQueue ( ) : static | ||
Résultat | static |
public useStream ( |
||
$stream | The Stream object to play | |
Résultat | static |