1.0.3 • Published 2 years ago
@tnotifier/xjs v1.0.3
@tnotifier/xjs
provides a simple hook which can be used to connect to and consume the XSplit Broadcaster XJS Plugin.
Installation
This package is available via NPM:
yarn add @tnotifier/xjs
# or
npm install @tnotifier/xjs
Usage
import { xjs, Subscription } from '@tnotifier/xjs';
const client = await xjs({ debug: true });
// Asynchronous requests.
const activeScene = await client.getActiveScene();
// Subscriptions.
client.events.on(Subscription.SceneChange, ({ id }: any) => {
console.log(`Active Scene was changed to ${id}`);
});
client.subscribe(Subscription.SceneChange);
To-do
- Fully type the responses and provided methods from XJS
- Allow running in NodeJS via
ws