SAMMI Extensions
Spotify
This Spotify extension for SAMMI allows you to display and fully control your Spotify playback directly from SAMMI.
It includes a full Spotify player for SAMMI, an OBS overlay (including viewer song requests), and is simple to set up.
Spotify Premium Required
The extension requires a Spotify premium account. Without one, you can still display your currently playing track in your OBS overlay, but playback controls won’t be available.
Features
Pro Version
The basic version of the Spotify extension is missing some features and has protected buttons. You can purchase the Pro version to unlock all buttons and features.
Overlay for Your Stream
Display the current track in your OBS overlay, updated automatically as you listen to Spotify.
Current Track Info
Send the current track's name, Spotify link, and other information to your chat with one button press.
Triggers
Pro Version
This is available in the Pro version.
Trigger a button when the track changes, playback is paused or resumed, or volume is changed.
Playback Controls
- Play and Pause
- Next and Previous Track
- Fast Forward and Backward
- Mute and Unmute
- Volume Slider
- Like and Unlike Tracks
- Toggle Shuffle (smart shuffle not supported by the API)
Playlists
- View your playlists, select one to listen to, and cycle through them.
- Add or remove the currently playing track from your playlist.
- Create new playlists.
Song Requests
- Let viewers request songs by name or Spotify link.
- Add requested tracks to your queue, and display them in your OBS overlay.
- Pause and unpause song requests.
- Enable user cooldowns. (Pro version only)
- Disallow explicit tracks. (Pro version only)
- Disallow repeat tracks. (Pro version only)
- Disallow tracks longer than a set duration. (Pro version only)
Randomize Playback
Play a random track, album, or playlist.
Lyrics
Get a link to the lyrics of your currently playing track.
Advanced Commands (Pro version only)
The basic version offers premade buttons for some commands, but with the Pro version, you can easily add them to your command list, use them anywhere in SAMMI, and unlock a other advanced commands for even greater control.
These include:
- Playback Controls: Play, Pause, Next, Previous, Fast Forward, Fast Backward, Set Volume, Set Shuffle, Seek
- Playlists: Get User Playlists, Get Playlist Tracks, Add Track to Playlist, Remove Track from Playlist, Create Playlist, Get Random Playlist
- Albums: Get Album Tracks, Get New Albums
- Queue: Place Track in Queue, Get Queue
- Saved Tracks: Get Saved Tracks, Save Track, Remove Track from Saved Tracks
- Misc: Search for tracks by name or artist, Get Recently Played Tracks, Get Random Track
Setup
New Version
Looking for the old Spotify 2.1 setup guide? Click here. This guide covers the latest version (3.x) of the Spotify extension.
- Ensure you are using the latest version of SAMMI.
- If you already use Spotify 2.1 or earlier version:
- Backup any custom buttons and commands, and then completely remove your old Spotify deck from SAMMI to avoid any conflicts.
- Delete your existing Spotify scene in OBS. You should not already have sources like
Spotify Song
,Spotify Artist
,Spotify Image
, etc., in OBS.
- Install or update the OBS Move Transition filter to the latest version.
- Install the extension. Follow this guide if you need help.
Bridge connection required
Unlike the older version, the new Spotify extension requires Bridge connection.
- Navigate to the newly added Spotify deck and press the red Setup button. Select
F
for full setup walkthrough. This will:- Help you set your Spotify credentials and refresh token.
- Install Spotify OBS overlay
- Get your default Spotify device
- Open the red Power button (top left corner) in the Spotify deck to easily adjust other settings:
- OBS Name - Name of the OBS connection in SAMMI you're using to connect to OBS - Default is Main if you're using default settings
- Auto Wakeup
Smart Shuffle Bug
This feature may introduce bugs to 'Smart Shuffle' when used, such as tracks repeating themselves over and over again (bug in the API)
- If a Spotify command fails due to Spotify being inactive, SAMMI will automatically attempt to wake it up and retry the command
- If disabled and Spotify has been inactive for some time, you must manually press the Wake Up (doorbell) button or interact with Spotify outside SAMMI before using any Spotify commands.
- Max Tracks - Maximum amount of song request tracks displayed in your OBS overlay
- Max. Text Length - Maximum length a track name can be before it's truncated in OBS overlay
- Reverse Order - Check to display tracks in queue in the reverse order in OBS overlay - The next track in the queue will be on top instead
- Show Errors As - Show various extension related errors as either alerts or tray notifications
- Setup is complete!
Spotify Settings
Your Spotify credentials are saved locally, so you don’t need to reconfigure them if you reinstall the extension, however, you may need adjust the settings in the Power button again.
OBS Overlay
If you installed the OBS overlay during setup, you should see a new scene called Spotify
in your OBS. This scene includes sources for the current track, artist, album, and album cover.
It will automatically update as you listen to Spotify and add new song requests to your queue.
You can customize the track overlay inside the OBS Button, and the queue overlay inside the big Your Current Queue Will Be Displayed Here button in the Spotify deck.
Available Buttons
Play
This button performs two actions:
- If you don't enter the ID in the command box, it will continue the current track (if it's paused).
- If you enter the ID, it will start playing the chosen track, album, or playlist.
The following formats are supported and automatically converted:
Track URI:
spotify:track:4boaU9XaS1g6U1nV4lEsMl
Track Link:
https://open.spotify.com/track/4boaU9XaS1g6U1nV4lEsMl
Album URI:
spotify:album:5duyQokC4FMcWPYTV9Gpf9
Album Link:
https://open.spotify.com/album/5duyQokC4FMcWPYTV9Gpf9
Playlist URI:
spotify:playlist:1N0YOYoITjQMeyZMMFhkid
Playlist Link:
https://open.spotify.com/playlist/1N0YOYoITjQMeyZMMFhkid
Playback Controls
Premade buttons for the following actions:
- Pause - Pauses the current track.
- Next - Skips to the next track.
- Previous - Skips to the previous track.
- Fast Forward - Fast forwards the current track. Adjust the amount inside the button.
- Fast Backward - Fast backwards the current track.. Adjust the amount inside the button.
- Mute - Mutes or unmutes Spotify.
- Volume Slider - Adjusts the volume of Spotify.
- Shuffle - Toggles shuffle on or off.
Like/Unlike Track
Adds or removes the currently playing track from your library.
Song Request
Let viewers request specific songs via your chat or channel points.
Chat trigger is !sr *
(only enabled for broadcaster and mods by default)
- the * can be a full spotify link or uri
- the * can be a song name (with an optional artist name)
Examples of chat commands:
!sr https://open.spotify.com/track/4boaU9XaS1g6U1nV4lEsMl
!sr Kiss from a rose
!sr Kiss from a rose Seal
Channel point redeem name is Song Request
(change it if you wish) and the message is the *
.
Examples of channel point redeem messages:
https://open.spotify.com/track/4boaU9XaS1g6U1nV4lEsMl
Kiss from a rose
Kiss from a rose Seal
Once this button is triggered, the track will be added to the end of your current playback queue.
You can go inside the button and modify the messages sent to your chat (look for green EDITABLE comments).
Advanced Features
- Pause Song Requests This block runs when song requests are paused by pressing 'Pause or Unpause Song Requests' button.
- User Cooldowns (Pro) - Enable this block to prevent users from requesting songs too often. You can set the cooldown duration in minutes.
- Disallow Repeat Tracks (Pro) - Enable this block to prevent the same track from being requested again. You can set the cooldown duration in minutes.
- Disallow Explicit Tracks (Pro) - Enable this block to prevent explicit tracks from being requested.
- Disallow Tracks Longer Than (Pro) - Enable this block to prevent tracks longer than a certain duration from being requested. You can set the maximum duration in minutes.
Track Info
Retrieves all the available info about your current track. You can use this info in your other buttons, post it in your chat, etc.
Get Playlists
By default, this button retrieves your playlists.
Fill in the userId
variable inside the button to retrieve playlists from another user.
Your playlists will be displayed in a list above the button and you can cycle through them by using the arrows.
Click on a playlist to start playing it.
Add to Playlist
Adds the currently playing track to your selected playlist (the one currently selected inside the green button).
Remove from Playlist
Removes the currently playing track from your current playlist.
Create a Playlist
Creates a new playlist. See the example command inside the button.
Random Track
Retrieves a random Spotify track and starts playing it.
Random Album
Retrieves a random newly released album and starts playing it.
Random Playlist
Retrieves a random playlist and starts playing it.
Queue Track
Adds a track to the end of the user's current playback queue.
Modify the Track ID
inside the button.
Track ID can be:
- a track ID:
4boaU9XaS1g6U1nV4lEsMlz
- a track link:
https://open.spotify.com/track/4boaU9XaS1g6U1nV4lEsMl
Get Lyrics
Retrieves URL for the lyrics for the current track and opens it in your default browser. This is by no means perfect, but it should find lyrics for any fairly known songs.
Pause or Unpause Song Requests
Pauses or unpauses song requests. When paused, any new song requests will not be added to the queue.
Wake Up
Smart Shuffle Bug
This feature may introduce bugs to 'Smart Shuffle' when used, such as tracks repeating themselves over and over again (bug in the API)
If a Spotify command fails due to Spotify being inactive, SAMMI will attempt to wake it up and retry the command if 'Auto Wakeup' is enabled in Settings button.
If 'Auto Wakeup' is disabled and Spotify has been inactive for some time, you must manually press this button or interact with Spotify player outside SAMMI before using any Spotify commands.
Available Triggers
Pro Version
This is available in the Pro version.
Track Changed
Triggers when the track changes.
Extension trigger: Spotify Track Changed
Trigger Pull Data object:
data.name
= track namedata.artists[0].name
= track artist's namedata.item.id
= track iddata.item.uri
= track uridata.item.href
= track linkdata.album.name
= album namedata.album.uri
= album uridata.album.id
= album iddata.album.href
= album linkdata.album.images[0].url
= album picture, use https://i.imgur.com/GGyFPZQ.png for default one
Playback Paused
Triggers when the playback is paused.
Extension trigger: Spotify Playback Paused
Playback Resumed
Triggers when the playback is resumed.
Extension trigger: Spotify Playback Resumed
Volume Changed
Triggers when the volume is changed.
Extension trigger: Spotify Volume Changed
Trigger Pull Data object:
volume
= current volume
All Available Commands
Pro Version
This is available in the Pro version.
This button contains examples of all the available commands, including some advanced ones.
To show/hide the Spotify commands from your command menu to reduce clutter, please adjust the settings inside the Power button.
To see what each command returns, uncheck 'Off' next to each block inside the button, press Run button, and press Open Variable Window button to see what it returned.
Commands include:
- Playback Controls: Play, Pause, Next, Previous, Fast Forward, Fast Backward, Set Volume, Set Shuffle, Seek
- Playlists: Get User Playlists, Get Category Playlists, Get Playlist Tracks, Add Track to Playlist, Remove Track from Playlist, Create Playlist, Get Random Playlist
- Albums: Get Album Tracks, Get New Albums
- Queue: Place Track in Queue, Get Queue
- Saved Tracks: Get Saved Tracks, Save Track, Remove Track from Saved Tracks
- Search: Search for tracks by name or artist
- Misc: Get Random Track, Get Recently Played Tracks
Get Help
Please see Troubleshooting for common extensions issues.