Extensions

Extend SAMMI's functionality with our community made extensions.

Click Map

Developed by:
Rating | Miscellaneous | views

Overview

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?

The extension is capable of listening to not only clicks, but it can also retrieve the name of the viewer who clicked!

Available only for SAMMI 2. Utilizes Heat Twitch extension made by Scott Garner.


Special thanks goes to:
SteveLevesque and Djargic for their continued support on Github.
The Argamenmock, EndoSkull, Evan, Panic, DoctorFu, kurocha, Stephen, Ethan, griddark, Kenny, Mill, William, Paul, deaffrasier, Venge, PapaBear Does Stuff, TTarantox, Rodrigo, Harvey Toadface, Alchemy_03, REVAMPEDDRDTH37 Williams, RhinoMonsterGC, JimmyPotato, Bryan, my amazing Patrons!

If you would like to support me in creating more extensions for SAMMI, you can navigate to the Donate section.

Need a custom tailored extension? Head to the Commissions section!

DISCLAIMER: The extension is provided as is. The developer has no obligation to provide maintenance and support services or handle any bug reports.
Feel free to edit the extension for your own use. You may not distribute, sell or publish it without the author’s permission.


Additional Information
Version 1.0 Requires SAMMI 2.04 and up^ Stream Platform Twitch Updated January 06, 2022
Setup
Quick Start
  1. Install and activate Heat extension on your Twitch channel and activate it as overlay (in your dashboard).

  2. Install the .sef extension you just downloaded from this page to your SAMMI 2 (does not work in SAMMI 1). Make sure you’re on the latest versions for both SAMMI and Bridge! You also need to be connected to OBS.

  3. Double click on Enable Clicks button:
    • Fill out both Account Login Name boxes with your Twitch login name for your streaming channel (all lower case characters)
    • Fill out Click Map Listener command:
      • Channel ID, Oauth Token, OBS Canvas Width and OBS Canvas Height are populated automatically, do not change their values
      • Enable - check to enable listening to clicks and uncheck to disable listening to clicks
      • Allow Anonymous - decide whether you want to allow anonymous viewers to triggers your clicks (read more below)
    • Press save and don’t forget to save the deck as well
  4. Click on Create Example Scene button. An example scene with three color sources should be added to your OBS.

  5. Start streaming on Twitch using the example scene. You must be live for the extension to work.

  6. Once your stream is live and Heat Map extension 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 status should change to Connected in your Click Map tab in Bridge.

  7. 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 yellow alert in SAMMI detecting the click!


Map a source

You can select which OBS sources you want to be clickable by your viewers on your stream overlay. Use Map Sources button for it and just duplicate one of the premade commands or add a new Click Map Add Source command.
The scene that contains your source must remain at 1.0 scale when used as a nested scene.
Please note that if you are using atypical transform settings for the OBS source (unusual positional alignment and bounding box, crop filters etc.), the mapping might not be always 100% correct as the math can get quite complex. In that case it’s recommended to map an area instead.

Box Name Description
Trigger Name of the trigger that will be sent to SAMMI when a viewer clicks on this particular source
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 just selecting one OBS source, you can also select a whole area in your OBS canvas to be clickable. Use Map Areas button for it and just duplicate one of the premade commands or add a new Click Map Add Area command.
The scene that contains your source must remain at 1.0 scale when used as a nested scene.\

Box Name Description
Trigger Name of the trigger that will be sent to SAMMI when a viewer clicks on this particular source
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 now need to attach these triggers to your SAMMI buttons.

  1. Create or use an existing button you wish to be triggered every time a viewer interacts with the clickable source or area
  2. Right click on the button - Edit Triggers
  3. Click on the + button and select Extension Trigger
  4. Delete the * in the Message field and fill it out with the extension trigger name you selected for the given source or area
  5. Add any commands to the button you want to be executed. You can use the following Pull Values for the Trigger Pull Data command to get information about the particular click.


Pull Value Description
scene Scene name where the mapped clickable source/area resides
name Display name of the viewer who triggered the click (returns 0 if anonymous)
username Username of the viewer who triggered the click (returns ‘anonymous’ if anonymous)
userID User ID of the viewer who triggered the click (returns ‘anonymous’ if anonymous)
x the exact x coordinate in pixels (converted to your OBS canvas size) of where the viewer clicked
y the exact y coordinate in pixels (converted to your OBS canvas size) of where the viewer clicked
y_raw raw y coordinate (0-1 value)
x_raw raw x coordinate (0-1 value)
trigger trigger name the button got triggered with

Allow click triggers only if you’re on the correct scene
You can compare the scene pull value with your current scene (which is a premade variable global.Main.current_scene in SAMMI) to check if they match

If this is not good enough for you as you might have your Click Map scene nested inside another scene, you can use this approach instead:


Remove Trigger

This button simply removes any click triggers you set up in your Map sources or Map areas button.


Enable Clicks

Once you set up your sources and/or areas to map and add their triggers to your buttons, you can now press Enable Clicks button (assuming you already went through the process of filling out your Twitch username inside the button which Quick Start section instructs you to do).
You should get a yellow notification message and the status should change to Connected in your Click Map tab in Bridge. This means the extension is ready and listening for clicks.
To disable listening to clicks, use Disable Clicks button.


Anonymous vs. non anonymous clicks

The extension is capable of listening to not only clicks, but it can also retrieve the name of the viewer who clicked!
Your viewers must clicks on the extension settings in their overlay and authorize it to gather their information, otherwise their clicks will be sent as anonymous.
By checking Allow Anonymous in your Enable button, you can decide whether you want to allow anonymous clicks (viewers who are not logged in or did not authorize the extension) to go through or not.


Simulating key presses

You might want to give your viewers the option to click on a button on your video overlay which will simulate a key press.

  1. Create an OBS source (for example an image showing a button W)
  2. Use Map Sources button and just duplicate one of the premade commands or add a new Click Map Add Source command for the OBS source you just created in step 1 (explained in Map a source section)
  3. Create a completely new button in your deck and attach an Extension trigger to it (explained in Attach triggers to buttons section), the Message field will be the trigger name you chose in step 2.
  4. Right click on the button from step 3 - Edit commands. Click on the + and type Keyboard simulate press, select the command and fill out the boxes:
    • Button - select the button you want to be pressed
    • Ctrl/Alt/Shift checkboxes - select whether you want it to press the button together with a modifier, for example Ctrl + W
    • Hold Duration - for how long the button should be held
  5. Press Save and then Save again (first one is to save the button and second one is to save the whole deck)
  6. Press Enable Clicks button.
  7. Now every time your viewer clicks on your selected button overlay, SAMMI will simulate a key press!
Privacy Policy
This developer has disclosed that it will not collect or use your data.

This developer declares that your data is:

  • Not being sold to third parties.
  • Not being used or transferred for purposes that are unrelated to the extension's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes

Reviews

Coming soon!