Controls for Spotify music player
| Signature | hs.spotify.state_paused |
|---|---|
| Type | Constant |
| Description | Returned by `hs.spotify.getPlaybackState()` to indicates Spotify is paused |
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.state_playing |
|---|---|
| Type | Constant |
| Description | Returned by `hs.spotify.getPlaybackState()` to indicates Spotify is playing |
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.state_stopped |
|---|---|
| Type | Constant |
| Description | Returned by `hs.spotify.getPlaybackState()` to indicates Spotify is stopped |
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.displayCurrentTrack() |
|---|---|
| Type | Function |
| Description | Displays information for current track on screen |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.ff() |
|---|---|
| Type | Function |
| Description | Skips the playback position forwards by 5 seconds |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getCurrentAlbum() |
|---|---|
| Type | Function |
| Description | Gets the name of the album of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getCurrentArtist() |
|---|---|
| Type | Function |
| Description | Gets the name of the artist of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getCurrentTrack() |
|---|---|
| Type | Function |
| Description | Gets the name of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getCurrentTrackId() |
|---|---|
| Type | Function |
| Description | Gets the id of the current track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getDuration() |
|---|---|
| Type | Function |
| Description | Gets the duration (in seconds) of the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getPlaybackState() |
|---|---|
| Type | Function |
| Description | Gets the current playback state of Spotify |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getPosition() |
|---|---|
| Type | Function |
| Description | Gets the playback position (in seconds) in the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.getVolume() |
|---|---|
| Type | Function |
| Description | Gets the Spotify volume setting |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.isPlaying() |
|---|---|
| Type | Function |
| Description | Returns whether Spotify is currently playing |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| 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/init.lua |
| Signature | hs.spotify.next() |
|---|---|
| Type | Function |
| Description | Skips to the next Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.pause() |
|---|---|
| Type | Function |
| Description | Pauses the current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.play() |
|---|---|
| Type | Function |
| Description | Plays the current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.playpause() |
|---|---|
| Type | Function |
| Description | Toggles play/pause of current Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.playTrack(id) |
|---|---|
| Type | Function |
| Description | Plays the Spotify track with the given id |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.previous() |
|---|---|
| Type | Function |
| Description | Skips to previous Spotify track |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.rw() |
|---|---|
| Type | Function |
| Description | Skips the playback position backwards by 5 seconds |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.setPosition(pos) |
|---|---|
| Type | Function |
| Description | Sets the playback position in the current song |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.setVolume(vol) |
|---|---|
| Type | Function |
| Description | Sets the Spotify volume setting |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.volumeDown() |
|---|---|
| Type | Function |
| Description | Reduces the volume by 5 |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |
| Signature | hs.spotify.volumeUp() |
|---|---|
| Type | Function |
| Description | Increases the volume by 5 |
| Parameters |
|
| Returns |
|
| Source | extensions/spotify/init.lua |