playback

The playback namespace includes commands and events that enable your app to initiate and pause group playback, and skip to next or previous track. Your app can also control and update playback status and play modes, and receive notifications about those states and playback errors.

The tables below list the commands and events available in the playback namespace.

Commands

Command Description
getPlaybackStatus Get the current playback status.
loadLineIn Change the current group source to the line-in source on a player.
pause Pause group playback.
play Initiate group playback.
seek Go to a specific position in the current track.
seekRelative Go to a relative position in the current track.
setPlayModes Change group play modes, such as repeat, repeat one track, shuffle, and crossfade.
skipToNextTrack Skip to the next track.
skipToPreviousTrack Skip to the previous track.
subscribe Subscribe to events in the playback namespace.
togglePlayPause Toggle the playback state on the given group, if possible.
unsubscribe Unsubscribe from events in the playback namespace.

Events

Event Description
playbackStatus A notification of changes to group playback state, such as idle, buffering, paused, or playing, and media status. It also can provide playback policies and modes.
playbackError A notification of errors in media or group status, such as failures in playback or cloud queue server requests, or lack of content.