new Queue()
Methods
-
add(args){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 86Adds one or more items to the playback queue.
-
Adds one or more items to the playback queue.
Name Type Description args
GoBrain.Dtos.PlaybackItem | Array.<GoBrain.Dtos.PlaybackItem> Any number of playback items or an array of playback items to add to the playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
dispatch(queueChanged){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 121Dispatches QueueItemChanged, and QueueChanged depending on the queueChanged parameter, event(s) to the framework.
-
Dispatches QueueItemChanged, and QueueChanged depending on the queueChanged parameter, event(s) to the framework.
Name Type Description queueChanged
Boolean Whether the queue has changed. If false or not specified, assumes that current queueItem has changed.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
empty(){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 149Empties the playback queue.
-
Empties the playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
get(arg){GoBrain.Pdk.ControllerBases.Playback~Queue~QueueInfo}
GoBrain.Pdk/src/controller-bases/playback.js, line 163Gets a queue item or the current playback queue.
-
Gets a queue item or the current playback queue.
Name Type Description arg
Number | String Index or id of playback item to get. If not specified, returns the current playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue~QueueInfo -
next(){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 185Switches to the next item in the playback queue.
-
Switches to the next item in the playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
previous(){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 208Switches to the previous item in the playback queue.
-
Switches to the previous item in the playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
remove(arg){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 229Removes a playback item from the playback queue.
-
Removes a playback item from the playback queue.
Name Type Description arg
Number | String Index or id of playback item to remove.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
replace(items){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 255Replaces the current playback queue with one or more items.
-
Replaces the current playback queue with one or more items.
Name Type Description items
GoBrain.Dtos.PlaybackItem | Array.<GoBrain.Dtos.PlaybackItem> Any number of playback items or an array of playback items to replace the current playback queue with.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
reverse(){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 270Reverses the playback queue.
-
Reverses the playback queue.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
select(arg){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 284Switches to a playback item in the playback queue.
-
Switches to a playback item in the playback queue.
Name Type Description arg
Number | String Index or id of playback item to switch to.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue -
update(arg, item, changes){GoBrain.Pdk.ControllerBases.Playback~Queue}
GoBrain.Pdk/src/controller-bases/playback.js, line 302Updates the data of a playback item in the playback queue.
-
Updates the data of a playback item in the playback queue.
Name Type Description arg
Number | String Index or id of playback item to update.
item
GoBrain.Dtos.PlaybackItem An updated playback item.
changes
Object A description of the changes to the playback item.
Name Type Description key
String A unique key identifying the type of change.
data
Object The data of the change.
Returns:
Type Description GoBrain.Pdk.ControllerBases.Playback~Queue
Type Definitions
-
QueueInfoObject
-
Properties:
Name Type Description currentIndex
Number The index of the current item in the current playback queue.
queue
Array.<GoBrain.Dtos.PlaybackItem> The current playback queue.