PlayerInit

external interface PlayerInit(source)

Options for instantiating the Player

Properties

Link copied to clipboard
abstract var getOAuthToken: (cb: (token: String) -> Unit) -> Unit

This will be called every time you run Spotify.Player#connect or when a user's access token has expired (maximum of 60 minutes). You need to invoke cb (the callback) with the access token within this method. Ex: cb("STATIC_ACCESS"TOKEN")

Link copied to clipboard
abstract var name: String

The name of the Spotify Connect player. It will be visible in other Spotify apps.

Link copied to clipboard
open var volume: Number?

The default volume of the player. Represented as a decimal between 0 and 1. Default value is 1.