KtifyPlayer

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun addItemToQueue(episode: Episode, deviceId: String?): HttpStatusCode

Adds an episode to the user's queue

suspend fun addItemToQueue(track: Track, deviceId: String?): HttpStatusCode
suspend fun addItemToQueue(track: LinkedTrack, deviceId: String?): HttpStatusCode

Adds a track to the user's queue

suspend fun addItemToQueue(uri: String, deviceId: String? = null): HttpStatusCode

Will be internal once the whole API is covered

Link copied to clipboard
suspend fun getAvailableDevices(): AvailableDevices

Get a list of the available devices

Link copied to clipboard
suspend fun getCurrentPlayback(market: String? = null): CurrentPlayback?

Read the user's current playback.

Link copied to clipboard
suspend fun getCurrentPlayingTrack(market: String? = null): CurrentPlayingTrack?

Get the track currently played on the user's account

Link copied to clipboard
suspend fun getRecentlyPlayedTracks(limit: Int? = null, after: Long? = null, before: Int? = null): PlayHistoryCursorPagingObject?

Gets the recently played tracks of the user

Link copied to clipboard
suspend fun pausePlayback(deviceId: String? = null): HttpStatusCode

Pause the user's playback

Link copied to clipboard
suspend fun seekToPosition(positionMs: Int, deviceId: String? = null): HttpStatusCode

Seek to a specific position in the user's playback

Link copied to clipboard
suspend fun setRepeatMode(repeatState: RepeatState, deviceId: String? = null): HttpStatusCode

Set the repeat mode of the user's player

Link copied to clipboard
suspend fun setVolume(volumePercent: Int, deviceId: String? = null): HttpStatusCode

Set the volume of the user's player

Link copied to clipboard
suspend fun skipToNextTrack(deviceId: String? = null): HttpStatusCode

Skip the user's playback to the next track

Link copied to clipboard
suspend fun skipToPreviousTrack(deviceId: String? = null): HttpStatusCode

Skip the user's playback to the previous track

Link copied to clipboard
suspend fun startPlayback(deviceId: String? = null, contextUri: String? = null, uris: List<String>? = null, offset: JsonObject? = null, positionMs: Int? = null): HttpStatusCode

Start or resume the user's playback, click here for further context

Link copied to clipboard
suspend fun toggleShufflePlayback(shuffleState: Boolean, deviceId: String? = null): HttpStatusCode

Set the shuffle state of the user's player

Link copied to clipboard
suspend fun transferPlayback(deviceId: String, play: Boolean = false): HttpStatusCode

Transfer playback to another device