Twitch Extensions & OBS Link

Hello,

I’m new to this for Twitch and would like to make a Twitch Extension that communicate with OBS to play a sound on OBS, do you have any idea, examples on how I can achieve that ?

Thanks in advance.

Best Regards.

You create what is called a browser source
The browser source is a URL to a webpage that will do the actual sound playing and listen to the relevant events from your system to play said sound.

That webpage will normally live on your servers and be suitably secured, so streamer (a) only gets streamer (a)'s triggers.

Basically theres nothing OBS or Extension specfic here jsut your basic “Streamer Overlay” and once it’s built it would work in any streaming software that supports browser sources.

So you’d have

  • your server
  • that will host a webpage
  • likely a socket server to push events from the server to running instances, and tell it whilst sound(s) to play.

So basically with the Twitch Extension I can create a websocket to communicate with my webpage that will play the sound ? It will make things easier then I was thinking other things since Extensions are displayed on Twitch haha…

Also yeah obviously it would have some security check to avoid issues.

Thank you ! I’ll try that !

Now I’ll have to go get this done, thanks for having an amazing doc ! Create an Extension | Twitch Developers

No (but sorta), there isn’t a sensible way to do that.

You need a server of your own to handle the relay of the triggered event from the extension to the overlay itself.

^^ is more optimal

You can have it so that the streamer needs/is required to have the config page of the dadshboard open for sound capture but that is problematic

For an example you could have a look at how Sound Alerts does there extension you should be able to observe how it does some things in terms of what things are where

Yeah I meant create a websocket to listen on the server and use the extension to establish the connection to send the event info to play the right sound, etc… ! :slight_smile:

I might look into Sound Alerts thanks !

But yeah it’s not for multiple streamers only 1 it’s for learning purpose for me and might be useful for him !

that sounds better yeah.

It also depends what your trigger is

My normal approach is

  • viewer goes thru a “shop”
  • viewer checks out (and either uses free points or bits or whatever criteria)
  • I send a HTTP Post to my server with the “basket”
  • my server then does whatever

This saves a viewer front end needing to keep a socket open to your server.

Theres some alternatives if you are doing bits and theres an eventsub topic for completed checkouts/bits in extension usage events

Yeah that’s how it would looks like ! Sound pretty logical to me haha thanks again ! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.