1.0.5 • Published 3 years ago
@tnotifier/obs v1.0.5
@tnotifier/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 @tnotifier/obs
# or
npm install @tnotifier/obs
Usage
import { obs } from '@tnotifier/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