setRepeatMode

suspend fun setRepeatMode(state: ClientPlayerApi.PlayerRepeatState, deviceId: String? = null)(source)

Set the repeat mode for the user’s playback. Options are PlayerRepeatState.Track, PlayerRepeatState.Context, and PlayerRepeatState.Off.

Requires the SpotifyScope.UserModifyPlaybackState scope

Api Reference

Parameters

state

mode to describe how to repeat in the current context

deviceId

The device to play on