1.0.1 • Published 6 years ago

streaming-overlay v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

streaming-overlay Back-end for custom streaming overlays and addons. Usable with any streaming service that allows browser sources!

Installation

  1. Run npm i twitch-overlay

Example

Index.js

const client = require('twitch-overlay')
const options = {
	"events": ["follow", "donation", "subscription"],
	"token": "yourtoken",
	"webDirectory": __dirname + "/public",
	"port": 8080
}

client.init(options)

/public/index.html

<script src="/socket.io/socket.io.js"></script>
<script>
	let socket = io()
	
	socket.on("alert-follow", (data) => {
		// Do stuff
	})
</script>

Options

{
	"token": String,           		// REQUIRED. Your streamlabs socket api token (https://streamlabs.com/dashboard#/settings/api-settings)
	"events": Array             	// Array with list of strings for different events
	"port": Float               	// The port you want to use
	"webDirectory": String,     	// REQUIRED. String with the directory of your public web folder
	"debug": Boolean            	// Boolean saying if you want to enable debug messages in the console
	"enableTestAlerts": Boolean 	// Enable test alerts from streamlabs
}

Events

List of all the possible events.

  • follow
  • donation
  • topdonation
  • subscriber
  • resub
  • raid
  • merch
  • host
  • bits