@evilkiwi/obs
provides a simple hook which can be used to connect to and consume the OBS Studio WebSocket API.
Installation
This package is available via NPM:
yarn add @evilkiwi/obs
# or
npm install @evilkiwi/obs
Usage
import { obs } from '@evilkiwi/obs';
const client = await obs({ debug: true });
// Asynchronous requests.
const allScenes = await client.request('GetSceneList');
// Subscriptions.
client.events.on('SwitchScenes', ({ sceneName }: any) => {
console.log(`Active Scene was changed to ${sceneName}`);
});
To-do
- Fully type the responses and provided methods from XJS
- Allow running in NodeJS via
ws