Controls for Spotify music player
| Signature | hs.spotify.state_paused |
|---|---|
| Type | Constant |
| Description |
Returned by |
| Source | extensions/spotify/spotify.lua line 11 |
| Signature | hs.spotify.state_playing |
|---|---|
| Type | Constant |
| Description |
Returned by |
| Source | extensions/spotify/spotify.lua line 16 |
| Signature | hs.spotify.state_stopped |
|---|---|
| Type | Constant |
| Description |
Returned by |
| Source | extensions/spotify/spotify.lua line 21 |
| Signature | hs.spotify.displayCurrentTrack() |
|---|---|
| Type | Function |
| Description |
Displays information for current track on screen |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 115 |
| Signature | hs.spotify.ff() |
|---|---|
| Type | Function |
| Description |
Skips the playback position forwards by 5 seconds |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 323 |
| Signature | hs.spotify.getCurrentAlbum() |
|---|---|
| Type | Function |
| Description |
Gets the name of the album of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 144 |
| Signature | hs.spotify.getCurrentArtist() |
|---|---|
| Type | Function |
| Description |
Gets the name of the artist of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 131 |
| Signature | hs.spotify.getCurrentTrack() |
|---|---|
| Type | Function |
| Description |
Gets the name of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 157 |
| Signature | hs.spotify.getCurrentTrackId() |
|---|---|
| Type | Function |
| Description |
Gets the id of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 169 |
| Signature | hs.spotify.getDuration() |
|---|---|
| Type | Function |
| Description |
Gets the duration (in seconds) of the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 309 |
| Signature | hs.spotify.getPlaybackState() |
|---|---|
| Type | Function |
| Description |
Gets the current playback state of Spotify |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 182 |
| Signature | hs.spotify.getPosition() |
|---|---|
| Type | Function |
| Description |
Gets the playback position (in seconds) in the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 283 |
| Signature | hs.spotify.getVolume() |
|---|---|
| Type | Function |
| Description |
Gets the Spotify volume setting |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 235 |
| Signature | hs.spotify.isPlaying() |
|---|---|
| Type | Function |
| Description |
Returns whether Spotify is currently playing |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 211 |
| 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 |
|
| Source | extensions/spotify/spotify.lua line 198 |
| Signature | hs.spotify.next() |
|---|---|
| Type | Function |
| Description |
Skips to the next Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 76 |
| Signature | hs.spotify.pause() |
|---|---|
| Type | Function |
| Description |
Pauses the current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 63 |
| Signature | hs.spotify.play() |
|---|---|
| Type | Function |
| Description |
Plays the current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 50 |
| Signature | hs.spotify.playpause() |
|---|---|
| Type | Function |
| Description |
Toggles play/pause of current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 37 |
| Signature | hs.spotify.playTrack(id) |
|---|---|
| Type | Function |
| Description |
Plays the Spotify track with the given id |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 102 |
| Signature | hs.spotify.previous() |
|---|---|
| Type | Function |
| Description |
Skips to previous Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 89 |
| Signature | hs.spotify.rw() |
|---|---|
| Type | Function |
| Description |
Skips the playback position backwards by 5 seconds |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 334 |
| Signature | hs.spotify.setPosition(pos) |
|---|---|
| Type | Function |
| Description |
Sets the playback position in the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 294 |
| Signature | hs.spotify.setVolume(vol) |
|---|---|
| Type | Function |
| Description |
Sets the Spotify volume setting |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 246 |
| Signature | hs.spotify.volumeDown() |
|---|---|
| Type | Function |
| Description |
Reduces the volume by 5 |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 272 |
| Signature | hs.spotify.volumeUp() |
|---|---|
| Type | Function |
| Description |
Increases the volume by 5 |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/spotify.lua line 261 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.spotify.html