Controls for Spotify music player
| Signature | hs.spotify.state_paused |
|---|---|
| Type | Constant |
| Description | Returned by |
| Signature | hs.spotify.state_playing |
|---|---|
| Type | Constant |
| Description | Returned by |
| Signature | hs.spotify.state_stopped |
|---|---|
| Type | Constant |
| Description | Returned by |
| Signature | hs.spotify.displayCurrentTrack() |
|---|---|
| Type | Function |
| Description | Displays information for current track on screen Parameters:
Returns:
|
| Signature | hs.spotify.ff() |
|---|---|
| Type | Function |
| Description | Skips the playback position forwards by 5 seconds Parameters:
Returns:
|
| Signature | hs.spotify.getCurrentAlbum() |
|---|---|
| Type | Function |
| Description | Gets the name of the album of the current track Parameters:
Returns:
|
| Signature | hs.spotify.getCurrentArtist() |
|---|---|
| Type | Function |
| Description | Gets the name of the artist of the current track Parameters:
Returns:
|
| Signature | hs.spotify.getCurrentTrack() |
|---|---|
| Type | Function |
| Description | Gets the name of the current track Parameters:
Returns:
|
| Signature | hs.spotify.getCurrentTrackId() |
|---|---|
| Type | Function |
| Description | Gets the id of the current track Parameters:
Returns:
|
| Signature | hs.spotify.getDuration() |
|---|---|
| Type | Function |
| Description | Gets the duration (in seconds) of the current song Parameters:
Returns:
|
| Signature | hs.spotify.getPlaybackState() |
|---|---|
| Type | Function |
| Description | Gets the current playback state of Spotify Parameters:
Returns:
|
| Signature | hs.spotify.getPosition() |
|---|---|
| Type | Function |
| Description | Gets the playback position (in seconds) in the current song Parameters:
Returns:
|
| Signature | hs.spotify.getVolume() |
|---|---|
| Type | Function |
| Description | Gets the Spotify volume setting Parameters:
Returns:
|
| Signature | hs.spotify.isPlaying() |
|---|---|
| Type | Function |
| Description | Returns whether Spotify is currently playing Parameters:
Returns:
|
| Signature | hs.spotify.isRunning() |
|---|---|
| Type | Function |
| Description | Returns whether Spotify is currently open. Most other functions in hs.spotify will automatically start the application, so this function can be used to guard against that. Parameters:
Returns:
|
| Signature | hs.spotify.next() |
|---|---|
| Type | Function |
| Description | Skips to the next Spotify track Parameters:
Returns:
|
| Signature | hs.spotify.pause() |
|---|---|
| Type | Function |
| Description | Pauses the current Spotify track Parameters:
Returns:
|
| Signature | hs.spotify.play() |
|---|---|
| Type | Function |
| Description | Plays the current Spotify track Parameters:
Returns:
|
| Signature | hs.spotify.playpause() |
|---|---|
| Type | Function |
| Description | Toggles play/pause of current Spotify track Parameters:
Returns:
|
| Signature | hs.spotify.playTrack(id) |
|---|---|
| Type | Function |
| Description | Plays the Spotify track with the given id Parameters:
Returns:
|
| Signature | hs.spotify.previous() |
|---|---|
| Type | Function |
| Description | Skips to previous Spotify track Parameters:
Returns:
|
| Signature | hs.spotify.rw() |
|---|---|
| Type | Function |
| Description | Skips the playback position backwards by 5 seconds Parameters:
Returns:
|
| Signature | hs.spotify.setPosition(pos) |
|---|---|
| Type | Function |
| Description | Sets the playback position in the current song Parameters:
Returns:
|
| Signature | hs.spotify.setVolume(vol) |
|---|---|
| Type | Function |
| Description | Sets the Spotify volume setting Parameters:
Returns:
|
| Signature | hs.spotify.volumeDown() |
|---|---|
| Type | Function |
| Description | Reduces the volume by 5 Parameters:
Returns:
|
| Signature | hs.spotify.volumeUp() |
|---|---|
| Type | Function |
| Description | Increases the volume by 5 Parameters:
Returns:
|