SAMMI Extensions
Click Map
Features
Let your viewers interact with your stream by directly clicking on your live video overlay!
You can map your OBS sources and let your viewers take full control!
One single tap to activate a different camera? And another tap to change the whole scene? Or how about having your viewers decide which path to take in a video game you're playing by simply tapping on the video to vote?
You can retrieve the name of the viewer who clicked and the exact coordinates!
The extension now includes an overlay to visualize your viewers' clicks!
Utilizes the Heat Twitch extension made by Scott Garner.
Mobile Device Limitation
The extension doesn't work for viewers on mobile devices due to Twitch's own limitation on overlay extensions.
Setup
Quick Start
Install the Heat extension on your Twitch channel and activate it as an overlay (in your Twitch dashboard).
Install the extension. You can follow the Extension Install Guide.
Double-click on the Settings button inside the premade deck:
- If you're using multiple OBS connections, change the
obs_name
variable to your preferred OBS Name (you can find it in the SAMMI main menu - OBS Connections).
OBS Protocol
Please ensure your OBS Protocol in SAMMI - OBS Connections is set to either OBSws 4.9 or OBSws 5, and not Auto.
- If you're using multiple OBS connections, change the
Double-click on the Enable Clicks button:
- Fill out both
Login Name
boxes with your Twitch login name for your streaming channel (use all lowercase characters). - Fill out the Click Map Listener command:
- Allow Anonymous - Decide whether you want to allow anonymous viewers to trigger your clicks (read more below).
- All other boxes are filled out automatically. Do not modify them. If you accidentally change them, please return them to the following default values:
- Channel ID:
clickMapId
- Oauth Token:
clickMapToken
- OBS Canvas Width:
canvasWidth
- OBS Canvas Height:
canvasHeight
- Channel ID:
- Fill out both
Press Save and Close, and then Save again to save the deck as well.
Click on the Create Example Scene button. An example scene with three color sources should be added to your OBS.
Start streaming on Twitch using the example scene. You must be live for the extension to work.
Once your stream is live and the Heat Map extension is active as your overlay, click on the green Enable Clicks button (while connected to OBS and Bridge). You should see a yellow notification message:
Listening for clicks
, and the status should change toConnected
in your Click Map tab in Bridge.Try clicking on your video overlay in your Twitch channel (on the colored sources in the example scene). You should get a Twitch chat message and a yellow alert in SAMMI detecting the clicks!
Full Setup Walkthrough
Install OBS Overlay
To visualize your viewers' clicks on your stream, you can install this handy overlay that can display them as their profile icons, a random channel emote, or your custom image.
- In your premade deck, click on 'Generate Link for OBS Browser Overlay'.
- A new page will open. Fill out all the fields and test the clicks in the preview frame.
- Once satisfied, generate the URL and copy it to your clipboard.
- Back in SAMMI, click on Install New OBS Overlay and paste the URL (while connected to OBS).
- A new browser source called
Click Map Overlay
should now be added to your OBS. - Whenever you decide to modify how the overlay looks, simply generate a new URL (step 2) and change it inside your browser source settings in OBS.
If you wish to enable the overlay only when listening to clicks:
- Open the Enable Clicks button and uncheck
Off
for the 'Enable me if using Click Map OBS Browser overlay' comment. Change the scene and source name if needed in the Source Change Visibility command. - Open the Disable Clicks button and uncheck
Off
for the 'Enable me if using Click Map OBS Browser Overlay' comment. Change the scene and source name if needed in the Source Change Visibility command.
Map a source
You can select which OBS sources you want to be clickable by your viewers on your stream overlay.
Use the Map Sources button for it and either duplicate one of the premade commands or add a new Click Map Add Source command.
The scene containing your source must remain at 1.0 scale when used as a nested scene. If you are using atypical transform settings for the OBS source (such as unusual positional alignment, bounding box, or crop filters), the mapping might not always be 100% correct. In that case, it's recommended to map an area instead.
Apply Changes
Every time you add, edit, or remove a map area, you must click the Enable Clicks button for the changes to take effect.
Box Name | Description |
---|---|
Trigger | Name of the trigger that will be sent to SAMMI when a viewer clicks |
Scene Name | Scene name where your clickable source resides |
Source Name | Name of the OBS source you wish to be clickable |
Map an area
Instead of selecting one OBS source, you can select an entire area on your OBS canvas to be clickable.
Use the Map Areas button for this, and either duplicate one of the premade commands or add a new Click Map Add Area command. The scene containing your source must remain at 1.0 scale when used as a nested scene.
Apply Changes
Every time you add, edit, or remove a map area, you must click the Enable Clicks button for the changes to take effect.
Box Name | Description |
---|---|
Trigger | Name of the trigger that will be sent to SAMMI when a viewer clicks |
X coord | X coordinate of the area in pixels |
Y coord | Y coordinate of the area in pixels |
Width | Width of the area in pixels |
Height | Height of the area in pixels |
Attach triggers to buttons
Once you add your clickable sources or areas, remember the trigger names you gave them, as you'll need to attach these triggers to your SAMMI buttons.
- Create or use an existing button you want triggered when a viewer interacts with the clickable source or area.
- Right-click the button and select Edit Triggers.
- Click the
+
button and choose Extension Trigger. - Delete the
*
in the Message field and fill it with the extension trigger name you selected for the source or area. - Add any commands to the button you want executed. You can use the following Pull Values for the Trigger Pull Data command to get specific information about the click.
Pull Value | Description |
---|---|
scene | Scene name where the mapped clickable source/area resides |
name | Display name of the viewer who triggered the click (0 if anonymous) |
username | Username of the viewer who triggered the click (anonymous if not logged in) |
userID | User ID of the viewer who triggered the click (anonymous if not logged in) |
x | X coordinate in pixels (converted to your OBS canvas size) of the click |
y | Y coordinate in pixels (converted to your OBS canvas size) of the click |
x_raw | Raw x coordinate (0-1 value) |
y_raw | Raw y coordinate (0-1 value) |
trigger | Trigger name the button was triggered with |
Active Triggers
You can see all currently active triggers in your Bridge Click Map tab.
Allow click triggers only on the correct scene
You can compare the scene
pull value with your current scene (available as the premade variable global.YOUROBSNAME.current_scene
in SAMMI) to check if they match.
If you need to check whether the Click Map scene is nested inside another scene, retrieve the current source list via the OBS Request command and verify if the scene
pull value is within that list. Examples for both scenarios can be found in the grey trigger example buttons in your premade deck.
Remove Trigger
This button removes any click triggers you set up in your Map Sources or Map Areas buttons.
Enable Clicks
Once your sources or areas are mapped and their triggers attached to your buttons, press the Enable Clicks button (assuming you've already followed the instructions to input your Twitch username).
You should see a yellow notification message and the status will change to Connected
in your Click Map tab in Bridge, indicating the extension is listening for clicks. To stop listening, use the Disable Clicks button.
Anonymous vs. Non-anonymous clicks
The extension retrieves the name of the viewer who clicked on your overlay.
Your viewers must grant access to their information via the extension settings in their overlay. If they don’t, their clicks will be sent as anonymous.
By checking the Allow Anonymous option in your Enable button, you can decide whether or not to allow anonymous clicks (viewers who aren’t logged in or haven’t authorized the extension).
Simulating key presses
You can also let viewers click a button on your video overlay that simulates a key press.
- Create an OBS source (e.g., an image of a
W
button). - Use the Map Sources button and either duplicate one of the premade commands or add a new Click Map Add Source command for the OBS source created in step 1 (see Map a source section).
- Create a new button in your deck and attach an Extension Trigger to it (see Attach triggers to buttons section). The Message field will be the trigger name chosen in step 2.
- Double-click the button from step 3. Click the
+
and type Keyboard simulate press, then fill out the following:- Button - Choose the button to simulate the key press.
- Ctrl/Alt/Shift - Select whether to press the button with a modifier (e.g., Ctrl + W).
- Hold Duration - Specify how long the button should be held.
- Press Save and then Save again to save the deck.
- Press the Enable Clicks button.
- Now every time a viewer clicks the selected overlay button, SAMMI will simulate the key press!
Get Help
Please see Troubleshooting for common extensions issues.