playbackSession > seekRelative

Use the seekRelative command in the playbackSession namespace to seek to the a relative position in the track with the specified cloud queue itemId.

Use itemId to ensure the group seeks on the current item. If the current item’s itemId does not match the one provided, the player returns ERROR_INVALID_OBJECT_ID.


Endpoint

POST


Request Parameters

This command requires a sessionId to determine the target of the command. See the Control documentation for details.

See the table below for descriptions of parameters in the body.

Parameter Type Value
itemId string (Optional) The identifier for the item. If this parameter does not match the currently playing item, the command fails. This ensures that playback does not jump back to a track if a user starts to scrub just as the player begins to play the next item.
deltaMillis int Relative position within track in milliseconds. If this value exceeds the current track duration time, Sonos moves to the end of the current track, which results in a skip to the next track.

Response

Returns an empty body with a success value of true if successful.

In the event of a failure, returns playbackError when the scrub operation fails. Returns globalError for all other errors. For example, the player may return ERROR_DISALLOWED_BY_POLICY when scrubbing is not allowed or ERROR_INVALID_OBJECT_ID when the heard track does not match the given itemId.


Example

Request