Documentation

ControllerState
in package
implements ControllerStateInterface

FinalYes

Representation of the current state of a controller.

Table of Contents

Interfaces

ControllerStateInterface
Representation of the current state of a controller.

Properties

$crossfade  : bool
$position  : TimeInterface
$repeat  : bool
$shuffle  : bool
$speakers  : array<string, int>
$state  : PlayState
$stream  : Stream|null
$track  : int
$tracks  : array<string|int, TrackInterface>

Methods

__construct()  : mixed
Create a ControllerState object.
getCrossfade()  : bool
Check if crossfade is currently active.
getPosition()  : TimeInterface
Get the position of the currently active track.
getRepeat()  : bool
Check if repeat is currently active.
getShuffle()  : bool
Check if shuffle is currently active.
getSpeakers()  : array<string, int>
Get the speakers that are in the group of this controller.
getState()  : PlayState
Get the playing mode of the controller.
getStream()  : Stream|null
Get the stream this controller is using.
getTrack()  : int
Get the number of the active track in the queue
getTracks()  : array<string|int, TrackInterface>
Get the tracks that are in the queue.
setState()  : $this
Set the playing mode of the controller.
applyMode()  : $this
Get the current playing mode (repeat/shuffle/etc).
applyState()  : $this
Get the current playing attributes (stream/position/etc).
applyTracks()  : $this
Get the current tracks in the queue.
applyVolume()  : $this
Get the current volume of all the speakers in this group.

Properties

$crossfade

private bool $crossfade

Whether crossfade is currently active.

$repeat

private bool $repeat

Whether repeat mode is currently active.

$speakers

private array<string, int> $speakers

The volume of each speaker.

$stream

private Stream|null $stream = null

A stream object (if the controller is currently streaming).

$track

private int $track

The zero-based number of the track in the queue.

Methods

getCrossfade()

Check if crossfade is currently active.

public getCrossfade() : bool
Return values
bool

getRepeat()

Check if repeat is currently active.

public getRepeat() : bool
Return values
bool

getShuffle()

Check if shuffle is currently active.

public getShuffle() : bool
Return values
bool

getSpeakers()

Get the speakers that are in the group of this controller.

public getSpeakers() : array<string, int>
Return values
array<string, int>

getTrack()

Get the number of the active track in the queue

public getTrack() : int
Return values
int

The zero-based number of the track in the queue

On this page

Search results