twitch-video-commands
Plays a video on stream whenever a command is sent on twitch chat
Supports cooldown, has a command to show all available video commands and more
Setup in OBS (when you have the server URL)
- Add a new Browser Source
- Set the server URL as the URL field
- (optional) Add a chroma key filter so the videos can have a transparent background
Commands Configuration
- Copy
parameters.example.ts
toparameters.ts
and edit it as follows: - Follow the comments to configure the
parameters
of the application - To setup the video commands, add entries to the
commands
array, following the example- You should place your videos in the
/src/public/resources
directory
- You should place your videos in the
Server and authentication Configuration
- Copy
.env.example
to.env
and edit as follows: - Set up your twitch bot username, passwords and the server port
- Example:
TWITCH_BOT_PASSWORD="oauth:xxx"
- Example:
TWITCH_CHANNELS="["#testchannel"]"
- Example:
Building and Running the application
- Install node.js, yarn
- Run
yarn
to install the project dependencies - To build the app, navigate to the project root and run
yarn build
- To run the app, navigate to the project root and run
yarn start
- In development, you can combine both of the above steps by running
yarn dev
. This will also auro-reload the app on any change- For this to run, you need to run once
yarn global add nodemon ts-node
- For this to run, you need to run once
- The server will run on the port specified
Project structure
src/app.ts
: the server, which runs withnode
src/public
: the public files, which will be used by the front-end